Browse Source

CHART-2100 bug

master
zheng 7 years ago
parent
commit
9fd31ccc8c
  1. 4
      designer_chart/src/com/fr/van/chart/designer/TableLayout4VanChartHelper.java
  2. 6
      designer_chart/src/com/fr/van/chart/range/component/GradualIntervalConfigPane.java
  3. 8
      designer_chart/src/com/fr/van/chart/range/component/LegendGradientBar.java

4
designer_chart/src/com/fr/van/chart/designer/TableLayout4VanChartHelper.java

@ -21,9 +21,9 @@ public class TableLayout4VanChartHelper {
private static final int SMALL_GAP = 20; private static final int SMALL_GAP = 20;
public static final int EXPANDABLE_PANE_WIDTH =290; public static final int EXPANDABLE_PANE_WIDTH =290;
public static final int EXPANDABLE_PANE_HIGHT =24; public static final int EXPANDABLE_PANE_HIGHT =24;
public static final double DESCRIPTION_AREA_WIDTH =60; public static final int DESCRIPTION_AREA_WIDTH = 60;
public static final int EDIT_AREA_WIDTH =155; public static final int EDIT_AREA_WIDTH =155;
public static final double SECOND_EDIT_AREA_WIDTH =143; public static final int SECOND_EDIT_AREA_WIDTH = 143;
public static final int COMPONENT_INTERVAL =12; public static final int COMPONENT_INTERVAL =12;
public static final Border SECOND_EDIT_AREA_BORDER = BorderFactory.createEmptyBorder(0,12,0,0); public static final Border SECOND_EDIT_AREA_BORDER = BorderFactory.createEmptyBorder(0,12,0,0);

6
designer_chart/src/com/fr/van/chart/range/component/GradualIntervalConfigPane.java

@ -50,7 +50,7 @@ public class GradualIntervalConfigPane extends JPanel{
} }
}; };
legendGradientBar = new LegendGradientBar(); legendGradientBar = createLegendGradientBar();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
@ -66,6 +66,10 @@ public class GradualIntervalConfigPane extends JPanel{
this.add(contentPane,BorderLayout.CENTER); this.add(contentPane,BorderLayout.CENTER);
} }
protected LegendGradientBar createLegendGradientBar() {
return new LegendGradientBar();
}
protected Component[][] getPaneComponents(){ protected Component[][] getPaneComponents(){
return new Component[][]{ return new Component[][]{
new Component[]{minMaxValuePane, null}, new Component[]{minMaxValuePane, null},

8
designer_chart/src/com/fr/van/chart/range/component/LegendGradientBar.java

@ -126,10 +126,16 @@ public class LegendGradientBar extends JComponent implements ColorSelectable, UI
addMouseEnteredListener(); addMouseEnteredListener();
addMouseClickListener(); addMouseClickListener();
addMouseReleasedListener(); addMouseReleasedListener();
addMouseDragListener(); if (supportDrag()) {
addMouseDragListener();
}
addMouseExitedListener(); addMouseExitedListener();
} }
protected boolean supportDrag() {
return true;
}
private Color[] initColors(Color subColor, int colorSelectionBtnNum) { private Color[] initColors(Color subColor, int colorSelectionBtnNum) {
Color[] converseColors = getColorArray(subColor, colorSelectionBtnNum); Color[] converseColors = getColorArray(subColor, colorSelectionBtnNum);
Color[] colors = new Color[colorSelectionBtnNum]; Color[] colors = new Color[colorSelectionBtnNum];

Loading…
Cancel
Save