This class assumes it will be created with a particular window decoration style, and that if the style changes, a new one will be created.
| Modifier and Type | Class and Description |
|---|---|
| private class | MetalTitlePane.
Actions used to |
| private class | MetalTitlePane.
Actions used to |
| private class | MetalTitlePane.
Actions used to |
| private class | MetalTitlePane.
PropertyChangeListener installed on the Window. |
| private class | MetalTitlePane.
Actions used to |
| private class | MetalTitlePane.
Class responsible for drawing the system menu. |
| private class | |
| private class | MetalTitlePane.
WindowListener installed on the Window, updates the state as necessary. |
| Modifier and Type | Field and Description |
|---|---|
| private Color | |
| private MetalBumps | |
| private Color | |
| private Color | |
| private Color | |
| private Color | |
| private int | buttonsWidth
Room remaining in title for bumps. |
| private Action | closeAction
Action used to close the Window. |
| private JButton | closeButton
Button used to maximize or restore the Frame. |
| private static final Border | |
| private Action | iconifyAction
Action used to iconify the Frame. |
| private JButton | iconifyButton
Button used to maximize or restore the Frame. |
| private static final int | |
| private static final int | |
| private Color | |
| private MetalBumps | |
| private Color | |
| private Color | |
| private Action | maximizeAction
Action to restore the Frame size. |
| private Icon | maximizeIcon
Icon used for toggleButton when window is normal size. |
| private JMenuBar | menuBar
JMenuBar, typically renders the system menu items. |
| private Icon | minimizeIcon
Icon used for toggleButton when window is maximized. |
| private PropertyChangeListener | propertyChangeListener
PropertyChangeListener added to the JRootPane. |
| private Action | restoreAction
Action to restore the Frame size. |
| private JRootPane | rootPane
JRootPane rendering for. |
| private MetalRootPaneUI | rootPaneUI
MetalRootPaneUI that created us. |
| private int | state
Buffered Frame.state property. |
| private Image | systemIcon
Image used for the system menu icon |
| private JButton | toggleButton
Button used to maximize or restore the Frame. |
| private Window | window
Window we're currently in. |
| private WindowListener | windowListener
Listens for changes in the state of the Window listener to update the state of the widgets. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | addNotify()
Overrides javax. Notifies this component that it now has a parent component. |
| private void | |
| private void | |
| private void | |
| private LayoutManager | |
| private JMenu | |
| protected JMenuBar | |
| private JButton | |
| private WindowListener | |
| private PropertyChangeListener | |
| private void | |
| private Frame | getFrame()
Returns the Frame rendering in. This will return null if the
|
| public JRootPane | getRootPane()
Overrides javax. Returns the |
| private String | |
| private Window | getWindow()
Returns the |
| private int | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | |
| public void | removeNotify()
Overrides javax. Notifies this component that it no longer has a parent component. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | updateToggleButton(Action action, Icon icon)
Updates the toggle button to contain the Icon |
| activeBackground | back to summary |
|---|---|
| private Color activeBackground | |
| activeBumps | back to summary |
|---|---|
| private MetalBumps activeBumps | |
| activeBumpsHighlight | back to summary |
|---|---|
| private Color activeBumpsHighlight | |
| activeBumpsShadow | back to summary |
|---|---|
| private Color activeBumpsShadow | |
| activeForeground | back to summary |
|---|---|
| private Color activeForeground | |
| activeShadow | back to summary |
|---|---|
| private Color activeShadow | |
| buttonsWidth | back to summary |
|---|---|
| private int buttonsWidth Room remaining in title for bumps. | |
| closeAction | back to summary |
|---|---|
| private Action closeAction Action used to close the Window. | |
| closeButton | back to summary |
|---|---|
| private JButton closeButton Button used to maximize or restore the Frame. | |
| handyEmptyBorder | back to summary |
|---|---|
| private static final Border handyEmptyBorder | |
| iconifyAction | back to summary |
|---|---|
| private Action iconifyAction Action used to iconify the Frame. | |
| iconifyButton | back to summary |
|---|---|
| private JButton iconifyButton Button used to maximize or restore the Frame. | |
| IMAGE_HEIGHT | back to summary |
|---|---|
| private static final int IMAGE_HEIGHT | |
| IMAGE_WIDTH | back to summary |
|---|---|
| private static final int IMAGE_WIDTH | |
| inactiveBackground | back to summary |
|---|---|
| private Color inactiveBackground | |
| inactiveBumps | back to summary |
|---|---|
| private MetalBumps inactiveBumps | |
| inactiveForeground | back to summary |
|---|---|
| private Color inactiveForeground | |
| inactiveShadow | back to summary |
|---|---|
| private Color inactiveShadow | |
| maximizeAction | back to summary |
|---|---|
| private Action maximizeAction Action to restore the Frame size. | |
| maximizeIcon | back to summary |
|---|---|
| private Icon maximizeIcon Icon used for toggleButton when window is normal size. | |
| menuBar | back to summary |
|---|---|
| private JMenuBar menuBar JMenuBar, typically renders the system menu items. | |
| minimizeIcon | back to summary |
|---|---|
| private Icon minimizeIcon Icon used for toggleButton when window is maximized. | |
| propertyChangeListener | back to summary |
|---|---|
| private PropertyChangeListener propertyChangeListener PropertyChangeListener added to the JRootPane. | |
| restoreAction | back to summary |
|---|---|
| private Action restoreAction Action to restore the Frame size. | |
| rootPane | back to summary |
|---|---|
| private JRootPane rootPane JRootPane rendering for. | |
| rootPaneUI | back to summary |
|---|---|
| private MetalRootPaneUI rootPaneUI MetalRootPaneUI that created us. | |
| state | back to summary |
|---|---|
| private int state Buffered Frame.state property. As state isn't bound, this is kept to determine when to avoid updating widgets. | |
| systemIcon | back to summary |
|---|---|
| private Image systemIcon Image used for the system menu icon | |
| toggleButton | back to summary |
|---|---|
| private JButton toggleButton Button used to maximize or restore the Frame. | |
| window | back to summary |
|---|---|
| private Window window Window we're currently in. | |
| windowListener | back to summary |
|---|---|
| private WindowListener windowListener Listens for changes in the state of the Window listener to update the state of the widgets. | |
| MetalTitlePane | back to summary |
|---|---|
| public MetalTitlePane(JRootPane root, MetalRootPaneUI ui) | |
| addMenuItems | back to summary |
|---|---|
| private void addMenuItems(JMenu menu) Adds the necessary | |
| addNotify | back to summary |
|---|---|
| public void addNotify() Overrides javax. Doc from javax. Notifies this component that it now has a parent component.
When this method is invoked, the chain of parent components is
set up with | |
| close | back to summary |
|---|---|
| private void close() Closes the Window. | |
| createActions | back to summary |
|---|---|
| private void createActions() Create the | |
| createButtons | back to summary |
|---|---|
| private void createButtons() Creates the Buttons that will be placed on the TitlePane. | |
| createLayout | back to summary |
|---|---|
| private LayoutManager createLayout() Returns the | |
| createMenu | back to summary |
|---|---|
| private JMenu createMenu() Returns the | |
| createMenuBar | back to summary |
|---|---|
| protected JMenuBar createMenuBar() Returns the | |
| createTitleButton | back to summary |
|---|---|
| private JButton createTitleButton() Returns a | |
| createWindowListener | back to summary |
|---|---|
| private WindowListener createWindowListener() Returns the | |
| createWindowPropertyChangeListener | back to summary |
|---|---|
| private PropertyChangeListener createWindowPropertyChangeListener() Returns the | |
| determineColors | back to summary |
|---|---|
| private void determineColors() Determines the Colors to draw with. | |
| getFrame | back to summary |
|---|---|
| private Frame getFrame() Returns the Frame rendering in. This will return null if the
| |
| getRootPane | back to summary |
|---|---|
| public JRootPane getRootPane() Overrides javax. Returns the | |
| getTitle | back to summary |
|---|---|
| private String getTitle() Returns the String to display as the title. | |
| getWindow | back to summary |
|---|---|
| private Window getWindow() Returns the | |
| getWindowDecorationStyle | back to summary |
|---|---|
| private int getWindowDecorationStyle() Returns the decoration style of the | |
| iconify | back to summary |
|---|---|
| private void iconify() Iconifies the Frame. | |
| installDefaults | back to summary |
|---|---|
| private void installDefaults() Installs the fonts and necessary properties on the MetalTitlePane. | |
| installListeners | back to summary |
|---|---|
| private void installListeners() Installs the necessary listeners. | |
| installSubcomponents | back to summary |
|---|---|
| private void installSubcomponents() Adds any sub-Components contained in the | |
| maximize | back to summary |
|---|---|
| private void maximize() Maximizes the Frame. | |
| paintComponent | back to summary |
|---|---|
| public void paintComponent(Graphics g) Overrides javax. Renders the TitlePane. | |
| removeNotify | back to summary |
|---|---|
| public void removeNotify() Overrides javax. Doc from javax. Notifies this component that it no longer has a parent component.
When this method is invoked, any | |
| restore | back to summary |
|---|---|
| private void restore() Restores the Frame size. | |
| setActive | back to summary |
|---|---|
| private void setActive(boolean isActive) Updates state dependent upon the Window's active state. | |
| setState | back to summary |
|---|---|
| private void setState(int state) Sets the state of the Window. | |
| setState | back to summary |
|---|---|
| private void setState(int state, boolean updateRegardless) Sets the state of the window. If | |
| uninstall | back to summary |
|---|---|
| private void uninstall() Uninstalls the necessary state. | |
| uninstallDefaults | back to summary |
|---|---|
| private void uninstallDefaults() Uninstalls any previously installed UI values. | |
| uninstallListeners | back to summary |
|---|---|
| private void uninstallListeners() Uninstalls the necessary listeners. | |
| updateSystemIcon | back to summary |
|---|---|
| private void updateSystemIcon() Update the image used for the system icon | |
| updateToggleButton | back to summary |
|---|---|
| private void updateToggleButton(Action action, Icon icon) Updates the toggle button to contain the Icon | |
close the Window.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| CloseAction | back to summary |
|---|---|
| public CloseAction() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
iconfiy the Frame.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| IconifyAction | back to summary |
|---|---|
| public IconifyAction() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
restore the Frame.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| MaximizeAction | back to summary |
|---|---|
| public MaximizeAction() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | propertyChange(PropertyChangeEvent pce)
Implements java. This method gets called when a bound property is changed. |
| PropertyChangeHandler | back to summary |
|---|---|
| private PropertyChangeHandler() | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent pce) Implements java. Doc from java. This method gets called when a bound property is changed. | |
restore the Frame.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| RestoreAction | back to summary |
|---|---|
| public RestoreAction() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
JRootPane.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Dimension | getMinimumSize()
Overrides javax. If the minimum size has been set to a non- |
| public Dimension | getPreferredSize()
Overrides javax. If the |
| public void |
| SystemMenuBar | back to summary |
|---|---|
| private SystemMenuBar() | |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize() Overrides javax. Doc from javax. If the minimum size has been set to a non- | |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize() Overrides javax. Doc from javax. If the | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g) Overrides javax. Doc from javax. Invoked by Swing to draw components.
Applications should not invoke
This method actually delegates the work of painting to three
protected methods: | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addLayoutComponent(String name, Component c)
Implements java. If the layout manager uses a per-component string,
adds the component |
| private int | |
| public void | layoutContainer(Container c)
Implements java. Lays out the specified container. |
| public Dimension | minimumLayoutSize(Container c)
Implements java. Calculates the minimum size dimensions for the specified container, given the components it contains. |
| public Dimension | preferredLayoutSize(Container c)
Implements java. Calculates the preferred size dimensions for the specified container, given the components it contains. |
| public void | removeLayoutComponent(Component c)
Implements java. Removes the specified component from the layout. |
| TitlePaneLayout | back to summary |
|---|---|
| private TitlePaneLayout() | |
| addLayoutComponent | back to summary |
|---|---|
| public void addLayoutComponent(String name, Component c) Implements java. Doc from java. If the layout manager uses a per-component string,
adds the component | |
| computeHeight | back to summary |
|---|---|
| private int computeHeight() | |
| layoutContainer | back to summary |
|---|---|
| public void layoutContainer(Container c) Implements java. Doc from java. Lays out the specified container. | |
| minimumLayoutSize | back to summary |
|---|---|
| public Dimension minimumLayoutSize(Container c) Implements java. Doc from java. Calculates the minimum size dimensions for the specified container, given the components it contains. | |
| preferredLayoutSize | back to summary |
|---|---|
| public Dimension preferredLayoutSize(Container c) Implements java. Doc from java. Calculates the preferred size dimensions for the specified container, given the components it contains. | |
| removeLayoutComponent | back to summary |
|---|---|
| public void removeLayoutComponent(Component c) Implements java. Doc from java. Removes the specified component from the layout. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | windowActivated(WindowEvent ev)
Overrides java. Implements java. Invoked when a window is activated. |
| public void | windowDeactivated(WindowEvent ev)
Overrides java. Implements java. Invoked when a window is de-activated. |
| WindowHandler | back to summary |
|---|---|
| private WindowHandler() | |
| windowActivated | back to summary |
|---|---|
| public void windowActivated(WindowEvent ev) Overrides java. Implements java. Doc from java. Invoked when a window is activated. | |
| windowDeactivated | back to summary |
|---|---|
| public void windowDeactivated(WindowEvent ev) Overrides java. Implements java. Doc from java. Invoked when a window is de-activated. | |