use of net.sf.sdedit.ui.components.configuration.Adjustable in project abstools by abstools.
the class NumberConfigurator method initialize.
private void initialize() {
setLayout(new BorderLayout());
Adjustable adjustable = getProperty().getWriteMethod().getAnnotation(Adjustable.class);
min = adjustable.min();
max = adjustable.max();
SpinnerNumberModel model = new SpinnerNumberModel(adjustable.min(), adjustable.min(), adjustable.max(), adjustable.step());
spinner = new JSpinner(model);
spinner.setPreferredSize(new Dimension(45, 1));
spinner.addChangeListener(this);
label = new JLabel(adjustable.info());
label.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
add(spinner, BorderLayout.WEST);
add(label, BorderLayout.CENTER);
}
Aggregations