Package us.thinkable.framework.editor

Examples of us.thinkable.framework.editor.XStatusEditor


    readPanel = new XTextEditor(frame, "Read", "resources/read.menu");
    readPanel.setEditable(false);
    String file = XUtil.readFile(new File("resources/framework.menu"));
    readPanel.setText(file);

    statusPanel = new XStatusEditor(frame, "Status", null);

    tablePanel = new XTableEditor(frame, "Table", null);
    tablePanel.setData(columnNames, data);

    // create the example panel
View Full Code Here


    button.addActionListener(this);
    this.add(button);
  }

  public void actionPerformed(ActionEvent e) {
    XStatusEditor statusPanel = (XStatusEditor) Main.statusPanel;
    XTableEditor tablePanel = (XTableEditor) Main.tablePanel;
    if ("log".equals(e.getActionCommand())) {
      statusPanel.addText("Button Clicked");
    } else if ("popup".equals(e.getActionCommand())) {
      int response = 0;
      response = XDialog.alert("Message", "OK");
      statusPanel.addText("" + response);

      response = XDialog.info("Message", "OK", "Cancel");
      statusPanel.addText("" + response);

      response = XDialog.warning("Message", "OK", "Cancel", "Other");
      statusPanel.addText("" + response);

      response = XDialog.error("Message", "OK", "Cancel", "Other", "Wow!");
      statusPanel.addText("" + response);

      String result = "";
      result = XDialog.input("Message", "OK", "Cancel");
      statusPanel.addText(result);

      result = XDialog.input("Message");
      statusPanel.addText(result);

      String[] imageExts = { "jpg", "png", "bmp" };
      String file = XDialog.load("Load", null, imageExts);
      statusPanel.addText("LOAD:" + file);

      file = XDialog.save("Save", null, imageExts);
      statusPanel.addText("SAVE:" + file);

      file = XDialog.directory("Directory");
      statusPanel.addText("DIRECTORY:" + file);

    } else if ("table".equals(e.getActionCommand())) {
      Object[][] data = tablePanel.getData();
      for (int i = 0; i < data.length; i++) {
        Object[] row = data[i];
        String s = "row(" + i + "):";
        for (int j = 0; j < row.length; j++) {
          Object obj = row[j];
          s += obj + "(" + obj.getClass().getName() + ") ";
        }
        statusPanel.addText(s);
        tablePanel.toFront();
      }
    } else if ("trek".equals(e.getActionCommand())) {
      tablePanel.setData(headers, data);
      tablePanel.setEditable(false);
View Full Code Here

    //create the frame
    XDB.init(new File("nlpbuddy.db"));
    //XSimpleAccess access = new XSimpleAccess(new File("resources/access.txt"));
    MyFrame frame = new MyFrame("Example", "resources/nlpbuddy.menu", null);

    statusEditor = new XStatusEditor(frame, "Status", null);
    nlpEditor = new GraphEditor(frame, "NLPEditor", null);

    statusEditor.addText("Welcome to NLPBuddy");

    frame.setVisible(true);
View Full Code Here

TOP

Related Classes of us.thinkable.framework.editor.XStatusEditor

Copyright © 2018 www.massapicom. 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.