private JFrame createControllerFrame() { JFrame frame = new JFrame(); frame.setContentPane(new JDesktopPane()); frame.setIconImage(((ImageIcon) getIconFactory().getIcon(getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)).getImage()); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); frame.setJMenuBar(createApplicationMenuBar()); frame.setGlassPane(createHermeticGlassPane()); frame.addWindowListener(new WindowAdapter() { /** * {@inheritDoc} */ @Override public void windowClosing(@SuppressWarnings("unused") WindowEvent e) { stop(); } }); return frame; }
controllerFrame.setGlassPane(createHermeticGlassPane()); controllerFrame.addWindowListener(new WindowAdapter() {
/** * Creates a new JInternalFrame and populates it with a view. * * @param view * the view to be set into the internal frame. * @return the constructed internal frame. */ private JInternalFrame createJInternalFrame(JComponent view, String title, Icon frameIcon) { JInternalFrame internalFrame = new JInternalFrame(title); internalFrame.setFrameIcon(frameIcon); internalFrame.setResizable(true); internalFrame.setClosable(true); internalFrame.setMaximizable(true); internalFrame.setIconifiable(true); internalFrame.getContentPane().add(view, BorderLayout.CENTER); internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); internalFrame.setGlassPane(createHermeticGlassPane()); return internalFrame; }
/** * Creates a new JInternalFrame and populates it with a view. * * @param view * the view to be set into the internal frame. * @return the constructed internal frame. */ private JInternalFrame createJInternalFrame(IView<JComponent> view) { JInternalFrame internalFrame = new JInternalFrame(view.getDescriptor() .getI18nName(getTranslationProvider(), getLocale())); internalFrame.setFrameIcon(getIconFactory().getIcon( view.getDescriptor().getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)); internalFrame.setResizable(true); internalFrame.setClosable(false); internalFrame.setMaximizable(true); internalFrame.setIconifiable(true); internalFrame.getContentPane().add(view.getPeer(), BorderLayout.CENTER); internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); internalFrame.setGlassPane(createHermeticGlassPane()); return internalFrame; }