javax.swing.plaf.basic
public class BasicInternalFrameTitlePane extends JComponent
Modifier and Type | Class and Description |
---|---|
class |
BasicInternalFrameTitlePane.CloseAction
The Action responsible for closing the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.IconifyAction
This Action is responsible for iconifying the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.MaximizeAction
This Action is responsible for maximizing the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.MoveAction
This Action is responsible for dragging the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.PropertyChangeHandler
This class is responsible for handling property change events from the
JInternalFrame and adjusting the Title Pane as necessary.
|
class |
BasicInternalFrameTitlePane.RestoreAction
This Action is responsible for restoring the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.SizeAction
This action is responsible for sizing the JInternalFrame.
|
class |
BasicInternalFrameTitlePane.SystemMenuBar
This class acts as the MenuBar for the TitlePane.
|
class |
BasicInternalFrameTitlePane.TitlePaneLayout
This class acts as the Layout Manager for the TitlePane.
|
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected static String |
CLOSE_CMD
The action command for the Close action.
|
protected Action |
closeAction
The action associated with closing the JInternalFrame.
|
protected JButton |
closeButton
The button that closes the JInternalFrame.
|
protected Icon |
closeIcon
The icon displayed in the close button.
|
protected JInternalFrame |
frame
The JInternalFrame that this TitlePane is used in.
|
protected JButton |
iconButton
The button that iconifies the JInternalFrame.
|
protected Icon |
iconIcon
The icon displayed in the iconify button.
|
protected static String |
ICONIFY_CMD
The action command for the Minimize action.
|
protected Action |
iconifyAction
The action associated with iconifying the JInternalFrame.
|
protected JButton |
maxButton
The button that maximizes the JInternalFrame.
|
protected Icon |
maxIcon
The icon displayed in the maximize button.
|
protected static String |
MAXIMIZE_CMD
The action command for the Maximize action.
|
protected Action |
maximizeAction
The action associated with maximizing the JInternalFrame.
|
protected JMenuBar |
menuBar
The JMenuBar that is located at the top left of the Title Pane.
|
protected Icon |
minIcon
The icon displayed in the restore button.
|
protected static String |
MOVE_CMD
The action command for the Move action.
|
protected Action |
moveAction
The action associated with moving 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 static String |
RESTORE_CMD
The action command for the Restore action.
|
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.
|
protected static String |
SIZE_CMD
The action command for the Size action.
|
protected Action |
sizeAction
The action associated with resizing the JInternalFrame.
|
protected JMenu |
windowMenu
The JMenu inside the menuBar.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
BasicInternalFrameTitlePane(JInternalFrame f)
Creates a new BasicInternalFrameTitlePane object that is used in the
given JInternalFrame.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 void |
createButtons()
This method creates the buttons used in the TitlePane.
|
protected LayoutManager |
createLayout()
This method creates a new LayoutManager for the TitlePane.
|
protected PropertyChangeListener |
createPropertyChangeListener()
This method creates a new PropertyChangeListener.
|
protected JMenu |
createSystemMenu()
This method creates a new JMenu.
|
protected JMenuBar |
createSystemMenuBar()
This method creates 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.
|
protected void |
installDefaults()
This method installs the defaults determined by the look and feel.
|
protected void |
installListeners()
This method is used to install the listeners.
|
protected void |
installTitlePane()
This method installs the TitlePane onto the JInternalFrameTitlePane.
|
void |
paintComponent(Graphics g)
This method paints the TitlePane.
|
protected void |
paintTitleBackground(Graphics g)
This method paints the TitlePane's background.
|
protected void |
postClosingEvent(JInternalFrame frame)
This method fires something similar to a WINDOW_CLOSING event.
|
protected void |
setButtonIcons()
Set icons for the minimize-, maximize- and close-buttons.
|
protected void |
showSystemMenu()
This method programmatically shows the JMenu.
|
protected void |
uninstallDefaults()
This method uninstalls the defaults.
|
protected void |
uninstallListeners()
This method is used to uninstall the listeners.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, getListeners, 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, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static final String ICONIFY_CMD
protected static final String MAXIMIZE_CMD
protected static final String RESTORE_CMD
protected Action closeAction
protected Action iconifyAction
protected Action maximizeAction
protected Action moveAction
protected Action restoreAction
protected Action sizeAction
protected JButton closeButton
protected JButton iconButton
protected JInternalFrame frame
protected JMenu windowMenu
protected Color notSelectedTextColor
protected Color notSelectedTitleColor
protected Color selectedTextColor
protected Color selectedTitleColor
protected PropertyChangeListener propertyChangeListener
public BasicInternalFrameTitlePane(JInternalFrame f)
f
- The JInternalFrame this BasicInternalFrameTitlePane will be used
in.protected void installTitlePane()
protected void addSubComponents()
protected void createActions()
protected void installListeners()
protected void uninstallListeners()
protected void installDefaults()
protected void uninstallDefaults()
protected void createButtons()
protected void setButtonIcons()
protected void assembleSystemMenu()
protected void addSystemMenuItems(JMenu systemMenu)
systemMenu
- The JMenu to add MenuItems to.protected JMenuBar createSystemMenuBar()
protected JMenu createSystemMenu()
protected void showSystemMenu()
public void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- The Graphics object to paint with.JComponent.paint(java.awt.Graphics)
,
JComponent.paintBorder(java.awt.Graphics)
,
JComponent.paintChildren(java.awt.Graphics)
protected void paintTitleBackground(Graphics g)
g
- The Graphics object to paint with.protected String getTitle(String text, FontMetrics fm, int availableWidth)
text
- The desired title.fm
- The FontMetrics of the font used.availableWidth
- The available width.protected void postClosingEvent(JInternalFrame frame)
frame
- The JInternalFrame that is being closed.protected void enableActions()
protected PropertyChangeListener createPropertyChangeListener()
protected LayoutManager createLayout()