0
성운 CDateTime은 날짜와 시간을 입력 할 때 거의 사용할 수 없습니다. 현명한 오픈 소스 대안이 있습니까?SWT에 사용할 수있는 DateTime 위젯이 있습니까?
성운 CDateTime은 날짜와 시간을 입력 할 때 거의 사용할 수 없습니다. 현명한 오픈 소스 대안이 있습니까?SWT에 사용할 수있는 DateTime 위젯이 있습니까?
사용 org.eclipse.swt.widgets.DateTime
...
출처 : http://www.eclipse.org/swt/snippets/
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class SWTExample
{
public static void main (String [] args)
{
Display display = new Display();
Shell shell = new Shell (display);
shell.setLayout (new RowLayout());
DateTime calendar = new DateTime (shell, SWT.CALENDAR);
calendar.addSelectionListener (new SelectionAdapter() {
public void widgetSelected (SelectionEvent e) {
System.out.println ("calendar date changed");
}
});
DateTime time = new DateTime (shell, SWT.TIME);
time.addSelectionListener (new SelectionAdapter() {
public void widgetSelected (SelectionEvent e) {
System.out.println ("time changed");
}
});
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
정말 좋다. 난 그냥 위젯을 좋아하지 않아
감사합니다 ... 성운 위젯보다 훨씬 더. 다른 아이디어? – Mauli
'SWT.CALENDAR' 대신'SWT.DROP_DOWN'을 사용하면 더 멋지게 보입니다! – chris