Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXDatePicker


  @Inject
  public SingleDatePropertyWidget(ConfiguredPropertyDescriptor propertyDescriptor,
      AbstractBeanJobBuilder<?, ?, ?> beanJobBuilder) {
    super(beanJobBuilder, propertyDescriptor);
    _datePicker = new JXDatePicker();
    _datePicker.setFormats("yyyy-MM-dd");
    _datePicker.addActionListener(new ActionListener() {

      @Override
      public void actionPerformed(ActionEvent e) {
View Full Code Here


        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        add(label, BorderLayout.NORTH);

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        add(datePicker, BorderLayout.CENTER);
    }
View Full Code Here

        // JXDatePicker panel
        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        JPanel toolOnePanel = new JPanel();
        toolOnePanel.add(label, BorderLayout.NORTH);
View Full Code Here

        // JXDatePicker panel
        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        JPanel toolOnePanel = new JPanel();
        toolOnePanel.add(label, BorderLayout.NORTH);
View Full Code Here

        // JXDatePicker panel
        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        JPanel toolOnePanel = new JPanel();
        toolOnePanel.add(label, BorderLayout.NORTH);
View Full Code Here

        // JXDatePicker panel
        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        JPanel toolOnePanel = new JPanel();
        toolOnePanel.add(label, BorderLayout.NORTH);
View Full Code Here

        // JXDatePicker panel
        final JLabel label = new JLabel();
        label.setText("Choose Date by selecting below.");

        final JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                label.setText(datePicker.getDate().toString());
            }
        });

        JPanel toolOnePanel = new JPanel();
        toolOnePanel.add(label, BorderLayout.NORTH);
View Full Code Here

        currentRow += 2;
        insets.setName("selectionModesLabel");
        getLabelHandler().add(insets, selectionModes);

       
        unselectableDates = new JXDatePicker();
        JLabel unselectables = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
                unselectableDates, cc.xywh(widgetColumn, currentRow, 1, 1));
        unselectables.setName("unselectableDatesLabel");
        getLabelHandler().add(unselectables, unselectableDates);
        flaggedDates = new JXDatePicker();
        builder.add(flaggedDates, cc.xywh(widgetColumn + 2, currentRow, 1, 1));
        currentRow += 2;

        upperBound = new JXDatePicker();
        lowerBound = new JXDatePicker();
       
        JLabel lower = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
                lowerBound, cc.xywh(widgetColumn, currentRow, 1, 1));
        lower.setName("lowerBoundsLabel");
        getLabelHandler().add(lower, lowerBound);
View Full Code Here

    protected CustomDatePickerBinder() {
        super(Date.class);
    }

    protected JComponent createControl(Map context) {
        return new JXDatePicker();
    }
View Full Code Here

    protected JComponent createControl(Map context) {
        return new JXDatePicker();
    }

    protected Binding doBind(JComponent control, FormModel formModel, String formPropertyPath, Map context) {
        final JXDatePicker datePicker = (JXDatePicker)control;
        return new CustomBinding(formModel, formPropertyPath, Date.class) {

            protected JComponent doBindControl() {
                datePicker.setDate((Date)getValue());
                datePicker.getEditor().addPropertyChangeListener("value", new PropertyChangeListener() {

                    public void propertyChange(PropertyChangeEvent evt) {
                        controlValueChanged(datePicker.getDate());
                    }
                });              
                return datePicker;
            }

            protected void readOnlyChanged() {
                datePicker.setEnabled(isEnabled() && !isReadOnly());
            }

            protected void enabledChanged() {
                datePicker.setEnabled(isEnabled() && !isReadOnly());
            }

            protected void valueModelChanged(Object newValue) {
                datePicker.setDate((Date)newValue);
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.JXDatePicker

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.