public class AutoHideExpandPanel extends JPanel implements SingleDockableContainer
Auto-Hide / Auto-Expand feature is a means to save space of screen replacing a Dockable by a Button on one of the Desktop borders.
When the user clicks on the button or his mouse rolls over it, the component is shown (with an expansion animation) as if it was coming from behind the button's border.
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_EXPANDED
Constant for the Expanded property (a bound property)
|
static String |
uiClassID |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
AutoHideExpandPanel() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the state of this expand panel.
|
void |
collapse()
Collapse the expand panel (making it unvisible)
|
protected DockViewTitleBar |
createTitleBar()
creates the shared title bar for all expanded panels
|
void |
expand()
Expands the currently selected button
|
JPanel |
getBottomDragger()
Returns the component used to modify the expand panel size when expanded from the top
|
Dockable |
getDockable()
Returns the dockable this container is displaying
|
JPanel |
getLeftDragger()
Returns the component used to modify the expand panel size when expanded from the right
|
JPanel |
getRightDragger()
Returns the component used to modify the expand panel size when expanded from the right
|
DockViewTitleBar |
getTitleBar() |
JPanel |
getTopDragger()
Returns the component used to modify the expand panel size when expanded from the bottom
|
String |
getUIClassID() |
protected void |
initBorders()
Installs borders used to drag the expand panel around
|
void |
installDocking(DockingDesktop desktop)
Invoked once after creation, in order to let this component register
its DockableDragSources to the DockingDesktop, and have a reference of this
Desktop.
|
boolean |
isActive()
Returns true if this panel is the ancestor of the focused component
|
boolean |
isOptimizedDrawingEnabled() |
void |
remove(Dockable dockable)
Removes a dockable (if it was the currently expanded one)
|
void |
resetBorders()
Creates the default borders for the expand panel
|
void |
select(AutoHideButton btn)
Selects a button (may collapse a prevoiusly selected button)
|
boolean |
shouldCollapse()
Returns true if this panel agrees to beeing hidden.
|
void |
uninstallDocking(DockingDesktop desktop)
Called once, when the dockablecontainer is no longer used by the desktop,
in order to releases resources and listeners taken on
installDocking() |
getAccessibleContext, getUI, paramString, setUI, updateUIaddAncestorListener, addNotify, 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, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, validateTreeaction, 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, 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, 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, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final String uiClassID
public static final String PROPERTY_EXPANDED
public boolean isOptimizedDrawingEnabled()
isOptimizedDrawingEnabled in class JComponentpublic boolean isActive()
public boolean shouldCollapse()
During drag operations (resizing), some mouseEnter/mouseExit events can be lost. In that case, the desktop relies on this method to request collaping or not.
public JPanel getTopDragger()
public JPanel getLeftDragger()
public JPanel getBottomDragger()
public JPanel getRightDragger()
protected DockViewTitleBar createTitleBar()
public DockViewTitleBar getTitleBar()
public void resetBorders()
protected void initBorders()
public void select(AutoHideButton btn)
public void expand()
public void remove(Dockable dockable)
public void collapse()
public void uninstallDocking(DockingDesktop desktop)
DockableContainerinstallDocking().uninstallDocking in interface DockableContainerpublic void installDocking(DockingDesktop desktop)
DockableContainerbasic implementation use a single DragSource, and thus calls desk.installDockableDragSource(dragSource).
installDocking in interface DockableContainerpublic Dockable getDockable()
SingleDockableContainergetDockable in interface SingleDockableContainerpublic String getUIClassID()
getUIClassID in class JPanelpublic void clear()
This is useful when re-installing a desktop from readXml (for example, it resets dockable expand sizes)
© Copyright 2004-2013 Lilian Chamontin. All Rights Reserved.