Browse Source

CHART-15944 标签形状选择后三种时,圆角灰化

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
582eda383b
  1. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java

16
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java

@ -25,6 +25,8 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class VanChartBorderWithShapePane extends BasicPane {
private static final int RECTANGULAR_INDEX = 0;
private static final int DIALOG_INDEX = 1;
private LineComboBox lineTypeBox;
private ColorSelectBox lineColorBox;
@ -54,6 +56,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
this.add(detailPane, BorderLayout.SOUTH);
initLineTypeListener();
initShapeListener();
}
private void initLineTypeListener() {
@ -68,6 +71,18 @@ public class VanChartBorderWithShapePane extends BasicPane {
detailPane.setVisible(lineTypeBox.getSelectedLineStyle() != Constants.LINE_NONE);
}
private void initShapeListener() {
borderShape.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
checkRadiusPane();
}
});
}
private void checkRadiusPane() {
borderRadius.setEnabled(borderShape.getSelectedIndex() == RECTANGULAR_INDEX || borderShape.getSelectedIndex() == DIALOG_INDEX);
}
private JPanel createLineTypePane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -118,6 +133,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
borderRadius.setValue(border.getRoundRadius());
checkDetailPane();
checkRadiusPane();
}
public void update(AttrBorderWithShape border) {

Loading…
Cancel
Save