DateTimeSelectorDialog.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:elexis-3-core 作者:
private Composite createDefaultArea(Composite parent){
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    Label label = new Label(composite, SWT.NONE);
    label.setText("Zeitpunkt");
    label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
    Composite dateComposite = new Composite(composite, SWT.NONE);
    dateComposite.setLayout(new GridLayout(2, true));
    dateComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    timeSelection = new DateTime(dateComposite, SWT.TIME);
    timeSelection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    dateSelection = new DateTime(dateComposite, SWT.CALENDAR);
    dateSelection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

    timeSelection.setTime(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE),
        date.get(Calendar.SECOND));
    dateSelection.setDate(date.get(Calendar.YEAR), date.get(Calendar.MONTH),
        date.get(Calendar.DAY_OF_MONTH));

    getShell().setText(Messages.DateTimeSelectorDialog_enterDate); //$NON-NLS-1$
    return composite;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号