btnTimestampHelp.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e)
{
super.widgetSelected(e);
NSAlertBox infoAlert = new NSAlertBox("Timestamp Formatting","The formatting is based on the SimpleDateFormat in Java. Here are some common pattern letters:\n\nY = Year\nM = Month in year\nd = Day in month\nE = Day name in week\na = Am/pmmarker\nH = Hour in day(0-23)\nh = Hour in am/pm(1-12)\nm = Minute in hour\ns = Second inminute\nS = Millisecond\n\nFor more information, check http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html",SWT.ICON_QUESTION|SWT.OK);
infoAlert.go();
}
});
Label lblPreview1 = new Label(this, SWT.NONE);
lblPreview1.setText("Preview: ");
lblPreview = new Label(this, SWT.NONE);
lblPreview.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
sdf = new SimpleDateFormat(timestampFormatText.getText());
lblPreview.setText(sdf.format(new Date()));
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
Label lblAppearance = new Label(this, SWT.NONE);
lblAppearance.setText("Appearance");
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
Label lblMessageFormat = new Label(this, SWT.NONE);
lblMessageFormat.setText("Message format:");
messageFormatText = new Text(this, SWT.BORDER);
messageFormatText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
messageFormatText.setText(Settings.getSettings().getMessageFormat());
Button btnMessageHelp = new Button(this, SWT.NONE);
btnMessageHelp.setImage(ImageCache.getImage("info_small.png"));
GridData gd_btnMessageHelp;
gd_btnMessageHelp = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_btnMessageHelp.widthHint = 28;
gd_btnMessageHelp.heightHint = 28;
btnMessageHelp.setLayoutData(gd_btnMessageHelp);
btnMessageHelp.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e)
{
super.widgetSelected(e);
NSAlertBox infoAlert = new NSAlertBox("Message Formatting","These are the components you can use in the formatting of your message output:\nChannel - %chan%\nUser Level(op, voice, etc) - %lvl%\nMessage Content- %msg%\nNickname - %nick%\nTimestamp - %time%",SWT.ICON_QUESTION|SWT.OK);
infoAlert.go();
}
});
// Button btnSave = new Button(this, SWT.NONE);
// btnSave.addSelectionListener(new SelectionAdapter() {