Browse Source

REPORT-135235 fix:fbp回归问题:修复自定义悬浮弹窗按钮不灵敏问题

fbp/merge
Richard.Fang 4 months ago
parent
commit
7a567512a8
  1. 2
      designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java
  2. 34
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  3. 32
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

2
designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java

@ -132,7 +132,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName
cell(textField),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Option"))).weight(LEFT_WEIGHT),
row(cell(roundingBox)).weight(RIGHT_WEIGHT)
cell(roundingBox).weight(RIGHT_WEIGHT)
),
cell(previewLabel)
).getComponent());

34
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -32,6 +32,7 @@ import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
@ -153,7 +154,7 @@ public class VanChartPlotLegendPane extends BasicPane {
return FineLayoutBuilder.asBorderLayoutWrapped(column);
}
protected VanChartBackgroundPane creatBackgroundPane(){
protected VanChartBackgroundPane creatBackgroundPane() {
return new VanChartBackgroundWithOutImagePane();
}
@ -252,21 +253,22 @@ public class VanChartPlotLegendPane extends BasicPane {
customFloatPositionButton.setSelected(true);
checkLayoutPaneVisible();
checkDisplayStrategyUse();
if (customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane();
}
if (uiBubbleFloatPane == null) {
Point comPoint = customFloatPositionButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight());
uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) {
@Override
public void updateContentPane() {
parent.attributeChanged();
}
};
}
uiBubbleFloatPane.show(VanChartPlotLegendPane.this, null);
SwingUtilities.invokeLater(() -> {
if (customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane();
}
if (uiBubbleFloatPane == null) {
Point comPoint = customFloatPositionButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight());
uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) {
@Override
public void updateContentPane() {
parent.attributeChanged();
}
};
}
uiBubbleFloatPane.show(VanChartPlotLegendPane.this, null);
});
}
});
}

32
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -35,6 +35,7 @@ import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutS
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
@ -220,21 +221,22 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
alignmentPane.setSelectedIndex(-1);
customFloatPositionButton.setSelected(true);
checkDisplayStrategyUse();
if (customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane();
}
if (uiBubbleFloatPane == null) {
Point comPoint = customFloatPositionButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight());
uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) {
@Override
public void updateContentPane() {
parent.attributeChanged();
}
};
}
uiBubbleFloatPane.show(VanChartTitlePane.this, null);
SwingUtilities.invokeLater(() -> {
if (customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane();
}
if (uiBubbleFloatPane == null) {
Point comPoint = customFloatPositionButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight());
uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) {
@Override
public void updateContentPane() {
parent.attributeChanged();
}
};
}
uiBubbleFloatPane.show(VanChartTitlePane.this, null);
});
}
});
}

Loading…
Cancel
Save