public class CContentArea extends JPanel implements CStationContainer
JFrame. This component can display
and manage some CDockables.SplitDockStation allowing
to show several CDockables at the same time. At each border a
FlapDockStation allows to show "minimized" CDockables.CContentAreas directly, they should
use CControl.getContentArea() to get the default content area, or
CControl.createContentArea(String) to create a new content area.| Modifier and Type | Class and Description |
|---|---|
static class |
CContentArea.Corner
References a corner of a panel.
|
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static Path |
TYPE_ID_CENTER
The result of
CStation.getTypeId() for the center station |
static Path |
TYPE_ID_MINIMIZE
The result of
CStation.getTypeId() for the minimize stations |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
CContentArea(CControl control,
String uniqueId)
Creates a new content area.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStationContainerListener(CStationContainerListener listener)
Adds the observer
listener to this container. |
protected void |
addStations(CStation<?>... stations)
|
void |
deploy(CGrid grid)
Exchanges all the
CDockables on the center panel by
the elements of grid. |
SplitDockStation |
getCenter()
Gets the station in the center of this
CContentArea. |
CGridArea |
getCenterArea()
Gets the station in the center of this
CContentArea. |
String |
getCenterIdentifier()
Gets the global identifier for the panel in the center.
|
static String |
getCenterIdentifier(String uniqueCenterId)
Creates the global identifier of a panel in the center.
|
Component |
getComponent()
|
CControl |
getControl()
Gets the
CControl for which this content area was created. |
Component |
getCornerComponent(CContentArea.Corner corner,
boolean horizontal)
Gets the component of a corner.
|
CStation<?> |
getDefaultStation()
Gets the preferred default
CStation of this container. |
CStation<?> |
getDefaultStation(ExtendedMode mode)
Gets the preferred default
CStation of this container for children in mode mode. |
FlapDockStation |
getEast()
Gets the station in the east of this
CContentArea |
CMinimizeArea |
getEastArea()
Gets the station in the east of this
CContentArea |
String |
getEastIdentifier()
Gets the global identifier for the panel in the east.
|
static String |
getEastIdentifier(String uniqueCenterId)
Creates the global identifier of a panel in the east.
|
CStation<?> |
getMatchingStation(CStationContainer container,
CStation<?> station)
Assuming
container is a type of CStationContainer that is known to
this, and assuming station is a child of container: this
method returns one of this children that has the same relative location in respect to this
as station has to container. |
FlapDockStation |
getNorth()
Gets the station in the north of this
CContentArea |
CMinimizeArea |
getNorthArea()
Gets the station in the north of this
CContentArea |
String |
getNorthIdentifier()
Gets the global identifier for the panel in the north.
|
static String |
getNorthIdentifier(String uniqueCenterId)
Creates the global identifier of a panel in the north.
|
FlapDockStation |
getSouth()
Gets the station in the south of this
CContentArea |
CMinimizeArea |
getSouthArea()
Gets the station in the south of this
CContentArea |
String |
getSouthIdentifier()
Gets the global identifier for the panel in the south.
|
static String |
getSouthIdentifier(String uniqueCenterId)
Creates the global identifier of a panel in the south.
|
CStation<?> |
getStation(int index)
Gets the index'th child of this container.
|
int |
getStationCount()
Gets the number of
CStations that are currently in this container. |
CStation<?>[] |
getStations()
Gets an independent array of all stations that are used on this
CContentArea. |
String |
getUniqueId()
Gets the unique id of this center.
|
FlapDockStation |
getWest()
Gets the station in the west of this
CContentArea |
CMinimizeArea |
getWestArea()
Gets the station in the west of this
CContentArea |
String |
getWestIdentifier()
Gets the global identifier for the panel in the west.
|
static String |
getWestIdentifier(String uniqueCenterId)
Creates the global identifier of a panel in the west.
|
int |
indexOf(CStation<?> child)
Gets the index of
child. |
void |
removeStationContainerListener(CStationContainerListener listener)
Removes the observer
listener from this container. |
void |
setCornerComponent(Component component,
CContentArea.Corner corner,
boolean horizontal)
Puts
component in one corner of this area. |
void |
setMinimumAreaSize(Dimension size)
Sets the minimum size of the four areas in which minimized
Dockables
are shown. |
getAccessibleContext, getUI, getUIClassID, 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, 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, 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, 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 Path TYPE_ID_CENTER
CStation.getTypeId() for the center stationpublic static final Path TYPE_ID_MINIMIZE
CStation.getTypeId() for the minimize stationsprotected void addStations(CStation<?>... stations)
stations - the additional stations to storepublic String getUniqueId()
getUniqueId in interface CStationContainerpublic Component getComponent()
CStationContainergetComponent in interface CStationContainerCStations, not nullpublic void addStationContainerListener(CStationContainerListener listener)
CStationContainerlistener to this container. The listener is to be informed
whenever a CStation is added or removed from this container.addStationContainerListener in interface CStationContainerlistener - the new listener, not nullpublic void removeStationContainerListener(CStationContainerListener listener)
CStationContainerlistener from this container.removeStationContainerListener in interface CStationContainerlistener - the listener to removepublic CControl getControl()
CControl for which this content area was created.public CStation<?>[] getStations()
CContentArea.public int getStationCount()
CStationContainerCStations that are currently in this container.getStationCount in interface CStationContainerpublic CStation<?> getStation(int index)
CStationContainergetStation in interface CStationContainerindex - the index of the child, between 0 and CStationContainer.getStationCount()nullpublic int indexOf(CStation<?> child)
child.child - a child CStation of this area.child or -1 if not foundpublic CStation<?> getDefaultStation()
CStationContainerCStation of this container. Children with no location
are usually made visible on such a default station.getDefaultStation in interface CStationContainernullpublic CStation<?> getDefaultStation(ExtendedMode mode)
CStationContainerCStation of this container for children in mode mode.getDefaultStation in interface CStationContainermode - the mode for which a station is searchedCStationContainer that can show Dockables in mode mode,
can be nullpublic void deploy(CGrid grid)
CDockables on the center panel by
the elements of grid.grid - a grid containing some new Dockablespublic void setCornerComponent(Component component, CContentArea.Corner corner, boolean horizontal)
component in one corner of this area.component - the component, can be nullcorner - the corner into which to put componenthorizontal - whether component should be horizontally
or vertically.public Component getCornerComponent(CContentArea.Corner corner, boolean horizontal)
corner - the corner in which to searchhorizontal - whether the component is horizontally or verticallynullpublic void setMinimumAreaSize(Dimension size)
Dockables
are shown. Clients could also call get'Side'().setMinimumSize( size ).getMinimumAreaSize because the result might
not be the same for all stations.size - the new minimum size or null to revert to the default
value.FlapDockStation.setMinimumSize(Dimension),
FlapDockStation.MINIMUM_SIZEpublic SplitDockStation getCenter()
CContentArea.public CGridArea getCenterArea()
CContentArea.public FlapDockStation getNorth()
CContentAreapublic CMinimizeArea getNorthArea()
CContentAreapublic FlapDockStation getSouth()
CContentAreapublic CMinimizeArea getSouthArea()
CContentAreapublic FlapDockStation getEast()
CContentAreapublic CMinimizeArea getEastArea()
CContentAreapublic FlapDockStation getWest()
CContentAreapublic CMinimizeArea getWestArea()
CContentAreapublic String getCenterIdentifier()
public static String getCenterIdentifier(String uniqueCenterId)
uniqueCenterId - the unique if of the owning CContentArea.public String getNorthIdentifier()
public static String getNorthIdentifier(String uniqueCenterId)
uniqueCenterId - the unique id of the owning CContentArea.public String getSouthIdentifier()
public static String getSouthIdentifier(String uniqueCenterId)
uniqueCenterId - the unique id of the owning CContentArea.public String getEastIdentifier()
public static String getEastIdentifier(String uniqueCenterId)
uniqueCenterId - the unique id of the owning CContentArea.public String getWestIdentifier()
public static String getWestIdentifier(String uniqueCenterId)
uniqueCenterId - the unique id of the owning CContentArea.public CStation<?> getMatchingStation(CStationContainer container, CStation<?> station)
CStationContainercontainer is a type of CStationContainer that is known to
this, and assuming station is a child of container: this
method returns one of this children that has the same relative location in respect to this
as station has to container. For example if station is the
center area of a CGridArea, and this is a CGridArea as well, then
this method would return the center area of this.getMatchingStation in interface CStationContainercontainer - some kind of CStationContainer, may be a type that is known to this
or not.station - some child of containerthis, such that the location of the child in relation to this is
equivalent to the location of station in relation to container. A value of
null indicates that this method did not find a suitable child. If possible the result of this method
and station should be of the same type.Copyright © 2018. All rights reserved.