public void setDate(Date date) { if (date != null) { ((SpinnerDateModel)timeSpinner.getModel()).setValue(date); } }
public Date getDate() { return ((SpinnerDateModel)timeSpinner.getModel()).getDate(); }
public synchronized void syntheticUnbind() { boundSlider.removePropertyChangeListener("model", this); boundSlider.getModel().removeChangeListener(this); boundSlider = null; }
public synchronized void syntheticBind() { boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean(); boundSlider.addPropertyChangeListener("model", this); boundSlider.getModel().addChangeListener(this); }
/** * Returns the model used to hold the Date object * * @return */ public SpinnerDateModel getModel() { return (SpinnerDateModel) _spinner.getModel(); }
/** * Returns the selected tanimoto cut-off * * @return */ public int getTanimotoSimilarity() { return ((Integer) tanimoto.getModel().getValue()).intValue(); }
public BSelecteurSpinner(final String _property, final JSpinner _slider) { super(_property); spinner_ = _slider; spinner_.getModel().addChangeListener(this); }
/** * Sets the spinner model for the field. * * @return the {@link SpinnerModel}. */ public SpinnerModel getModel() { return getComponent().getModel(); } }
public int getMagnitude() { JSpinner sp = (JSpinner) m_view.getSpinner(RadialNames.ID_MAGNITUDE_SPINNER); SpinnerNumberModel model = (SpinnerNumberModel) sp.getModel(); Integer ival = (Integer) model.getValue(); return ival.intValue(); }
/** * Is invoked when the spinner model changes * * @param e * the ChangeEvent */ public void stateChanged(final ChangeEvent e) { final SpinnerNumberModel model = (SpinnerNumberModel) spinner.getModel(); final int value = model.getNumber().intValue(); setValue(value); } }
/** * Sets the current selected Date * * @param cal Date to select */ public void setCalendar(Calendar cal) { _calendarPanel.setCalendar(cal); _spinner.getModel().setValue(cal != null ? cal.getTime() : null); }
/** * Invoked when the target of the listener has changed its state. */ @Override public void stateChanged(ChangeEvent e) { // check max size if Spinner is changed if (e.getSource() == m_SpinnerMaxSize.getModel()) { trim(); validate(); caretUpdate(null); } }
public ClassLinesCustomizer(Preferences preferences, ClassLinesHint classLinesHint) { this.preferences = preferences; this.classLinesHint = classLinesHint; initComponents(); maxAllowedLinesSpinner.getModel().setValue(classLinesHint.getMaxAllowedLines(preferences)); }
public TraitLinesCustomizer(Preferences preferences, TraitLinesHint traitLineHint) { this.preferences = preferences; this.traitLineHint = traitLineHint; initComponents(); maxAllowedLinesSpinner.getModel().setValue(traitLineHint.getMaxAllowedLines(preferences)); }
public NestedHintsCustomizer(Preferences preferences, NestedBlocksHint nestedBlocksHint) { this.preferences = preferences; this.nestedBlocksHint = nestedBlocksHint; initComponents(); numberOfAllowedNestedBlocksSpinner.getModel().setValue(nestedBlocksHint.getNumberOfAllowedNestedBlocks(preferences)); allowConditionBlockCheckBox.setSelected(nestedBlocksHint.allowConditionBlock(preferences)); }
public InterfaceLinesCustomizer(Preferences preferences, InterfaceLinesHint interfaceLinesHint) { this.preferences = preferences; this.interfaceLinesHint = interfaceLinesHint; initComponents(); maxAllowedLinesSpinner.getModel().setValue(interfaceLinesHint.getMaxAllowedLines(preferences)); }
public synchronized void syntheticBind() { boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean(); boundSlider.addPropertyChangeListener("model", this); boundSlider.getModel().addChangeListener(this); }
public synchronized void syntheticBind() { boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean(); boundSlider.addPropertyChangeListener("model", this); boundSlider.getModel().addChangeListener(this); }
private void correctSecretKeySize() { SecretKeyType secretKeyType = getSecretKeyType(); int secretKeySize = getSecretKeySize(); int validatedSecretKeySize = validateSecretKeySize(secretKeyType, secretKeySize); if (validatedSecretKeySize != secretKeySize) { jsKeySize.getModel().setValue(validatedSecretKeySize); } }