Exemplo n.º 1
0
  /** Create a new control center window. */
  public ControlCenterWindow(ControlCenter main) {
    this.controlcenter = main;
    this.consoleheights = new HashMap();

    getContentPane().setLayout(new BorderLayout());
    clayout = new CardLayout();
    content = new JPanel(clayout);

    this.console = new ConsolePanel();
    console.setConsoleEnabled(false);
    this.sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    sp.setOneTouchExpandable(true);
    sp.setDividerLocation(200);
    content.setMinimumSize(new Dimension(0, 0));
    console.setMinimumSize(new Dimension(0, 0));
    sp.add(content);
    sp.add(console);
    getContentPane().add("Center", sp);
    sp.setResizeWeight(1.0);

    statusbar = new StatusBar();
    getContentPane().add("South", statusbar);

    this.filechooser = new JFileChooser(".");
    filechooser.setFileFilter(
        new FileFilter() {
          public boolean accept(File f) {
            return f.isDirectory() || f.getName().toLowerCase().endsWith(".jccproject.xml");
          }

          public String getDescription() {
            return "Jadex Project Files";
          }
        });

    // BasicSplitPaneDivider.OneTouchActionHandler

    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            console.close();
            if (controlcenter.exit()) {
              dispose();
              setVisible(false);
            }
          }
        });
  }
Exemplo n.º 2
0
  /*
   * Display the secondary (console) panel to the left. Just keeps things organized
   */
  private void showSecondary() {
    console = new ConsolePanel();
    console.setTitle("Console");
    console.setSubtitle("Realtime activity output");
    console.setBackground(new Color(0x2B2B2B));

    secondary = new SecondaryPanel(console);
    secondary.setSize(secondarySize);
    secondary.setTitle(console.getTitle());
    secondary.setSubtitle(console.getSubtitle());
    add(secondary);

    song = new SongPanel("resources/soundfiles/Cloud-Nine.wav");
    song.setSize(getWidth(), songHeight);
    song.setLocation(0, launchpadHeight);
    //		song.load();
    add(song);
  }
Exemplo n.º 3
0
 public JTextArea getConsole() {
   return console.getConsole();
 }
Exemplo n.º 4
0
 /**
  * Test if the console is enabled.
  *
  * @return True, if enabled.
  */
 public boolean isConsoleEnabled() {
   return console.isConsoleEnabled();
 }
Exemplo n.º 5
0
 /**
  * Set the console enable state.
  *
  * @param enabled The enabled state.
  */
 public void setConsoleEnabled(boolean enabled) {
   console.setConsoleEnabled(enabled);
 }