Browse Source

Merge pull request #13 in DESIGN/design from ~ZHENG/c-design:feature/10.0 to feature/10.0

* commit 'ad0d512818362a85274f90e7005c95811c0ae5fc':
  CHART-2100 bug
master
superman 6 years ago
parent
commit
b370a4c9cc
  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;
public static final int EXPANDABLE_PANE_WIDTH =290;
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 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 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 f = TableLayout.FILL;
@ -66,6 +66,10 @@ public class GradualIntervalConfigPane extends JPanel{
this.add(contentPane,BorderLayout.CENTER);
}
protected LegendGradientBar createLegendGradientBar() {
return new LegendGradientBar();
}
protected Component[][] getPaneComponents(){
return new Component[][]{
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();
addMouseClickListener();
addMouseReleasedListener();
addMouseDragListener();
if (supportDrag()) {
addMouseDragListener();
}
addMouseExitedListener();
}
protected boolean supportDrag() {
return true;
}
private Color[] initColors(Color subColor, int colorSelectionBtnNum) {
Color[] converseColors = getColorArray(subColor, colorSelectionBtnNum);
Color[] colors = new Color[colorSelectionBtnNum];

Loading…
Cancel
Save