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

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

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

JSpinner.revalidate介绍

暂无

代码示例

代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-beanshell-processor

public void stateChanged(ChangeEvent e) {
    JSpinner mySpinner = (JSpinner) (e.getSource());
    setValue(mySpinner.getValue());
    mySpinner.revalidate();
    mySpinner.repaint();
  }
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-contrib

public void stateChanged(ChangeEvent e) {
    JSpinner mySpinner = (JSpinner) (e.getSource());
    setValue(mySpinner.getValue());
    mySpinner.revalidate();
    mySpinner.repaint();
  }
}

代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-beanshell-processor

public Component getTableCellEditorComponent(JTable table,
  Object value, boolean isSelected, int row, int column) {
  renderer.getTableCellRendererComponent(table, value, isSelected,
    false, row, column);
  spinner.setValue(value);
  spinner.revalidate();
  spinner.repaint();
  return spinner;
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-contrib

public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
  renderer.getTableCellRendererComponent(table, value, isSelected, false, row, column);
  spinner.setValue(value);
  spinner.revalidate();
  spinner.repaint();
  return spinner;
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-ui

@Override
public void stateChanged(ChangeEvent e) {
  if (spinner.equals(e.getSource())) {
    if (spinner.isVisible()) {
      Date d = (Date) spinner.getValue();
      log.trace("date: " + d);
      TimeZone tz = ((SimpleDateFormat) ((DateFormatter) ((DefaultEditor) spinner.getEditor()).getTextField().getFormatter()).getFormat()).getTimeZone();
      picker.setTimeZone(tz);
      picker.setDate(d);
      picker.revalidate();
      spinner.revalidate();
      spinner.setMinimumSize(spinner.getPreferredSize());
    }
  }
}

相关文章