com.imagero.gui.flowin
Class TitleBar
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
com.imagero.gui.flowin.BasicTitleBar
com.imagero.gui.flowin.TitleBar
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, SortableContainer
- public class TitleBar
- extends BasicTitleBar
- implements SortableContainer
TitleBar for FloatingWindow
- See Also:
- Serialized Form
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, 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 |
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 |
| Methods inherited from class com.imagero.gui.flowin.BasicTitleBar |
add, add, add, add, addImpl, checkComponentPosition, defineComponentPosition, getAxis, getButton, getComponent, getComponentsOrdered, isPalette, remove, setLayout |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, list, list, paintComponents, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enableEvents, enableInputMethods, 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, getMouseWheelListeners, getName, getParent, getSize, getToolkit, getTreeLock, hasFocus, imageUpdate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, list, list, list, paintAll, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
active
protected boolean active
armed
protected boolean armed
closable
protected boolean closable
CLOSE
public static final java.lang.String CLOSE
- See Also:
- Constant Field Values
DOCK
public static final java.lang.String DOCK
- See Also:
- Constant Field Values
dockable
protected boolean dockable
docked
protected boolean docked
GLUE
public static final java.lang.String GLUE
- See Also:
- Constant Field Values
maximizable
protected boolean maximizable
MAXIMIZE
public static final java.lang.String MAXIMIZE
- See Also:
- Constant Field Values
maximized
protected boolean maximized
minimizable
protected boolean minimizable
MINIMIZE
public static final java.lang.String MINIMIZE
- See Also:
- Constant Field Values
RESTORE
public static final java.lang.String RESTORE
- See Also:
- Constant Field Values
SYSTEM
public static final java.lang.String SYSTEM
- See Also:
- Constant Field Values
TITLE
public static final java.lang.String TITLE
- See Also:
- Constant Field Values
UNDOCK
public static final java.lang.String UNDOCK
- See Also:
- Constant Field Values
TitleBar
public TitleBar()
- create horizontal TitleBar
TitleBar
public TitleBar(int axis)
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
checkPositions
protected void checkPositions()
createTitleLabel
protected void createTitleLabel()
definePositions
protected void definePositions()
doLayout
public void doLayout()
- Description copied from class:
java.awt.Container
- Causes this container to lay out its components. Most programs
should not call this method directly, but should invoke
the
validate method instead.
- See Also:
LayoutManager.layoutContainer(java.awt.Container),
Container.setLayout(java.awt.LayoutManager),
Container.validate()
getCloseButton
public javax.swing.AbstractButton getCloseButton()
getComparator
public java.util.Comparator getComparator()
- Description copied from interface:
SortableContainer
- Get Comparator used to sort Components.
If this method returns null,
then Components should be in their natural order.
- Specified by:
getComparator in interface SortableContainer- Overrides:
getComparator in class BasicTitleBar
getDockButton
public javax.swing.AbstractButton getDockButton()
getGlueLabel
public javax.swing.JLabel getGlueLabel()
getMaximizeButton
public javax.swing.AbstractButton getMaximizeButton()
getMinimizeButton
public javax.swing.AbstractButton getMinimizeButton()
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Description copied from class:
javax.swing.JComponent
- If the minimum size has been set to a non-
null value
just returns it. If the UI delegate's getMinimumSize
method returns a non-null value then return that; otherwise
defer to the component's layout manager.
- Returns:
- the value of the
minimumSize property - See Also:
JComponent.setMinimumSize(java.awt.Dimension),
ComponentUI
getPopup
public javax.swing.JPopupMenu getPopup()
getRestoreButton
public javax.swing.AbstractButton getRestoreButton()
getSystemButton
public javax.swing.AbstractButton getSystemButton()
getUI
public TitleBarUI getUI()
getUIClassID
public java.lang.String getUIClassID()
- Description copied from class:
javax.swing.JComponent
- Returns the
UIDefaults key used to
look up the name of the swing.plaf.ComponentUI
class that defines the look and feel
for this component. Most applications will never need to
call this method. Subclasses of JComponent that support
pluggable look and feel should override this method to
return a UIDefaults key that maps to the
ComponentUI subclass that defines their look and feel.
- Returns:
- the
UIDefaults key for a
ComponentUI subclass - See Also:
UIDefaults.getUI(javax.swing.JComponent)
getUndockButton
public javax.swing.AbstractButton getUndockButton()
isActive
public boolean isActive()
- Determine if this tool bar is currently active.
(Active tool bar is usually highlighted).
- Returns:
isArmed
public boolean isArmed()
- true if TitleBar is armed (e.g. if FloatingWindow can be docked)
- Returns:
- true if TitleBar is armed
isClockwise
public boolean isClockwise()
isClosable
public boolean isClosable()
isDockable
public boolean isDockable()
isMaximizable
public boolean isMaximizable()
isMaximized
public boolean isMaximized()
isMinimizable
public boolean isMinimizable()
isShowTitle
public boolean isShowTitle()
processEvent
public void processEvent(java.awt.event.ActionEvent e)
removeActionListener
public void removeActionListener(java.awt.event.ActionListener l)
setActive
public void setActive(boolean active)
- Sets active state of this title bar.
Ignored if isPalette() returns true.
- Parameters:
active -
setArmed
public void setArmed(boolean armed)
- set or clear armed state for TitleBar
- Parameters:
armed - boolean
setAxis
public void setAxis(int axis)
- Overrides:
setAxis in class BasicTitleBar
setClockwise
public void setClockwise(boolean clockwise)
setClosable
public void setClosable(boolean closable)
setCloseButton
public void setCloseButton(javax.swing.AbstractButton closeButton)
setDockable
public void setDockable(boolean b)
setDockButton
public void setDockButton(javax.swing.AbstractButton dockButton)
setDocked
public void setDocked(boolean b)
setGlueLabel
public void setGlueLabel(javax.swing.JLabel label)
setMaximizable
public void setMaximizable(boolean maximizable)
setMaximizeButton
public void setMaximizeButton(javax.swing.AbstractButton maximizeButton)
setMaximized
public void setMaximized(boolean b)
setMinimizable
public void setMinimizable(boolean minimizable)
setMinimizeButton
public void setMinimizeButton(javax.swing.AbstractButton minimizeButton)
setPalette
public void setPalette(boolean palette)
- Overrides:
setPalette in class BasicTitleBar
setPopup
public void setPopup(javax.swing.JPopupMenu popup)
setRestoreButton
public void setRestoreButton(javax.swing.AbstractButton restoreButton)
setShowTitle
public void setShowTitle(boolean showTitle)
setSystemButton
public void setSystemButton(javax.swing.AbstractButton systemButton)
setSystemIcon
public void setSystemIcon(javax.swing.Icon icon)
setTitle
public void setTitle(java.lang.String title)
setUndockButton
public void setUndockButton(javax.swing.AbstractButton undockButton)
updateUI
public void updateUI()
- Description copied from class:
javax.swing.JComponent
- Resets the UI property to a value from the current look and feel.
JComponent subclasses must override this method
like this:
public void updateUI() {
setUI((SliderUI)UIManager.getUI(this);
}
- See Also:
JComponent.setUI(javax.swing.plaf.ComponentUI),
UIManager.getLookAndFeel(),
UIManager.getUI(javax.swing.JComponent)