Package javax.swing

Examples of javax.swing.JSpinner$SpinnerDateFormatter


     * @return Spinner
     */
    private JSpinner createSpinner() {
        SpinnerModel model = new SpinnerNumberModel(100, 0, 255, 1);

        JSpinner ret = new JSpinner(model);
        ret.setMinimumSize(new Dimension(50, 10));
        ret.setPreferredSize(new Dimension(50, 10));
        return ret;
    }
View Full Code Here


   * javax.swing.table.TableCellEditor#getTableCellEditorComponent(javax.swing
   * .JTable, java.lang.Object, boolean, int, int)
   */
  @Override
  public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    timeSpinner = new JSpinner();
    SpinnerNumberModel spinnerModel = new SpinnerNumberModel();
    spinnerModel.setMinimum(0);
    spinnerModel.setMaximum(90);
    timeSpinner.setModel(spinnerModel);
    timeSpinner.setValue(value);
View Full Code Here

      "pref,5dlu,pref,1dlu,pref,10dlu,pref,5dlu,pref,1dlu,"+
      "pref,10dlu,pref,5dlu,pref,1dlu,pref,7dlu,pref,pref," +
      "pref,pref,pref,7dlu,pref,pref,10dlu,pref"),this);
      pb.setDefaultDialogBorder();
     
      mPreTimeSpinner = new JSpinner(new SpinnerNumberModel(mData.getPreTime(), 0, null, 1));
      mPostTimeTextField = new JSpinner(new SpinnerNumberModel(mData.getPostTime(), 0, null, 1));
     
      mUserName.setText(mData.getUsername());
      mUserPwd.setText(mData.getPassword());
     
      mMaxSimult = new JSpinner(new SpinnerNumberModel(mData.getMaxSimultanious(), 1, null, 1));
      mMaxTimeout = new JSpinner(new SpinnerNumberModel(mData.getTimeout(), -1, 999, 1));

      mCheckReturn = new JCheckBox(mLocalizer.msg("CheckError", "Check if returns Error"), mData.useReturnValue());
      mShowOnError = new JCheckBox(mLocalizer.msg("ShowResultOnError","Show Result-Dialog only on Error"), mData.getDialogOnlyOnError());
      mShowTitleAndTimeDialog = new JCheckBox(mLocalizer.msg("showTitleAndTime", "Show title and time settings dialog"), mData.getShowTitleAndTimeDialog());
      mDeleteRemovedPrograms = new JCheckBox(mLocalizer.msg("autoDeletePrograms", "Automatically delete programs that were removed during a data update"), mData.getDeleteRemovedPrograms());
View Full Code Here

    JPanel innerPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0));
    innerPanel.setBorder(BorderFactory.createEmptyBorder());

    mFontCB = new JComboBox(FONTNAMES);
    mStyleCB = new JComboBox(FONTSTYLES);
    mSizeSpinner = new JSpinner(new SpinnerNumberModel(FONTSIZE_MIN, FONTSIZE_MIN, FONTSIZE_MAX, 1));

    innerPanel.add(mFontCB);

    if (style) {
      innerPanel.add(mStyleCB);
View Full Code Here

  public TimePeriodChooser(int from, int to, int alignment) {
    FlowLayout layout = new FlowLayout(FlowLayout.LEFT, 0, 0);
   
    JPanel content = new JPanel(new FormLayout("pref, 3dlu, pref, 3dlu, pref, 3dlu, pref", "pref"));
   
    mTimeFromSp = new JSpinner(new SpinnerDateModel());
    JSpinner.DateEditor dateEditor = new JSpinner.DateEditor(mTimeFromSp, Settings.getTimePattern());
    mTimeFromSp.setEditor(dateEditor);
    CaretPositionCorrector.createCorrector(dateEditor.getTextField(), new char[] {':'}, -1);
   
    mTimeToSp = new JSpinner(new SpinnerDateModel());
    dateEditor = new JSpinner.DateEditor(mTimeToSp, Settings.getTimePattern());
    mTimeToSp.setEditor(dateEditor);
    CaretPositionCorrector.createCorrector(dateEditor.getTextField(), new char[] {':'}, -1);
   
    CellConstraints cc = new CellConstraints();
View Full Code Here

    private JSpinner mTimeSp;

    public TimePanel(int minutes) {
      setLayout(new BorderLayout());

      mTimeSp = new JSpinner(new SpinnerDateModel());
      JSpinner.DateEditor dateEditor = new JSpinner.DateEditor(mTimeSp, Settings.getTimePattern());
      mTimeSp.setEditor(dateEditor);

      CaretPositionCorrector.createCorrector(dateEditor.getTextField(), new char[] {':'}, -1);
     
View Full Code Here

   
    bg.add(mCloseOnEnd);
    bg.add(mCloseNever);
    bg.add(mCloseOnTime);
   
    mAutoCloseReminderTimeSp = new JSpinner(new SpinnerNumberModel(autoCloseReminderTime,autoCloseReminderTime < 5 ? 1 : 5,600,1));
    mAutoCloseReminderTimeSp.setEnabled(mCloseOnTime.isSelected() && mReminderWindowChB.isSelected());
   
    mShowTimeCounter = new JCheckBox(mLocalizer.msg("showTimeCounter","Show time counter"),mSettings.getProperty("showTimeCounter","false").compareTo("true") == 0);
    mShowTimeCounter.setEnabled(!mCloseNever.isSelected() && mReminderWindowChB.isSelected());
   
View Full Code Here

        spiNbCopies.setStepSize(new Integer(1));
        spiNbCopies.setMinimum(new Integer(1));
        spiNbCopies.setMaximum(new Integer(100));
        spiNbCopies.setValue(new Integer(1));
        nbCopies = new JSpinner(spiNbCopies);

        copiesPanel.addOnCurrentRow(lnbCopies);
        copiesPanel.addOnCurrentRow(nbCopies, 1, true, false, true);
        copiesPanel.carriageReturn();
View Full Code Here

        };
        lorder = new JLabel(resources.getString("Order"));
        SpinnerNumberModel snm = new SpinnerNumberModel();
        snm.setMinimum(new Integer(3));
        snm.setValue(new Integer(3));
        sporder = new JSpinner(snm);
        rbUser = new ActionRadioButton(resources.getString("User-defined")) {
            public void stateChanged(ChangeEvent e) {
                lpoints.setEnabled(rbUser.isSelected());
                taPoints.setEnabled(rbUser.isSelected());
            }
View Full Code Here

    protected JComponent createContents() {
        JLabel lhistorySize = new JLabel(resources.getString("HistorySize:"));
        spiModelHistSize = new SpinnerNumberModel();
        spiModelHistSize.setStepSize(new Integer(1));
        spiModelHistSize.setMinimum(new Integer(1));
        spiHistSize = new JSpinner(spiModelHistSize);
        spiHistSize.setPreferredSize(new Dimension(120, 20));
        historyTextPanel = new JPanel();
       
        // Create panel
        GridBagPanel historyPanel = new GridBagPanel();
View Full Code Here

TOP

Related Classes of javax.swing.JSpinner$SpinnerDateFormatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.