Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.DateTime


    startDateLabel.setText("Start Date");
   
    endDateLabel = new Label(parent, SWT.NULL);
    endDateLabel.setText("End Date");
   
    startDateEdit = new DateTime(parent, SWT.CALENDAR);
    GridData startDateLayoutData = new GridData();
    startDateEdit.setLayoutData(startDateLayoutData);
    startDateEdit.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        updateValues();
      }
      @Override
      public void widgetDefaultSelected(SelectionEvent e) {}});
   
    endDateEdit = new DateTime(parent, SWT.CALENDAR);
    GridData endDateLayoutData = new GridData();
    endDateEdit.setLayoutData(endDateLayoutData);
    endDateEdit.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        updateValues();
      }
      @Override
      public void widgetDefaultSelected(SelectionEvent e) {}});
   
    startTimeLabel = new Label(parent, SWT.NULL);
    startTimeLabel.setText("Start Time");
   
    endTimeLabel = new Label(parent, SWT.NULL);
    endTimeLabel.setText("End Time");
   
    startTimeEdit = new DateTime(parent, SWT.DROP_DOWN | SWT.TIME | SWT.MEDIUM);
    startTimeEdit.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        updateValues();
      }
      @Override
      public void widgetDefaultSelected(SelectionEvent e) {}});
   
    endTimeEdit = new DateTime(parent, SWT.DROP_DOWN | SWT.TIME | SWT.MEDIUM);
    endTimeEdit.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        updateValues();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.DateTime

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.