javax.swing.JSpinner.getModel()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中javax.swing.JSpinner.getModel()方法的一些代码示例,展示了JSpinner.getModel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.getModel()方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:getModel

JSpinner.getModel介绍

暂无

代码示例

代码示例来源:origin: chewiebug/GCViewer

public void setDate(Date date) {
  if (date != null) {
    ((SpinnerDateModel)timeSpinner.getModel()).setValue(date);
  }
}

代码示例来源:origin: chewiebug/GCViewer

public Date getDate() {
  return ((SpinnerDateModel)timeSpinner.getModel()).getDate();
}

代码示例来源:origin: groovy/groovy-core

public synchronized void syntheticUnbind() {
  boundSlider.removePropertyChangeListener("model", this);
  boundSlider.getModel().removeChangeListener(this);
  boundSlider = null;
}

代码示例来源:origin: groovy/groovy-core

public synchronized void syntheticBind() {
  boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget

/**
 * Returns the model used to hold the Date object
 *
 * @return
 */
public SpinnerDateModel getModel() {
  return (SpinnerDateModel) _spinner.getModel();
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Returns the selected tanimoto cut-off
 * 
 * @return
 */
public int getTanimotoSimilarity() {
  return ((Integer) tanimoto.getModel().getValue()).intValue();
}

代码示例来源:origin: org.fudaa.framework.ebli/ebli-common

public BSelecteurSpinner(final String _property, final JSpinner _slider) {
 super(_property);
 spinner_ = _slider;
 spinner_.getModel().addChangeListener(this);
}

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-corefields

/**
   * Sets the spinner model for the field.
   * 
   * @return the {@link SpinnerModel}.
   */
  public SpinnerModel getModel() {
    return getComponent().getModel();
  }
}

代码示例来源:origin: sc.fiji/VIB_

private void threshold() {
  LabelThresholder_.min = ((SpinnerNumberModel) minThreshold.getModel()).getNumber().intValue();
  LabelThresholder_.max = ((SpinnerNumberModel) maxThreshold.getModel()).getNumber().intValue();
  IJ.runPlugIn("LabelThresholder_", "");
}

代码示例来源:origin: net.java.abeille/abeille

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();
}

代码示例来源:origin: freeplane/freeplane

/**
   * 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);
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget

/**
 * 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);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * 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);
 }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

public ClassLinesCustomizer(Preferences preferences, ClassLinesHint classLinesHint) {
  this.preferences = preferences;
  this.classLinesHint = classLinesHint;
  initComponents();
  maxAllowedLinesSpinner.getModel().setValue(classLinesHint.getMaxAllowedLines(preferences));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

public TraitLinesCustomizer(Preferences preferences, TraitLinesHint traitLineHint) {
  this.preferences = preferences;
  this.traitLineHint = traitLineHint;
  initComponents();
  maxAllowedLinesSpinner.getModel().setValue(traitLineHint.getMaxAllowedLines(preferences));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

public NestedHintsCustomizer(Preferences preferences, NestedBlocksHint nestedBlocksHint) {
  this.preferences = preferences;
  this.nestedBlocksHint = nestedBlocksHint;
  initComponents();
  numberOfAllowedNestedBlocksSpinner.getModel().setValue(nestedBlocksHint.getNumberOfAllowedNestedBlocks(preferences));
  allowConditionBlockCheckBox.setSelected(nestedBlocksHint.allowConditionBlock(preferences));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

public InterfaceLinesCustomizer(Preferences preferences, InterfaceLinesHint interfaceLinesHint) {
  this.preferences = preferences;
  this.interfaceLinesHint = interfaceLinesHint;
  initComponents();
  maxAllowedLinesSpinner.getModel().setValue(interfaceLinesHint.getMaxAllowedLines(preferences));
}

代码示例来源:origin: org.codehaus.groovy/groovy-swing

public synchronized void syntheticBind() {
  boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public synchronized void syntheticBind() {
  boundSlider = (JSpinner) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: kaikramer/keystore-explorer

private void correctSecretKeySize() {
  SecretKeyType secretKeyType = getSecretKeyType();
  int secretKeySize = getSecretKeySize();
  int validatedSecretKeySize = validateSecretKeySize(secretKeyType, secretKeySize);
  if (validatedSecretKeySize != secretKeySize) {
    jsKeySize.getModel().setValue(validatedSecretKeySize);
  }
}

相关文章