Examples of NSAlertBox


Examples of shared.NSAlertBox

              else
                bot.connect(CS.getServer(), CS.getPort());
            } catch (NumberFormatException e) {
              Logger dLog = Logger.getLogger("log.error");
              dLog.error("Improper port, not a number", e);
              new NSAlertBox(
                  "Connection failed",
                  "The port was not a number. Please use a number 0-65535",
                  SWT.ICON_ERROR, SWT.OK);
            } catch (NickAlreadyInUseException e) {
            } catch (IOException e) {
View Full Code Here

Examples of shared.NSAlertBox

    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() {
View Full Code Here

Examples of shared.NSAlertBox

      try {
        return (Settings)xstream.fromXML(new FileInputStream(filename));
      } catch (Exception e) {
        org.apache.log4j.Logger fLog = org.apache.log4j.Logger.getLogger("log.settings");
        fLog.error("Unable to load settings, resetting to default.", e);
        NSAlertBox alert = new NSAlertBox("Unable to load settings","The file settings.xml was corrupted or was not formatted correctly. Settings have reverted to their defaults.",SWT.OK,SWT.ICON_WARNING);
        alert.go();
        Settings defaultSettings = new Settings();
        settings = defaultSettings;
        writeToFile();
        return defaultSettings;
      }
View Full Code Here

Examples of shared.NSAlertBox

          table.getSelectionIndex()).getData();
      new Connection(RoomManager.getMain().getContainer(), SWT.NONE,
          selected);
    }
    else if(!completed)
      new NSAlertBox("Unable to connect", "The selected connection does not have enough information.", SWT.OK).go();
  }
View Full Code Here

Examples of shared.NSAlertBox

            rbEngine.eval(rbBase+script);
            break;
      }
    } catch (ScriptException e) {

      new NSAlertBox("Script Read Error", reference.getName()+" has an error. Due to error reporting methods, I can not help you narrow down the issue. Here is a stack trace:\n"+e.getMessage(), SWT.ICON_ERROR);

      org.apache.log4j.Logger fLog = org.apache.log4j.Logger.getLogger("log.script.scripts");
      fLog.error("Script initialization failed: "+reference.getName()+" at line #"+e.getLineNumber());
    } catch(Exception e) {
      org.apache.log4j.Logger fLog = org.apache.log4j.Logger.getLogger("log.script.scripts");
View Full Code Here

Examples of shared.NSAlertBox

        if(tree.getSelection().length==0){return;}
        RoomManager.getMain().getDisplay().asyncExec(new Runnable(){

          @Override
          public void run() {
            NSAlertBox a = new NSAlertBox("Delete Scripts", "Are you sure you want to delete the selected files? You can always uncheck them to not use them!", SWT.ICON_QUESTION, SWT.YES|SWT.NO);
            if(a.go() == SWT.YES){
              for(TreeItem s : tree.getSelection()){
                ((Script)s.getData()).getReference().delete();
              }
            }
             
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.