Exemplo n.º 1
0
  void displayTimestampTypeUi() {
    normalizeTypes();
    constructDateWidgets();

    dateWidget.setValue(model.getTimestamp());
    dateWidget.showCalendar(true);
    dateWidget.showTime(true);
    pnlDate.pack();
    showControl(pnlDate);
  }
Exemplo n.º 2
0
  private void constructDateWidgets() {
    if (dateWidget == null) {
      dateWidget = new CalendarWidget(pnlDate, SWT.NONE, false);
      dateWidget.addSelectionListener(
          new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
              handleDateChanged();
            }
          });
      dateWidget.setLayoutData(new GridData());

      pnlDate.pack();
    }
  }
Exemplo n.º 3
0
 void handleDateChanged() {
   if (dateWidget.isDateWidget()) {
     model.setDate(dateWidget.getDate());
   } else if (dateWidget.isTimeWidget()) {
     model.setTime(dateWidget.getTime());
   } else if (dateWidget.isTimestampWidget()) {
     model.setTimestamp(dateWidget.getTimestamp());
   }
 }
Exemplo n.º 4
0
 /** @see org.teiid.designer.transformation.ui.builder.ILanguageObjectEditor#acceptFocus() */
 @Override
 public void acceptFocus() {
   if (isConversionType()) {
     cbxType.setFocus();
   } else if (currentControl == pnlNull) {
     cbxType.setFocus();
   } else if (currentControl == pnlBoolean) {
     if (rdbTrue.getSelection()) {
       rdbTrue.setFocus();
     } else {
       rdbFalse.setFocus();
     }
   } else if (currentControl == pnlText) {
     txfValue.setFocus();
   } else if (currentControl == pnlDate) {
     dateWidget.setFocus();
   }
 }