@Override public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); // Frame.state isn't currently bound. if ("resizable".equals(name) || "state".equals(name)) { Frame frame = SubstanceTitlePane.this.getFrame(); if (frame != null) { SubstanceTitlePane.this.setState(frame.getExtendedState(), true); } if ("resizable".equals(name)) { SubstanceTitlePane.this.getRootPane().repaint(); } } else { if ("title".equals(name)) { SubstanceTitlePane.this.repaint(); SubstanceTitlePane.this.setToolTipText((String) pce .getNewValue()); } else if ("componentOrientation".equals(name)) { revalidate(); repaint(); } else if ("iconImage".equals(name)) { updateAppIcon(); revalidate(); repaint(); } } } }
public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); // Frame.state isn't currently bound. if ("resizable".equals(name) || "state".equals(name)) { Frame frame = SubstanceTitlePane.this.getFrame(); if (frame != null) { SubstanceTitlePane.this.setState(frame.getExtendedState(), true); } if ("resizable".equals(name)) { SubstanceTitlePane.this.getRootPane().repaint(); } } else { if ("title".equals(name)) { SubstanceTitlePane.this.repaint(); SubstanceTitlePane.this.setToolTipText((String) pce .getNewValue()); } else if ("componentOrientation" == name) { revalidate(); repaint(); } else if ("iconImage" == name) { updateAppIcon(); revalidate(); repaint(); } } } }
this.setToolTipText(null); } else { this.setToolTipText(theTitle);
this.setToolTipText(null); } else { this.setToolTipText(theTitle);
@Override public void addNotify() { super.addNotify(); this.uninstallListeners(); this.window = SwingUtilities.getWindowAncestor(this); if (this.window != null) { this.setActive(this.window.isActive()); if (this.window instanceof Frame) { this.setState(((Frame) this.window).getExtendedState()); } else { this.setState(0); } if (this.getComponentCount() == 0) { // fix for issue 385 - add the sub-components uninstalled // in the removeNotify. This happens when a decorated // dialog has been disposed and then reshown. this.installSubcomponents(); } this.installListeners(); } this.setToolTipText(this.getTitle()); this.updateAppIcon(); }
@Override public void addNotify() { super.addNotify(); this.uninstallListeners(); this.window = SwingUtilities.getWindowAncestor(this); if (this.window != null) { this.setActive(this.window.isActive()); if (this.window instanceof Frame) { this.setState(((Frame) this.window).getExtendedState()); } else { this.setState(0); } if (this.getComponentCount() == 0) { // fix for issue 385 - add the sub-components uninstalled // in the removeNotify. This happens when a decorated // dialog has been disposed and then reshown. this.installSubcomponents(); } this.installListeners(); } this.setToolTipText(this.getTitle()); this.updateAppIcon(); }
/** * Creates a new title pane. * * @param root * Root pane. * @param ui * Root pane UI. */ public SubstanceTitlePane(JRootPane root, SubstanceRootPaneUI ui) { this.rootPane = root; this.rootPaneUI = ui; this.state = -1; this.installSubcomponents(); this.installDefaults(); this.setLayout(this.createLayout()); this.setToolTipText(this.getTitle()); SubstanceLookAndFeel.setDecorationType(this, DecorationAreaType.PRIMARY_TITLE_PANE); this.setForeground(SubstanceColorUtilities .getForegroundColor(SubstanceCoreUtilities.getSkin(this) .getBackgroundColorScheme( DecorationAreaType.PRIMARY_TITLE_PANE))); // SubstanceColorSchemeUtilities // .getColorScheme(this, ComponentState.ACTIVE))); }
/** * Creates a new title pane. * * @param root * Root pane. * @param ui * Root pane UI. */ public SubstanceTitlePane(JRootPane root, SubstanceRootPaneUI ui) { this.rootPane = root; this.rootPaneUI = ui; this.state = -1; this.installSubcomponents(); this.installDefaults(); this.setLayout(this.createLayout()); this.setToolTipText(this.getTitle()); SubstanceLookAndFeel.setDecorationType(this, DecorationAreaType.PRIMARY_TITLE_PANE); this.setForeground(SubstanceColorUtilities .getForegroundColor(SubstanceCoreUtilities.getSkin(this) .getBackgroundColorScheme( DecorationAreaType.PRIMARY_TITLE_PANE))); // SubstanceColorSchemeUtilities // .getColorScheme(this, ComponentState.ACTIVE))); }