/** * Initialises the dialog. * * @param tabbedUI the UI that controls the dialog. */ public void init(final AbstractTabbedUI tabbedUI) { this.tabbedUI = tabbedUI; this.tabbedUI.addPropertyChangeListener (AbstractTabbedUI.JMENUBAR_PROPERTY, new MenuBarChangeListener()); addWindowListener(new WindowAdapter() { public void windowClosing(final WindowEvent e) { getTabbedUI().getCloseAction().actionPerformed (new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null, 0)); } }); final JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(tabbedUI, BorderLayout.CENTER); setContentPane(panel); setJMenuBar(tabbedUI.getJMenuBar()); }
/** * Initialises the dialog. * * @param tabbedUI the UI that controls the dialog. */ public void init(final AbstractTabbedUI tabbedUI) { this.tabbedUI = tabbedUI; this.tabbedUI.addPropertyChangeListener (AbstractTabbedUI.JMENUBAR_PROPERTY, new MenuBarChangeListener()); addWindowListener(new WindowAdapter() { public void windowClosing(final WindowEvent e) { getTabbedUI().getCloseAction().actionPerformed (new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null, 0)); } }); final JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(tabbedUI, BorderLayout.CENTER); setContentPane(panel); setJMenuBar(tabbedUI.getJMenuBar()); }
/** * Initialises the dialog. * * @param tabbedUI the UI that controls the dialog. */ public void init(final AbstractTabbedUI tabbedUI) { this.tabbedUI = tabbedUI; this.tabbedUI.addPropertyChangeListener (AbstractTabbedUI.JMENUBAR_PROPERTY, new MenuBarChangeListener()); addWindowListener(new WindowAdapter() { public void windowClosing(final WindowEvent e) { getTabbedUI().getCloseAction().actionPerformed (new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null, 0)); } }); final JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(tabbedUI, BorderLayout.CENTER); setContentPane(panel); setJMenuBar(tabbedUI.getJMenuBar()); }