/** * Computes title pane height. * * @return Title pane height. */ private int computeHeight() { FontMetrics fm = SubstanceTitlePane.this.rootPane .getFontMetrics(SubstanceTitlePane.this.getFont()); int fontHeight = fm.getHeight(); fontHeight += 7; int iconHeight = 0; if (SubstanceTitlePane.this.getWindowDecorationStyle() == JRootPane.FRAME) { iconHeight = SubstanceSizeUtils.getTitlePaneIconSize(); } int finalHeight = Math.max(fontHeight, iconHeight); return finalHeight; }
/** * Returns the <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. * * @return <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. */ private JMenu createMenu() { JMenu menu = new JMenu(""); menu.setOpaque(false); menu.setBackground(null); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.addMenuItems(menu); } return menu; }
if (this.getWindowDecorationStyle() == JRootPane.FRAME) { menu.add(this.restoreAction);
/** * Create the <code>Action</code>s that get associated with the buttons and * menu items. */ private void createActions() { this.closeAction = new CloseAction(); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.iconifyAction = new IconifyAction(); this.restoreAction = new RestoreAction(); this.maximizeAction = new MaximizeAction(); } }
/** * Create the <code>Action</code>s that get associated with the buttons and * menu items. */ private void createActions() { this.closeAction = new CloseAction(); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.iconifyAction = new IconifyAction(); this.restoreAction = new RestoreAction(); this.maximizeAction = new MaximizeAction(); } }
SubstanceButtonUI.IS_TITLE_CLOSE_BUTTON, Boolean.TRUE); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.minimizeButton = this.createTitleButton(); this.minimizeButton.setAction(this.iconifyAction);
SubstanceButtonUI.IS_TITLE_CLOSE_BUTTON, Boolean.TRUE); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.minimizeButton = this.createTitleButton(); this.minimizeButton.setAction(this.iconifyAction);
Window w = this.getWindow(); if ((w != null) && (this.getWindowDecorationStyle() == JRootPane.FRAME)) { if ((this.state == state) && !updateRegardless) { return;
Window w = this.getWindow(); if ((w != null) && (this.getWindowDecorationStyle() == JRootPane.FRAME)) { if ((this.state == state) && !updateRegardless) { return;
x += buttonWidth; if (SubstanceTitlePane.this.getWindowDecorationStyle() == JRootPane.FRAME) { if (Toolkit.getDefaultToolkit().isFrameStateSupported( Frame.MAXIMIZED_BOTH)) {
int decorationStyle = this.getWindowDecorationStyle(); if (decorationStyle == JRootPane.FRAME) { this.createActions();
x += buttonWidth; if (SubstanceTitlePane.this.getWindowDecorationStyle() == JRootPane.FRAME) { if (Toolkit.getDefaultToolkit().isFrameStateSupported( Frame.MAXIMIZED_BOTH)) {
int decorationStyle = this.getWindowDecorationStyle(); if (decorationStyle == JRootPane.FRAME) { this.createActions();