Package com.jtattoo.plaf
Class BaseTitlePane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
com.jtattoo.plaf.BaseTitlePane
- All Implemented Interfaces:
TitlePane
,ImageObserver
,MenuContainer
,Serializable
- Direct Known Subclasses:
AcrylTitlePane
,AeroTitlePane
,AluminiumTitlePane
,BernsteinTitlePane
,FastTitlePane
,GraphiteTitlePane
,HiFiTitlePane
,LunaTitlePane
,McWinTitlePane
,MintTitlePane
,SmartTitlePane
,TextureTitlePane
This class is a modified copy of the javax.swing.plaf.metal.MetalTitlePaneUI
Class that manages a JLF awt.Window-descendant class's title bar.
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.
- Since:
- 1.4
- Version:
- 1.12 01/23/03 Author Terry Kellerman Author Michael Hagen
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
protected class
protected class
protected class
protected class
protected class
protected class
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
protected BufferedImage
protected int
static final String
Constant CLOSE="Close"protected Action
protected JButton
protected final Icon
protected JPanel
static final String
Constant ICONIFY="Iconify"protected Action
protected JButton
protected final Icon
protected JButton
static final String
Constant MAXIMIZE="Maximize"protected Action
protected final Icon
protected JMenuBar
protected final Icon
static final String
Constant PAINT_ACTIVE="paintActive"protected PropertyChangeListener
protected Action
protected final JRootPane
protected final BaseRootPaneUI
protected int
protected boolean
protected boolean
protected Window
protected WindowListener
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorDescriptionBaseTitlePane
(JRootPane root, BaseRootPaneUI ui) Constructor for BaseTitlePane. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected Rectangle
calculateMaxBounds
(Frame frame) calculateMaxBounds.protected boolean
centerButtons.void
close()
close.protected void
createActions.void
createButtons.createLayout.protected void
createMenuBar.protected WindowListener
createWindowListener.protected PropertyChangeListener
createWindowPropertyChangeListener.protected Frame
getFrame()
getFrame.protected Image
getFrameIconImage.protected int
getHorSpacing.protected int
getIconWidth.protected String
getTitle()
getTitle.protected int
getVerSpacing.protected Window
Getter for the field window.void
iconify()
iconify.protected void
installListeners.protected boolean
isActive()
isActive.protected boolean
isLeftToRight.protected boolean
isMacStyleWindowDecoration.void
maximize()
maximize.void
paintBackground.void
protected int
paintIcon.void
paintText.void
void
restore()
restore.protected void
setActive
(boolean flag) setActive.void
setAlphaTransparency
(float alpha) setAlphaTransparency.void
setCustomizedTitlePanel
(JPanel panel) setCustomizedTitlePanel.protected void
setState
(int state) Setter for the field state.protected void
setState
(int state, boolean updateRegardless) Setter for the field state.protected void
uninstallDefaults.protected void
uninstallListeners.protected void
updateMaxButton
(Action action, Icon icon) updateMaxButton.protected void
validateMaximizedBounds.Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
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, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
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, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
PAINT_ACTIVE
Constant PAINT_ACTIVE="paintActive"- See Also:
-
ICONIFY
Constant ICONIFY="Iconify"- See Also:
-
MAXIMIZE
Constant MAXIMIZE="Maximize"- See Also:
-
CLOSE
Constant CLOSE="Close"- See Also:
-
propertyChangeListener
-
closeAction
-
iconifyAction
-
restoreAction
-
maximizeAction
-
customTitlePanel
-
iconifyButton
-
maxButton
-
closeButton
-
iconifyIcon
-
maximizeIcon
-
minimizeIcon
-
closeIcon
-
windowListener
-
window
-
rootPane
-
rootPaneUI
-
buttonsWidth
protected int buttonsWidth -
state
protected int state -
wasMaximized
protected boolean wasMaximized -
wasMaximizeError
protected boolean wasMaximizeError -
backgroundImage
-
alphaValue
protected float alphaValue
-
-
Constructor Details
-
BaseTitlePane
Constructor for BaseTitlePane.
- Parameters:
root
- aJRootPane
object.ui
- aBaseRootPaneUI
object.
-
-
Method Details
-
addNotify
public void addNotify()- Overrides:
addNotify
in classJComponent
-
calculateMaxBounds
calculateMaxBounds.
-
centerButtons
protected boolean centerButtons()centerButtons.
- Returns:
- a boolean.
-
close
public void close()close.
-
createActions
protected void createActions()createActions.
-
createButtons
public void createButtons()createButtons.
-
createLayout
createLayout.
- Returns:
- a
LayoutManager
object.
-
createMenuBar
protected void createMenuBar()createMenuBar.
-
createWindowListener
createWindowListener.
- Returns:
- a
WindowListener
object.
-
createWindowPropertyChangeListener
createWindowPropertyChangeListener.
- Returns:
- a
PropertyChangeListener
object.
-
getFrame
getFrame.
- Returns:
- a
Frame
object.
-
getFrameIconImage
getFrameIconImage.
- Returns:
- a
Image
object.
-
getHorSpacing
protected int getHorSpacing()getHorSpacing.
- Returns:
- a
Integer
object.
-
getIconWidth
protected int getIconWidth()getIconWidth.
- Returns:
- a
Integer
object.
-
getRootPane
- Overrides:
getRootPane
in classJComponent
-
getTitle
getTitle.
- Returns:
- a
String
object.
-
getVerSpacing
protected int getVerSpacing()getVerSpacing.
- Returns:
- a
Integer
object.
-
getWindow
Getter for the field window.
- Returns:
- a
Window
object.
-
iconify
public void iconify()iconify.
-
installListeners
protected void installListeners()installListeners.
-
isActive
protected boolean isActive()isActive.
- Returns:
- a boolean.
-
isLeftToRight
protected boolean isLeftToRight()isLeftToRight.
- Returns:
- a boolean.
-
isMacStyleWindowDecoration
protected boolean isMacStyleWindowDecoration()isMacStyleWindowDecoration.
- Returns:
- a boolean.
-
maximize
public void maximize()maximize.
-
paintBackground
paintBackground.
- Parameters:
g
- aGraphics
object.
-
paintComponent
- Overrides:
paintComponent
in classJComponent
-
paintIcon
paintIcon.
-
paintText
paintText.
-
removeNotify
public void removeNotify()- Overrides:
removeNotify
in classJComponent
-
restore
public void restore()restore.
-
setActive
protected void setActive(boolean flag) setActive.
- Parameters:
flag
- a boolean.
-
setAlphaTransparency
public void setAlphaTransparency(float alpha) setAlphaTransparency.
- Parameters:
alpha
- a float.
-
setCustomizedTitlePanel
setCustomizedTitlePanel.
- Parameters:
panel
- aJPanel
object.
-
setState
protected void setState(int state) Setter for the field state.
- Parameters:
state
- aInteger
object.
-
setState
protected void setState(int state, boolean updateRegardless) Setter for the field state.
- Parameters:
state
- aInteger
object.updateRegardless
- a boolean.
-
uninstallDefaults
protected void uninstallDefaults()uninstallDefaults.
-
uninstallListeners
protected void uninstallListeners()uninstallListeners.
-
updateMaxButton
updateMaxButton.
-
validateMaximizedBounds
protected void validateMaximizedBounds()validateMaximizedBounds.
-