1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| Group group = new Group(parent, SWT.NONE);
group.setText("Dates");
group.setLayout(gridLayout);
GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
group.setLayoutData(gridData);
Composite panel = new Composite(group, SWT.NONE);
RowLayout rowLayout = new RowLayout();
rowLayout.wrap = true;
rowLayout.pack = true;
rowLayout.justify = false;
rowLayout.center = true;
rowLayout.type = SWT.HORIZONTAL;
rowLayout.marginLeft = 0;
rowLayout.spacing = 5;
panel.setLayout(rowLayout);
gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
panel.setLayoutData(gridData);
AddLabelAndButtonCalendar(panel, true, "1st date :", "Select the first date", CalendarUtil.getYesterday());
Label label = new Label(panel, SWT.None);
label.setText(" ");
AddLabelAndButtonCalendar(panel, false, "2nd date :", "Select the second date", CalendarUtil.getBeforeYesterday());
label = new Label(panel, SWT.None);
label.setText(" ");
Button submit = new Button(panel, SWT.PUSH);
submit.setText("Submit");
submit.addSelectionListener(new SelectionAdapter() {
// ...
});
group.pack();
// ...
group.setVisible(false) |
Partager