java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.plaf.basic.BasicInternalFrameTitlePanepublic class BasicInternalFrameTitlePane extends JComponent class BasicInternalFrameTitlePane.CloseAction class BasicInternalFrameTitlePane.IconifyAction class BasicInternalFrameTitlePane.MaximizeAction class BasicInternalFrameTitlePane.MoveAction class BasicInternalFrameTitlePane.PropertyChangeHandler class BasicInternalFrameTitlePane.RestoreAction class BasicInternalFrameTitlePane.SizeAction class BasicInternalFrameTitlePane.SystemMenuBar class BasicInternalFrameTitlePane.TitlePaneLayout protected static String ICONIFY_CMD protected static String MAXIMIZE_CMD protected static String RESTORE_CMD protected Action closeAction protected JButton closeButton protected JInternalFrame frame protected JButton iconButton protected Action iconifyAction protected Action maximizeAction protected Action moveAction protected Color notSelectedTextColor protected Color notSelectedTitleColor protected PropertyChangeListener propertyChangeListener protected Action restoreAction protected Color selectedTextColor protected Color selectedTitleColor protected Action sizeAction protected JMenu windowMenu BasicInternalFrameTitlePane(JInternalFrame f)protected void addSubComponents()protected void addSystemMenuItems(JMenu systemMenu)protected void assembleSystemMenu()protected void createActions()protected void createButtons()protected LayoutManager createLayout()protected PropertyChangeListener createPropertyChangeListener()protected JMenu createSystemMenu()protected JMenuBar createSystemMenuBar()protected void enableActions()protected String getTitle(String text, FontMetrics fm, int availableWidth)protected void installDefaults()protected void installListeners()protected void installTitlePane() void paintComponent(Graphics g)protected void paintTitleBackground(Graphics g)protected void postClosingEvent(JInternalFrame frame)protected void setButtonIcons()protected void showSystemMenu()protected void uninstallDefaults()protected void uninstallListeners()addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, extends EventListener> T[] getListeners, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, extends EventListener> T[] getListeners, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, extends EventListener> T[] getListeners, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusable, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate protected Action iconifyAction
The action associated with iconifying the JInternalFrame.
protected Action maximizeAction
The action associated with maximizing the JInternalFrame.
protected Color notSelectedTextColor
The text color of the TitlePane when the JInternalFrame is not selected.
protected Color notSelectedTitleColor
The background color of the TitlePane when the JInternalFrame is not selected.
protected PropertyChangeListener propertyChangeListener
The Property Change listener that listens to the JInternalFrame.
protected Action restoreAction
The action associated with restoring the JInternalFrame.
protected Color selectedTextColor
The text color of the titlePane when the JInternalFrame is selected.
protected Color selectedTitleColor
The background color of the TitlePane when the JInternalFrame is selected.
public BasicInternalFrameTitlePane(JInternalFrame f)
Creates a new BasicInternalFrameTitlePane object that is used in the given JInternalFrame.
- Parameters:
f- The JInternalFrame this BasicInternalFrameTitlePane will be used in.
protected void addSubComponents()
This method adds the sub components to the TitlePane.
protected void addSystemMenuItems(JMenu systemMenu)
This method adds the MenuItems to the given JMenu.
- Parameters:
systemMenu- The JMenu to add MenuItems to.
protected void assembleSystemMenu()
This method creates the MenuBar used in the TitlePane.
protected void createActions()
This method creates the actions that are used to manipulate the JInternalFrame.
protected LayoutManager createLayout()
This method creates a new LayoutManager for the TitlePane.
- Returns:
- A new LayoutManager.
protected PropertyChangeListener createPropertyChangeListener()
This method creates a new PropertyChangeListener.
- Returns:
- A new PropertyChangeListener.
protected JMenu createSystemMenu()
This method creates a new JMenu.
- Returns:
- A new JMenu.
protected JMenuBar createSystemMenuBar()
This method creates a new JMenubar.
- Returns:
- A new JMenuBar.
protected void enableActions()
This method enables the actions for the TitlePane given the frame's properties.
protected String getTitle(String text, FontMetrics fm, int availableWidth)
This method returns the title string based on the available width and the font metrics.
- Parameters:
text- The desired title.fm- The FontMetrics of the font used.availableWidth- The available width.
- Returns:
- The allowable string.
protected void installDefaults()
This method installs the defaults determined by the look and feel.
protected void installTitlePane()
This method installs the TitlePane onto the JInternalFrameTitlePane. It also creates any children components that need to be created and adds listeners to the appropriate components.
public void paintComponent(Graphics g)
This method paints the TitlePane.
- Overrides:
- paintComponent in interface JComponent
- Parameters:
g- The Graphics object to paint with.
protected void paintTitleBackground(Graphics g)
This method paints the TitlePane's background.
- Parameters:
g- The Graphics object to paint with.
protected void postClosingEvent(JInternalFrame frame)
This method fires something similar to a WINDOW_CLOSING event.
- Parameters:
frame- The JInternalFrame that is being closed.
protected void setButtonIcons()
Set icons for the minimize-, maximize- and close-buttons.
protected void uninstallListeners()
This method is used to uninstall the listeners.