JIDE 3.5.15

com.jidesoft.docking
Class Workspace

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.docking.Workspace
All Implemented Interfaces:
DockableHolder, Refocusable, ImageObserver, MenuContainer, Serializable, Accessible

public class Workspace
extends JPanel
implements DockableHolder, Refocusable

Container for document windows.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
 
Constructor Summary
Workspace()
          Default constructor.
Workspace(DockingManager dockingManager)
           
 
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
           
 Component getDefaultFocusComponent()
          Gets the default focus component.
 DockingManager getDockingManager()
          Return the DockingManager that manages the DockableHolder.
 Component getFocusedComponent()
          Gets the last subcomponent which held focus.
 String getLayoutConstraint()
          Gets the layout constraint of the Workspace.
 boolean isAcceptDockableFrame()
          Checks if this workspace can accept dockable frame.
 boolean isAdjustOpacityOnFly()
          Checks the adjustOpacityOnFly flag.
protected  void paintComponent(Graphics g)
           
 boolean requestFocusInInternalWindow()
          Requests that internal window receive focus.
 boolean requestFocusInInternalWindowNew()
           
 void setAcceptDockableFrame(boolean acceptDockableFrame)
          Sets if workspace can accept drag-n-drop dockable frame.
 void setAdjustOpacityOnFly(boolean adjustOpacityOnFly)
          Sets the adjustOpacityOnFly flag.
 void setDefaultFocusComponent(Component defaultFocusComponent)
          Sets the default focus component.
 void setDockingManager(DockingManager dockingManager)
          Sets the docking manager.
protected  void setLastFocusedComponent(Component lastFocusedComponent)
          Sets the subcomponent which currently has focus.
 void setLayoutConstraint(String layoutConstraint)
          Sets the layout constraint of the Workspace.
 void updateUI()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
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, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Workspace

public Workspace()
Default constructor.


Workspace

public Workspace(DockingManager dockingManager)
Method Detail

isAdjustOpacityOnFly

public boolean isAdjustOpacityOnFly()
Checks the adjustOpacityOnFly flag.

Returns:
true or false.

setAdjustOpacityOnFly

public void setAdjustOpacityOnFly(boolean adjustOpacityOnFly)
Sets the adjustOpacityOnFly flag. If true, the workspace will be opaque when there is no child component and be transparent when a child component is added.

Parameters:
adjustOpacityOnFly - true or false.

paintComponent

protected void paintComponent(Graphics g)
Overrides:
paintComponent in class JComponent

updateUI

public void updateUI()
Overrides:
updateUI in class JPanel

isAcceptDockableFrame

public boolean isAcceptDockableFrame()
Checks if this workspace can accept dockable frame.

Returns:
true if it can accept dockable. Otherwise, false.

setAcceptDockableFrame

public void setAcceptDockableFrame(boolean acceptDockableFrame)
Sets if workspace can accept drag-n-drop dockable frame. If you set this flag to true, you should also call dockingManager.setEasyTabDock(true) so that the dockable frame can be docked inside an empty workspace when there is no existing dockable frame.

Parameters:
acceptDockableFrame - true to accept dockable frame in workspace area.

requestFocusInInternalWindow

public boolean requestFocusInInternalWindow()
Description copied from interface: Refocusable
Requests that internal window receive focus.

Specified by:
requestFocusInInternalWindow in interface Refocusable
Returns:
was focus requested on some Component

requestFocusInInternalWindowNew

public boolean requestFocusInInternalWindowNew()

getFocusedComponent

public Component getFocusedComponent()
Gets the last subcomponent which held focus. When the container is reactivated after being deactivated, this component will get focus returned to it.

See also setLastFocusedComponent, getDefaultFocusComponent, setDefaultFocusComponent

Specified by:
getFocusedComponent in interface Refocusable
Returns:
the last-focused subcomponent

setLastFocusedComponent

protected void setLastFocusedComponent(Component lastFocusedComponent)
Sets the subcomponent which currently has focus. When the container is reactivated after being deactivated, this component will get focus returned to it.

See also getLastFocusedComponent, getDefaultFocusComponent, setDefaultFocusComponent

Parameters:
lastFocusedComponent - the last-focused subcomponent

getDefaultFocusComponent

public Component getDefaultFocusComponent()
Gets the default focus component. When the container is activated for the first time, this component will get focus.

See also setDefaultFocusComponent, getLastFocusedComponent, setLastFocusedComponent

Specified by:
getDefaultFocusComponent in interface Refocusable
Returns:
the default component.

setDefaultFocusComponent

public void setDefaultFocusComponent(Component defaultFocusComponent)
Sets the default focus component. When the container is activated for the first time, this component will get focus.

See also getDefaultFocusComponent, getLastFocusedComponent, setLastFocusedComponent

Specified by:
setDefaultFocusComponent in interface Refocusable
Parameters:
defaultFocusComponent - the default focus component.

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Overrides:
addImpl in class Container

setDockingManager

public void setDockingManager(DockingManager dockingManager)
Sets the docking manager.

Parameters:
dockingManager - the docking manager

getDockingManager

public DockingManager getDockingManager()
Description copied from interface: DockableHolder
Return the DockingManager that manages the DockableHolder. There is only one Dockingmanager allowed in each DockableHolder.

Specified by:
getDockingManager in interface DockableHolder
Returns:
the DockingManager that manages the DockableHolder.

getLayoutConstraint

public String getLayoutConstraint()
Gets the layout constraint of the Workspace. This constraint will be used to add to the JideBoxLayout. Valid constraints are FIX, FLEXIBLE and VARY. If the constraint is not valid, we will get it from the system property - "jide.workspaceConstraints". If there is no such a system property, JideBoxLayout.VARY will be used.

Returns:
the constraint.

setLayoutConstraint

public void setLayoutConstraint(String layoutConstraint)
Sets the layout constraint of the Workspace.

Parameters:
layoutConstraint - the layout constraint.
See Also:
getLayoutConstraint()

JIDE 3.5.15