|
|
@ -14,7 +14,7 @@ import javax.swing.event.ChangeListener; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
|
|
|
|
public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
public class GradualIntervalConfigPane extends JPanel { |
|
|
|
private static final long serialVersionUID = 1614283200308877353L; |
|
|
|
private static final long serialVersionUID = 1614283200308877353L; |
|
|
|
|
|
|
|
|
|
|
|
//最大最小值面板
|
|
|
|
//最大最小值面板
|
|
|
@ -26,7 +26,7 @@ public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
//渐变色编辑器
|
|
|
|
//渐变色编辑器
|
|
|
|
private LegendGradientBar legendGradientBar; |
|
|
|
private LegendGradientBar legendGradientBar; |
|
|
|
|
|
|
|
|
|
|
|
public GradualIntervalConfigPane(){ |
|
|
|
public GradualIntervalConfigPane() { |
|
|
|
initComponents(); |
|
|
|
initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -42,10 +42,10 @@ public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
numberDragPane = new UINumberDragPane(1,6) { |
|
|
|
numberDragPane = new UINumberDragPane(1, LegendGradientBar.COLOR_GRADUAL_NUM_MAX) { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void userEvent(double value) { |
|
|
|
public void userEvent(double value) { |
|
|
|
legendGradientBar.refreshColorSelectionBtnNum((int)value); |
|
|
|
legendGradientBar.refreshColorSelectionBtnNum((int) value); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -60,9 +60,9 @@ public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
Component[][] components = getPaneComponents(minMaxValuePane, colorSelectBox, numberDragPane, legendGradientBar); |
|
|
|
Component[][] components = getPaneComponents(minMaxValuePane, colorSelectBox, numberDragPane, legendGradientBar); |
|
|
|
|
|
|
|
|
|
|
|
//控件承载面板
|
|
|
|
//控件承载面板
|
|
|
|
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col); |
|
|
|
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.add(contentPane,BorderLayout.CENTER); |
|
|
|
this.add(contentPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected LegendGradientBar createLegendGradientBar() { |
|
|
|
protected LegendGradientBar createLegendGradientBar() { |
|
|
@ -81,7 +81,7 @@ public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(GradualIntervalConfig intervalConfig){ |
|
|
|
public void populate(GradualIntervalConfig intervalConfig) { |
|
|
|
minMaxValuePane.populate(intervalConfig.getMinAndMaxValue()); |
|
|
|
minMaxValuePane.populate(intervalConfig.getMinAndMaxValue()); |
|
|
|
|
|
|
|
|
|
|
|
colorSelectBox.setSelectObject(intervalConfig.getSubColor()); |
|
|
|
colorSelectBox.setSelectObject(intervalConfig.getSubColor()); |
|
|
@ -92,7 +92,7 @@ public class GradualIntervalConfigPane extends JPanel{ |
|
|
|
legendGradientBar.populate(intervalConfig); |
|
|
|
legendGradientBar.populate(intervalConfig); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void update(GradualIntervalConfig intervalConfig){ |
|
|
|
public void update(GradualIntervalConfig intervalConfig) { |
|
|
|
minMaxValuePane.update(intervalConfig.getMinAndMaxValue()); |
|
|
|
minMaxValuePane.update(intervalConfig.getMinAndMaxValue()); |
|
|
|
|
|
|
|
|
|
|
|
intervalConfig.setSubColor(colorSelectBox.getSelectObject()); |
|
|
|
intervalConfig.setSubColor(colorSelectBox.getSelectObject()); |
|
|
|