|
|
@ -32,27 +32,19 @@ public class UINumberDragPane extends BasicBeanPane<Double> implements GlobalNam |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UINumberDragPane(double minValue, double maxValue) { |
|
|
|
public UINumberDragPane(double minValue, double maxValue) { |
|
|
|
this(minValue, maxValue, 1, (int) maxValue - (int) minValue); |
|
|
|
this(minValue, maxValue, 1); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UINumberDragPane(double minValue, double maxValue, int majorTickSpace) { |
|
|
|
|
|
|
|
this(minValue, maxValue, 1, majorTickSpace); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UINumberDragPane(double minValue, double maxValue, double dierta) { |
|
|
|
public UINumberDragPane(double minValue, double maxValue, double dierta) { |
|
|
|
this(minValue, maxValue, dierta, (int) maxValue - (int) minValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UINumberDragPane(double minValue, double maxValue, double dierta, int majorTickSpace) { |
|
|
|
|
|
|
|
dragBar = new UISlider((int) minValue, (int) maxValue); |
|
|
|
dragBar = new UISlider((int) minValue, (int) maxValue); |
|
|
|
dragBar.setPaintLabels(true); |
|
|
|
dragBar.setPaintLabels(true); |
|
|
|
dragBar.setMajorTickSpacing(majorTickSpace); |
|
|
|
dragBar.setMajorTickSpacing(minValue < 0 ? (int) maxValue : (int) maxValue - (int) minValue); |
|
|
|
spinner = createUISpinner(minValue, maxValue, dierta); |
|
|
|
spinner = createUISpinner(minValue, maxValue, dierta); |
|
|
|
spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation")); |
|
|
|
spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation")); |
|
|
|
spinner.setValue(dragBar.getValue()); |
|
|
|
spinner.setValue(dragBar.getValue()); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.add(Layouts.row( |
|
|
|
this.add(Layouts.row( |
|
|
|
cell(dragBar).weight(0.8), flex(0.1), cell(spinner).weight(0.6) |
|
|
|
cell(dragBar).weight(0.7), flex(0.1), cell(spinner).weight(0.7) |
|
|
|
).getComponent()); |
|
|
|
).getComponent()); |
|
|
|
dragBar.addChangeListener(e -> { |
|
|
|
dragBar.addChangeListener(e -> { |
|
|
|
if (globalNameListener != null && shouldResponseNameListener()) { |
|
|
|
if (globalNameListener != null && shouldResponseNameListener()) { |
|
|
|