## com.bbn.openmap.gui.dock
Class BasicDockPanel

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JLayeredPane
                      com.bbn.openmap.gui.dock.BasicDockPanel

All Implemented Interfaces:
  javax.accessibility.Accessible, DockPanel, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class BasicDockPanel
extends javax.swing.JLayeredPane
implements DockPanel

A component that has a background component and docking children.

Since:
  12/5/02
Version:
  $Revision: 1.2.2.2 $ on $Date: 2005/08/09 17:59:30 $
Author:
  Ben Lubin
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JLayeredPane
`javax.swing.JLayeredPane.AccessibleJLayeredPane`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary

Fields inherited from class javax.swing.JLayeredPane
`DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER`

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 com.bbn.openmap.gui.dock.DockPanel
`BACKGROUND`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`BasicDockPanel()`

Method Summary
`java.awt.Component` `add(java.awt.Component comp)` We need to handle adding the component specially.
`void` `add(java.awt.Component comp, java.lang.Object constraints)` We need to handle adding the component specially.
`protected void` `dock(DockWrapper outter, DockWrapper inner)` Dock the given child onto the given parent, which is itself a child of this class.
`protected void` `dock(DockWrapper outter, DockWrapper inner, int idx)` Dock the given child onto the given parent, which is itself a child of this class.
`void` `dock(javax.swing.JComponent outter, javax.swing.JComponent inner)` Dock the given child onto the given parent, which is itself a child of this class.
`void` `dock(javax.swing.JComponent outter, javax.swing.JComponent inner, int idx)` Dock the given child onto the given parent, which is itself a child of this class.
`protected void` `dockEast(DockWrapper wrapper)`
`protected void` `dockEast(DockWrapper wrapper, int idx)` Dock the given child into the given position on the MapPanel
`void` `dockEast(javax.swing.JComponent child)` Dock child on the DockPanel.
`void` `dockEast(javax.swing.JComponent child, int idx)` Dock the given child into the given position on the DockPanel
`protected void` `dockNorth(DockWrapper wrapper)`
`protected void` `dockNorth(DockWrapper wrapper, int idx)` Dock the given child into the given position on the MapPanel
`void` `dockNorth(javax.swing.JComponent child)` Dock child on the DockPanel.
`void` `dockNorth(javax.swing.JComponent child, int idx)` Dock the given child into the given position on the DockPanel
`protected void` `dockSomewhere(DockWrapper wrapper)` Dock the given child somewhere...
`void` `dockSomewhere(javax.swing.JComponent child)` Dock the given child somewhere...
`protected void` `dockSouth(DockWrapper wrapper)`
`protected void` `dockSouth(DockWrapper wrapper, int idx)` Dock the given child into the given position on the MapPanel
`void` `dockSouth(javax.swing.JComponent child)` Dock child on the DockPanel.
`void` `dockSouth(javax.swing.JComponent child, int idx)` Dock the given child into the given position on the DockPanel
`protected void` `dockWest(DockWrapper wrapper)`
`protected void` `dockWest(DockWrapper wrapper, int idx)` Dock the given child into the given position on the MapPanel
`void` `dockWest(javax.swing.JComponent child)` Dock child on the DockPanel.
`void` `dockWest(javax.swing.JComponent child, int idx)` Dock the given child into the given position on the DockPanel
`protected void` `externalFrame(DockWrapper wrapper)` Set the component to an internal frame
`void` `externalFrame(javax.swing.JComponent child)` Set the component to an external frame
`protected void` `freeWrapper(DockWrapper w)` Remove the wrapper from wherever it is currently
`javax.swing.JComponent` `getBackgroundComponent()` Get the background component.
`DockConstraint` `getConstraint(javax.swing.JComponent child)` Get the constraint on the given child.
`protected DockWrapper` `getEast()`
`protected DockWrapper` `getNorth()`
`protected int` `getOverlapTolerance()`
`protected DockWrapper` `getSouth()`
`protected DockWrapper` `getWest()`
`protected DockWrapper` `getWrapper(javax.swing.JComponent child)`
`protected void` `internalFrame(DockWrapper wrapper)` Set the component to an internal frame
`void` `internalFrame(javax.swing.JComponent child)` Set the component to an internal frame
`void` `remove(java.awt.Component comp)`
`void` `removeAll()`
`void` `removeConstraint(javax.swing.JComponent child)` Remove a constraint on a child.
`protected void` `removeWrapper(DockWrapper wrapper)`
`void` `setBackgroundComponent(javax.swing.JComponent back)` Set the background component.
`void` `setCanClose(javax.swing.JComponent child, boolean b)` Set that the child can be closed.
`void` `setCanDockEast(javax.swing.JComponent child, boolean b)` Set that the child can dock on the top-level east.
`void` `setCanDockNorth(javax.swing.JComponent child, boolean b)` Set that the child can dock on the top-level north.
`void` `setCanDockSouth(javax.swing.JComponent child, boolean b)` Set that the child can dock on the top-level south.
`void` `setCanDockWest(javax.swing.JComponent child, boolean b)` Set that the child can dock on the top-level west.
`void` `setCanExternalFrame(javax.swing.JComponent child, boolean b)` Set that the child can be become an external frame.
`void` `setCanInternalFrame(javax.swing.JComponent child, boolean b)` Set that the child can be become an internal frame.
`void` `setCanOcclude(javax.swing.JComponent child, boolean b)` Set that the given child can sit in front of the background component, without forcing the background component to be resized to make room.
`void` `setCanResize(javax.swing.JComponent child, boolean b)` Set that the child component can be user-resized.
`void` `setCanTab(javax.swing.JComponent child, boolean b)` Set that the child component can be tabbed up, if docked in the same location as othe tab-able components.
`void` `setCanTransparent(javax.swing.JComponent child, boolean b)` Set the child component to have a transparent background.
`void` `setConstraint(javax.swing.JComponent child, DockConstraint c)` Set the constraint on the given child.
`void` `setPreferredHeight(javax.swing.JComponent child, int i)` Set the childs preferred height.
`void` `setPreferredWidth(javax.swing.JComponent child, int i)` Set the childs preferred width.
`void` `setTabName(javax.swing.JComponent child, java.lang.String tabName)` Set the name of the tab to use when the component is tabbed (if it can tab).
`protected void` `setWrapper(javax.swing.JComponent child, DockWrapper w)`

