Browse Source

配色的渐变色滑块固定

master
Fangjie Hu 8 years ago
parent
commit
3bc7699465
  1. 19
      designer_base/src/com/fr/design/style/background/gradient/FixedGradientBar.java
  2. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

19
designer_base/src/com/fr/design/style/background/gradient/FixedGradientBar.java

@ -0,0 +1,19 @@
package com.fr.design.style.background.gradient;
import com.fr.design.style.background.gradient.GradientBar;
/**
* 这个bar不能拖拽滑动
*/
public class FixedGradientBar extends GradientBar {
private static final long serialVersionUID = 2787525421995954889L;
public FixedGradientBar(int minvalue, int maxvalue) {
super(minvalue, maxvalue);
}
@Override
protected void addMouseDragListener() {
//不添加拖拽事件
}
}

5
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

@ -12,6 +12,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.background.gradient.FixedGradientBar;
import com.fr.design.style.background.gradient.GradientBar;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
@ -33,7 +34,7 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
protected UIComboBox styleSelectBox;
protected JPanel customPane;
protected JPanel changeColorSetPane;
protected GradientBar colorGradient;
protected FixedGradientBar colorGradient;
protected CardLayout cardLayout;
@ -55,7 +56,7 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
customPane.add(buttonPane, BorderLayout.NORTH);
changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.add(colorGradient = new GradientBar(4, 130), "gradient");
changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 130), "gradient");
changeColorSetPane.add(colorAcc = new ChartAccColorPane(), "acc");
cardLayout.show(changeColorSetPane, "acc");
customPane.add(changeColorSetPane, BorderLayout.CENTER);

Loading…
Cancel
Save