/** 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); } } }); }