public class AutoHideExpandPanel extends javax.swing.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.
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_EXPANDED
Constant for the Expanded property (a bound property)
|
static java.lang.String |
uiClassID |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
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
|
javax.swing.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
|
javax.swing.JPanel |
getLeftDragger()
Returns the component used to modify the expand panel size when expanded from the right
|
javax.swing.JPanel |
getRightDragger()
Returns the component used to modify the expand panel size when expanded from the right
|
DockViewTitleBar |
getTitleBar() |
javax.swing.JPanel |
getTopDragger()
Returns the component used to modify the expand panel size when expanded from the bottom
|
java.lang.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, updateUI
addAncestorListener, 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, update
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
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, 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, transferFocusUpCycle
public static final java.lang.String uiClassID
public static final java.lang.String PROPERTY_EXPANDED
public boolean isOptimizedDrawingEnabled()
isOptimizedDrawingEnabled
in class javax.swing.JComponent
public 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 javax.swing.JPanel getTopDragger()
public javax.swing.JPanel getLeftDragger()
public javax.swing.JPanel getBottomDragger()
public javax.swing.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)
DockableContainer
installDocking().
uninstallDocking
in interface DockableContainer
public void installDocking(DockingDesktop desktop)
DockableContainer
basic implementation use a single DragSource, and thus calls desk.installDockableDragSource(dragSource).
installDocking
in interface DockableContainer
public Dockable getDockable()
SingleDockableContainer
getDockable
in interface SingleDockableContainer
public java.lang.String getUIClassID()
getUIClassID
in class javax.swing.JPanel
public void clear()
This is useful when re-installing a desktop from readXml (for example, it resets dockable expand sizes)
Copyright © 2010-2014 Pacific Biosciences. All Rights Reserved.