public void setValue(Object value) { spinnerOperator.setValue(value); }
public Component getSource() { return spinnerOperator.getSource(); }
public Object getValue() { return spinnerOperator.getValue(); }
@Override public SpinnerOperator createOperatorByIndex(int index) { return new DefaultSpinnerOperator(new JSpinnerOperator((ContainerOperator) Context.getContext(), index)); }
public void decreaseToMinimum() { spinnerOperator.scrollToMinimum(); }
public void increaseToMaximum() { spinnerOperator.scrollToMaximum(); } }
public void decrease() { spinnerOperator.getDecreaseOperator().push(); }
public void increase() { spinnerOperator.getIncreaseOperator().push(); }
/** * Locate a JSpinner component by a given name or index and return its * operator * * @param operator * the operator to search in * @param identifier * the name\index to locate JSpinner by * @return */ public JSpinnerOperator getSpinnerOperator(ContainerOperator operator, Object identifier) { JSpinnerOperator spinner = null; if (identifier instanceof String) { spinner = new JSpinnerOperator(operator, new ComponentChooserHelper((String) identifier)); } else { // int spinner = new JSpinnerOperator(operator, Integer .parseInt(identifier.toString())); } return spinner; }
@Override public SpinnerOperator createOperatorByName(String name) { return new DefaultSpinnerOperator(new JSpinnerOperator((ContainerOperator) Context.getContext(), new ByNameComponentChooser(name))); } }
/** * Locate a JSpinner component by a given name or index and return its * operator and sets his value with the given value. * * @param operator * @param identifier * @param value */ public void setSpinnerValue(ContainerOperator operator, Object identifier, Object value) { JSpinnerOperator spinner = getSpinnerOperator(operator, identifier); if (!checkOperator(spinner, identifier, "Spinner is disabled!", identifier)) { return; } spinner.setValue(value); }