Methods inherited from class javax.swing.JLayeredPane
`addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, setLayer, setLayer, setPosition`

Methods inherited from class javax.swing.JComponent

`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI`

Methods inherited from class java.awt.Container

`add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

### BasicDockPanel

    public BasicDockPanel()

Method Detail

### getBackgroundComponent

    public javax.swing.JComponent getBackgroundComponent()

  Description copied from interface: `DockPanel`
  Get the background component.

  Specified by:
    `getBackgroundComponent` in interface `DockPanel`

### setBackgroundComponent

    public void setBackgroundComponent(javax.swing.JComponent back)

  Description copied from interface: `DockPanel`
  Set the background component.

  Specified by:
    `setBackgroundComponent` in interface `DockPanel`

### setConstraint

    public void setConstraint(javax.swing.JComponent child,
                              DockConstraint c)

  Description copied from interface: `DockPanel`
  Set the constraint on the given child.

  Specified by:
    `setConstraint` in interface `DockPanel`

### getConstraint

    public DockConstraint getConstraint(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Get the constraint on the given child.

  Specified by:
    `getConstraint` in interface `DockPanel`

### removeConstraint

    public void removeConstraint(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Remove a constraint on a child.

  Specified by:
    `removeConstraint` in interface `DockPanel`

### setPreferredHeight

    public void setPreferredHeight(javax.swing.JComponent child,
                                   int i)

  Description copied from interface: `DockPanel`
  Set the childs preferred height.

  Specified by:
    `setPreferredHeight` in interface `DockPanel`

### setPreferredWidth

    public void setPreferredWidth(javax.swing.JComponent child,
                                  int i)

  Description copied from interface: `DockPanel`
  Set the childs preferred width.

  Specified by:
    `setPreferredWidth` in interface `DockPanel`

### setCanOcclude

    public void setCanOcclude(javax.swing.JComponent child,
                              boolean b)

  Description copied from interface: `DockPanel`
  Set that the given child can sit in front of the background component, without forcing the background component to be resized to make room.

  Specified by:
    `setCanOcclude` in interface `DockPanel`

### setCanTransparent

    public void setCanTransparent(javax.swing.JComponent child,
                                  boolean b)

  Description copied from interface: `DockPanel`
  Set the child component to have a transparent background.

  Specified by:
    `setCanTransparent` in interface `DockPanel`

### setCanResize

    public void setCanResize(javax.swing.JComponent child,
                             boolean b)

  Description copied from interface: `DockPanel`
  Set that the child component can be user-resized.

  Specified by:
    `setCanResize` in interface `DockPanel`

### setCanTab

    public void setCanTab(javax.swing.JComponent child,
                          boolean b)

  Description copied from interface: `DockPanel`
  Set that the child component can be tabbed up, if docked in the same location as othe tab-able components.

  Specified by:
    `setCanTab` in interface `DockPanel`

### setTabName

    public void setTabName(javax.swing.JComponent child,
                           java.lang.String tabName)

  Set the name of the tab to use when the component is tabbed (if it can tab). If unspecified, defaults to Component.getName()

  Specified by:
    `setTabName` in interface `DockPanel`

### setCanExternalFrame

    public void setCanExternalFrame(javax.swing.JComponent child,
                                    boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can be become an external frame.

  Specified by:
    `setCanExternalFrame` in interface `DockPanel`

### setCanInternalFrame

    public void setCanInternalFrame(javax.swing.JComponent child,
                                    boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can be become an internal frame.

  Specified by:
    `setCanInternalFrame` in interface `DockPanel`

### setCanClose

    public void setCanClose(javax.swing.JComponent child,
                            boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can be closed.

  Specified by:
    `setCanClose` in interface `DockPanel`

### setCanDockNorth

    public void setCanDockNorth(javax.swing.JComponent child,
                                boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can dock on the top-level north.

  Specified by:
    `setCanDockNorth` in interface `DockPanel`

### setCanDockSouth

    public void setCanDockSouth(javax.swing.JComponent child,
                                boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can dock on the top-level south.

  Specified by:
    `setCanDockSouth` in interface `DockPanel`

### setCanDockEast

    public void setCanDockEast(javax.swing.JComponent child,
                               boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can dock on the top-level east.

  Specified by:
    `setCanDockEast` in interface `DockPanel`

### setCanDockWest

    public void setCanDockWest(javax.swing.JComponent child,
                               boolean b)

  Description copied from interface: `DockPanel`
  Set that the child can dock on the top-level west.

  Specified by:
    `setCanDockWest` in interface `DockPanel`

### dockNorth

    public void dockNorth(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Dock child on the DockPanel.

  Specified by:
    `dockNorth` in interface `DockPanel`

### dockNorth

    public void dockNorth(javax.swing.JComponent child,
                          int idx)

  Description copied from interface: `DockPanel`
  Dock the given child into the given position on the DockPanel

  Specified by:
    `dockNorth` in interface `DockPanel`

### dockNorth

    protected void dockNorth(DockWrapper wrapper)

### dockNorth

    protected void dockNorth(DockWrapper wrapper,
                             int idx)

  Dock the given child into the given position on the MapPanel

### dockSouth

    public void dockSouth(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Dock child on the DockPanel.

  Specified by:
    `dockSouth` in interface `DockPanel`

### dockSouth

    public void dockSouth(javax.swing.JComponent child,
                          int idx)

  Description copied from interface: `DockPanel`
  Dock the given child into the given position on the DockPanel

  Specified by:
    `dockSouth` in interface `DockPanel`

### dockSouth

    protected void dockSouth(DockWrapper wrapper)

### dockSouth

    protected void dockSouth(DockWrapper wrapper,
                             int idx)

  Dock the given child into the given position on the MapPanel

### dockEast

    public void dockEast(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Dock child on the DockPanel.

  Specified by:
    `dockEast` in interface `DockPanel`

### dockEast

    public void dockEast(javax.swing.JComponent child,
                         int idx)

  Description copied from interface: `DockPanel`
  Dock the given child into the given position on the DockPanel

  Specified by:
    `dockEast` in interface `DockPanel`

### dockEast

    protected void dockEast(DockWrapper wrapper)

### dockEast

    protected void dockEast(DockWrapper wrapper,
                            int idx)

  Dock the given child into the given position on the MapPanel

### dockWest

    public void dockWest(javax.swing.JComponent child)

  Description copied from interface: `DockPanel`
  Dock child on the DockPanel.

  Specified by:
    `dockWest` in interface `DockPanel`

### dockWest

    public void dockWest(javax.swing.JComponent child,
                         int idx)

  Description copied from interface: `DockPanel`
  Dock the given child into the given position on the DockPanel

  Specified by:
    `dockWest` in interface `DockPanel`

### dockWest

    protected void dockWest(DockWrapper wrapper)

### dockWest

    protected void dockWest(DockWrapper wrapper,
                            int idx)

  Dock the given child into the given position on the MapPanel

### dock

    public void dock(javax.swing.JComponent outter,
                     javax.swing.JComponent inner)

  Dock the given child onto the given parent, which is itself a child of this class.

  Specified by:
    `dock` in interface `DockPanel`

### dock

    public void dock(javax.swing.JComponent outter,
                     javax.swing.JComponent inner,
                     int idx)

  Dock the given child onto the given parent, which is itself a child of this class.

  Specified by:
    `dock` in interface `DockPanel`

### dock

    protected void dock(DockWrapper outter,
                        DockWrapper inner)

  Dock the given child onto the given parent, which is itself a child of this class.

### dock

    protected void dock(DockWrapper outter,
                        DockWrapper inner,
                        int idx)

  Dock the given child onto the given parent, which is itself a child of this class.

### internalFrame

    public void internalFrame(javax.swing.JComponent child)

  Set the component to an internal frame

  Specified by:
    `internalFrame` in interface `DockPanel`

### internalFrame

    protected void internalFrame(DockWrapper wrapper)

  Set the component to an internal frame

### externalFrame

    public void externalFrame(javax.swing.JComponent child)

  Set the component to an external frame

  Specified by:
    `externalFrame` in interface `DockPanel`

### externalFrame

    protected void externalFrame(DockWrapper wrapper)

  Set the component to an internal frame

### dockSomewhere

    public void dockSomewhere(javax.swing.JComponent child)

  Dock the given child somewhere...

  Specified by:
    `dockSomewhere` in interface `DockPanel`

### dockSomewhere

    protected void dockSomewhere(DockWrapper wrapper)

  Dock the given child somewhere...

### add

    public java.awt.Component add(java.awt.Component comp)

  We need to handle adding the component specially. If it is the background, do one thing. Otherwise wrap it up...

### add

    public void add(java.awt.Component comp,
                    java.lang.Object constraints)

  We need to handle adding the component specially. If it is the background, do one thing. Otherwise wrap it up...

### remove

    public void remove(java.awt.Component comp)

### removeAll

    public void removeAll()

### getNorth

    protected DockWrapper getNorth()

### getSouth

    protected DockWrapper getSouth()

### getEast

    protected DockWrapper getEast()

### getWest

    protected DockWrapper getWest()

### getOverlapTolerance

    protected int getOverlapTolerance()

### setWrapper

    protected void setWrapper(javax.swing.JComponent child,
                              DockWrapper w)

### getWrapper

    protected DockWrapper getWrapper(javax.swing.JComponent child)

### removeWrapper

    protected void removeWrapper(DockWrapper wrapper)

### freeWrapper

    protected void freeWrapper(DockWrapper w)

  Remove the wrapper from wherever it is currently

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details