本文整理匯總了Java中org.eclipse.swt.widgets.DateTime.addSelectionListener方法的典型用法代碼示例。如果您正苦於以下問題:Java DateTime.addSelectionListener方法的具體用法?Java DateTime.addSelectionListener怎麽用?Java DateTime.addSelectionListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.DateTime
的用法示例。
在下文中一共展示了DateTime.addSelectionListener方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createCustomParameterControl
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
@Override
public Control createCustomParameterControl(final Composite compo) {
edit = new Composite(compo, SWT.NONE);
final GridLayout pointEditorLayout = new GridLayout(2, true);
pointEditorLayout.horizontalSpacing = 10;
pointEditorLayout.verticalSpacing = 0;
pointEditorLayout.marginHeight = 0;
pointEditorLayout.marginWidth = 0;
edit.setLayout(pointEditorLayout);
date = new DateTime(edit, SWT.DROP_DOWN | SWT.BORDER | SWT.DATE | SWT.LONG);
time = new DateTime(edit, SWT.DROP_DOWN | SWT.BORDER | SWT.TIME | SWT.LONG);
date.setBackground(IGamaColors.PARAMETERS_BACKGROUND.color());
date.addSelectionListener(this);
time.setBackground(IGamaColors.PARAMETERS_BACKGROUND.color());
time.addSelectionListener(this);
edit.setBackground(IGamaColors.PARAMETERS_BACKGROUND.color());
displayParameterValue();
return edit;
}
示例2: createUI_Field_Date
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
private int createUI_Field_Date(final Composite parent,
final TourFilterProperty filterProperty,
final int fieldNo) {
final DateTime dtTourDate = new DateTime(parent, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN | SWT.BORDER);
dtTourDate.setData(filterProperty);
dtTourDate.setData(FIELD_NO, fieldNo);
dtTourDate.addFocusListener(_keepOpenListener);
dtTourDate.addSelectionListener(_fieldSelectionListener_DateTime);
GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(dtTourDate);
if (fieldNo == 1) {
filterProperty.uiDateTime1 = dtTourDate;
} else {
filterProperty.uiDateTime2 = dtTourDate;
}
return 1;
}
示例3: createUI_Field_Time
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
private int createUI_Field_Time(final Composite parent,
final TourFilterProperty filterProperty,
final int fieldNo) {
final DateTime dtTourTime = new DateTime(parent, SWT.TIME | SWT.SHORT | SWT.BORDER);
dtTourTime.setData(filterProperty);
dtTourTime.setData(FIELD_NO, fieldNo);
dtTourTime.addFocusListener(_keepOpenListener);
dtTourTime.addSelectionListener(_fieldSelectionListener_DateTime);
GridDataFactory
.fillDefaults()//
.align(SWT.END, SWT.CENTER)
.applyTo(dtTourTime);
if (fieldNo == 1) {
filterProperty.uiDateTime1 = dtTourTime;
} else {
filterProperty.uiDateTime2 = dtTourTime;
}
return 1;
}
示例4: createUISection_122_DateTime_Col1
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
/**
* 1. column
*/
private void createUISection_122_DateTime_Col1(final Composite section) {
final Composite container = _tk.createComposite(section);
GridDataFactory.fillDefaults().applyTo(container);
GridLayoutFactory.fillDefaults().numColumns(3).applyTo(container);
_firstColumnContainerControls.add(container);
{
/*
* date
*/
final Label label = _tk.createLabel(container, Messages.tour_editor_label_tour_date);
_firstColumnControls.add(label);
_dtTourDate = new DateTime(container, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN | SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.END, SWT.FILL).applyTo(_dtTourDate);
_tk.adapt(_dtTourDate, true, false);
_dtTourDate.addSelectionListener(_dateTimeListener);
//////////////////////////////////////
createUI_LabelSeparator(container);
}
}
示例5: createUISection_123_DateTime_Col2
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
/**
* 2. column
*/
private void createUISection_123_DateTime_Col2(final Composite section) {
final Composite container = _tk.createComposite(section);
GridDataFactory.fillDefaults().applyTo(container);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(container);
{
{
/*
* start time
*/
_lblStartTime = _tk.createLabel(container, Messages.tour_editor_label_start_time);
_secondColumnControls.add(_lblStartTime);
_dtStartTime = new DateTime(container, SWT.TIME | SWT.MEDIUM | SWT.BORDER);
_tk.adapt(_dtStartTime, true, false);
_dtStartTime.addSelectionListener(_dateTimeListener);
}
}
}
示例6: createControl
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent)
{
Composite container = new Composite(parent, SWT.NONE);
GridLayout containerLayout = new GridLayout(2, true);
container.setLayout(containerLayout);
new Label(container, SWT.NONE).setText("Start time in UTC:");
new Label(container, SWT.NONE).setText("Stop time in UTC:");
calendarStart = new DateTime(container, SWT.CALENDAR);
calendarStart.addSelectionListener(pageCompleteValidation);
calendarStart.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
calendarStop = new DateTime(container, SWT.CALENDAR);
calendarStop.addSelectionListener(pageCompleteValidation);
calendarStop.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
timeStart = new DateTime(container, SWT.TIME);
timeStart.addSelectionListener(pageCompleteValidation);
timeStart.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
timeStop = new DateTime(container, SWT.TIME);
timeStop.addSelectionListener(pageCompleteValidation);
timeStop.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
setControl(container);
setPageComplete(false);
setErrorMessage("Specify a valid start and stop time (UTC).");
}
示例7: createControls
import org.eclipse.swt.widgets.DateTime; //導入方法依賴的package包/類
private Composite createControls(Composite parent)
{
GridLayout layout = new GridLayout(2, true);
layout.marginWidth = 0;
layout.marginHeight = 0;
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(layout);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
new Label(container, SWT.NONE).setText("Start time in UTC:");
new Label(container, SWT.NONE).setText("Stop time in UTC:");
calendarStart = new DateTime(container, SWT.CALENDAR);
calendarStart.addSelectionListener(pageCompleteValidation);
calendarStart.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
calendarStop = new DateTime(container, SWT.CALENDAR);
calendarStop.addSelectionListener(pageCompleteValidation);
calendarStop.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
timeStart = new DateTime(container, SWT.TIME);
timeStart.addSelectionListener(pageCompleteValidation);
timeStart.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
timeStop = new DateTime(container, SWT.TIME);
timeStop.addSelectionListener(pageCompleteValidation);
timeStop.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
return container;
}