public class CMinimizeArea extends javax.swing.JPanel implements CStation<CFlapDockStation>
CDockable
s can be stored in their minimized state. This class is a subclass of JPanel
and
can be added anywhere in any frame or dialog. This JPanel
uses a BorderLayout
and clients may add
additional Component
s to it, the Component
s the size and location of the opening window will always
depend on this JPanel
.javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static Path |
TYPE_ID
The result of
getTypeId() |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
protected |
CMinimizeArea()
Default constructor doing nothing, subclasses must call
init(CControl, String)
after calling this method |
|
CMinimizeArea(CControl control,
java.lang.String uniqueId)
Creates a new minimize area.
|
Modifier and Type | Method and Description |
---|---|
CDockable |
asDockable()
|
CStationPerspective |
createPerspective()
Returns a new
CStationPerspective that represents this station. |
CLocation |
getDropLocation()
|
CFlapDockStation |
getStation()
Gets the internal representation of this
CStation . |
CLocation |
getStationLocation()
Gets a location which represents directly
CStation.getStation() . |
Path |
getTypeId()
Gets a unique path denoting the type of this station.
|
java.lang.String |
getUniqueId()
Gets the unique uniqueId of this area.
|
protected void |
init(CControl control,
java.lang.String uniqueId)
Initializes the new area, should be called only once by subclasses
|
boolean |
isWorkingArea()
Tells whether this station is a special working area or not.
|
void |
setControlAccess(CControlAccess access)
|
void |
setDirection(FlapDockStation.Direction direction)
Sets the direction into which the tab opens.
|
getAccessibleContext, getUI, getUIClassID, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, 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 Path TYPE_ID
getTypeId()
public CMinimizeArea(CControl control, java.lang.String uniqueId)
control
- the control for which this area will be useduniqueId
- the unique uniqueId of this areaprotected CMinimizeArea()
init(CControl, String)
after calling this methodprotected void init(CControl control, java.lang.String uniqueId)
control
- the control for which this area will be useduniqueId
- the unique uniqueId of this areapublic void setControlAccess(CControlAccess access)
CStation
CControl
when this CStation
is added or removed.
There are two actions which most stations might want to do:add
methods for ModeArea
s accessible through the CLocationModeManager
.
That will ensure that the station can be used as minimize/normalize/... area.ResizeRequestListener
to CControl
in order to be
informed when resize requests are to be handled.setControlAccess
in interface CStation<CFlapDockStation>
access
- access to the internals of the CControl
that uses
this station or null
to remove all ties from a controlpublic java.lang.String getUniqueId()
getUniqueId
in interface CStation<CFlapDockStation>
public Path getTypeId()
CStation
MissingPerspectiveStrategy.createStation(String, Path)
when loading a layout
as a CPerspective
.getTypeId
in interface CStation<CFlapDockStation>
null
will just be ignored.public CFlapDockStation getStation()
CStation
CStation
.getStation
in interface CStation<CFlapDockStation>
public CStationPerspective createPerspective()
CStation
CStationPerspective
that represents this
station. This method
does not need to set any content of the new perspective. Basically this method just needs to tell
the framework what type of CStationPerspective
is needed, not what its content is.createPerspective
in interface CStation<CFlapDockStation>
CStation.getTypeId()
public CLocation getStationLocation()
CStation
CStation.getStation()
.getStationLocation
in interface CStation<CFlapDockStation>
station
public CLocation getDropLocation()
CStation
CLocation
that can be used to drop a new CDockable
on this station
or one of its children stations. This method returns the "optimal spot", where the definition
of "optimal spot" is up to the station itself. The default implementations however call
CLocationModeManager.getDropLocation(CStation)
.getDropLocation
in interface CStation<CFlapDockStation>
CDockable
or null
if this
station is not able to calculate the optimal spot (e.g. because the station is not visible)CDockable.setLocationsAside(CDockable)
,
CDockable.setLocationsAsideFocused()
public boolean isWorkingArea()
CStation
CControl.addStation(CStation, boolean)
)
or must be a SingleCDockable
.isWorkingArea
in interface CStation<CFlapDockStation>
true
if this is a working area, false
otherwisepublic CDockable asDockable()
CStation
CDockable
as well, then this method returns
the representation of this station as CDockable
.asDockable
in interface CStation<CFlapDockStation>
null
public void setDirection(FlapDockStation.Direction direction)
direction
- the direction or null
to let the system
decide automatically