JIDE 3.5.15

com.jidesoft.action
Class DockableBarContext

java.lang.Object
  extended by com.jidesoft.action.DockableBarContext
All Implemented Interfaces:
Serializable

public class DockableBarContext
extends Object
implements Serializable

A object that stores state, mode and size information of a DockableBar.

See Also:
Serialized Form

Field Summary
static int DOCK_SIDE_ALL
           
static int DOCK_SIDE_EAST
           
static int DOCK_SIDE_HORIZONTAL
           
static int DOCK_SIDE_NORTH
          Which side of the frame the window can swing to and is docking to.
static int DOCK_SIDE_SOUTH
           
static int DOCK_SIDE_VERTICAL
           
static int DOCK_SIDE_WEST
           
static String[] SIDE_NAMES
          Which side of the frame the dockable bar is docking to.
static int STATE_FLOATING
           
static int STATE_HIDDEN
          There are 4 states for each Dockable.
static int STATE_HORI_DOCKED
           
static String[] STATE_NAMES
           
static int STATE_VERT_DOCKED
           
 
Constructor Summary
DockableBarContext()
          Default constructor.
 
Method Summary
 com.jidesoft.action.PreviousState getAvailablePreviousState()
          Gets the state before the bar was made unavailable.
 com.jidesoft.action.PreviousState getClosePreviousState()
           
 int getCurrentDockSide()
           
 int getCurrentMode()
          Gets current state.
 int getDockedHeight()
           
 int getDockedWidth()
           
 int getDockID()
           
 com.jidesoft.action.PreviousState getDockPreviousState()
           
static String getDockSideName(int side)
           
 com.jidesoft.action.PreviousState getFloatPreviousState()
           
 com.jidesoft.action.PreviousState getHiddenPreviousState()
           
 int getInitIndex()
          Gets initial index.
 int getInitMode()
          Gets initial state.
 int getInitSide()
          Gets initial side.
 int getInitSubindex()
          Gets initial spandex.
 Rectangle getUndockedBounds()
           
 boolean isAvailable()
           
 boolean isFloating()
          Checks if it's in floating state.
 boolean isHidden()
          Checks if it's in hidden state.
 boolean isHoriDocked()
          Checks if it's in horizontally docked state.
 boolean isInitPosition()
           
 boolean isVertDocked()
          Checks if it's in vertically docked state.
 void resetDockID()
           
 void setAvailable(boolean available)
          Impose the availability status.
 void setAvailablePreviousState(com.jidesoft.action.PreviousState availablePreviousState)
          Sets the previous state before the bar is made unavailable.
 void setClosePreviousState(com.jidesoft.action.PreviousState closePreviousState)
           
 void setCurrentDockSide(int currentDockSide)
           
 void setCurrentMode(int currentMode)
          Sets current state.
 void setDockedHeight(int dockedHeight)
           
 void setDockedWidth(int dockedWidth)
           
 void setDockID(int dockID)
           
 void setDockPreviousState(com.jidesoft.action.PreviousState dockPreviousState)
           
 void setFloatPreviousState(com.jidesoft.action.PreviousState floatPreviousState)
           
 void setHiddenPreviousState(com.jidesoft.action.PreviousState hiddenPreviousState)
           
 void setInitIndex(int initIndex)
          Sets initial index.
 void setInitMode(int initMode)
          Sets initial state.
 void setInitPosition(boolean initPosition)
           
 void setInitSide(int initSide)
           
 void setInitSubindex(int initSideSubindex)
          Sets initial subindex.
 void setUndockedBounds(Rectangle bound)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_HIDDEN

public static final int STATE_HIDDEN
There are 4 states for each Dockable.

Hidden state: means the dockable bar is hidden. User need to choose a menu item or other places to make the dockable bar visible.

Floating state: means the dockable bar is floating around, not docks to any side.

Horizontal Docked state: the dockable is docked inside the main frame horizontally, which means it is docked to the north or south side.

Vertical Docked state: the dockable is docked inside the main frame vertically, which means it is docked to the west or east side.

See Also:
Constant Field Values

STATE_FLOATING

public static final int STATE_FLOATING
See Also:
Constant Field Values

STATE_HORI_DOCKED

public static final int STATE_HORI_DOCKED
See Also:
Constant Field Values

STATE_VERT_DOCKED

public static final int STATE_VERT_DOCKED
See Also:
Constant Field Values

STATE_NAMES

public static final String[] STATE_NAMES

DOCK_SIDE_NORTH

public static final int DOCK_SIDE_NORTH
Which side of the frame the window can swing to and is docking to.

See Also:
Constant Field Values

DOCK_SIDE_SOUTH

public static final int DOCK_SIDE_SOUTH
See Also:
Constant Field Values

DOCK_SIDE_EAST

public static final int DOCK_SIDE_EAST
See Also:
Constant Field Values

DOCK_SIDE_WEST

public static final int DOCK_SIDE_WEST
See Also:
Constant Field Values

DOCK_SIDE_HORIZONTAL

public static final int DOCK_SIDE_HORIZONTAL
See Also:
Constant Field Values

DOCK_SIDE_VERTICAL

public static final int DOCK_SIDE_VERTICAL
See Also:
Constant Field Values

DOCK_SIDE_ALL

public static final int DOCK_SIDE_ALL
See Also:
Constant Field Values

SIDE_NAMES

public static final String[] SIDE_NAMES
Which side of the frame the dockable bar is docking to.

Constructor Detail

DockableBarContext

public DockableBarContext()
Default constructor.

Method Detail

getInitMode

public int getInitMode()
Gets initial state.

Returns:
initial state

setInitMode

public void setInitMode(int initMode)
Sets initial state.

Parameters:
initMode - initial state

getCurrentMode

public int getCurrentMode()
Gets current state.

Returns:
current state

setCurrentMode

public void setCurrentMode(int currentMode)
Sets current state.

Parameters:
currentMode - current state

isHidden

public boolean isHidden()
Checks if it's in hidden state.

Returns:
true if it's in hidden state

isHoriDocked

public boolean isHoriDocked()
Checks if it's in horizontally docked state.

Returns:
true if it's in horizontally docked state

isVertDocked

public boolean isVertDocked()
Checks if it's in vertically docked state.

Returns:
true if it's in vertically docked state

isFloating

public boolean isFloating()
Checks if it's in floating state.

Returns:
true if it's in floating state

getInitSide

public int getInitSide()
Gets initial side.

Returns:
the initial side

setInitSide

public void setInitSide(int initSide)

isInitPosition

public boolean isInitPosition()

setInitPosition

public void setInitPosition(boolean initPosition)

getInitIndex

public int getInitIndex()
Gets initial index.

Returns:
the initial index.

setInitIndex

public void setInitIndex(int initIndex)
Sets initial index.

Parameters:
initIndex - the initial index

getInitSubindex

public int getInitSubindex()
Gets initial spandex.

Returns:
the initial subindex.

setInitSubindex

public void setInitSubindex(int initSideSubindex)
Sets initial subindex. Subindex is the number of pixels of start x location (or y if it's vertical) of command bar. For example if the value is 100, the command bar will place at x = 100 during initialization.

Parameters:
initSideSubindex - the initial subindex

getCurrentDockSide

public int getCurrentDockSide()

setCurrentDockSide

public void setCurrentDockSide(int currentDockSide)

getUndockedBounds

public Rectangle getUndockedBounds()

setUndockedBounds

public void setUndockedBounds(Rectangle bound)

getDockedWidth

public int getDockedWidth()

setDockedWidth

public void setDockedWidth(int dockedWidth)

getDockedHeight

public int getDockedHeight()

setDockedHeight

public void setDockedHeight(int dockedHeight)

getHiddenPreviousState

public com.jidesoft.action.PreviousState getHiddenPreviousState()

setHiddenPreviousState

public void setHiddenPreviousState(com.jidesoft.action.PreviousState hiddenPreviousState)

getClosePreviousState

public com.jidesoft.action.PreviousState getClosePreviousState()

setClosePreviousState

public void setClosePreviousState(com.jidesoft.action.PreviousState closePreviousState)

getDockPreviousState

public com.jidesoft.action.PreviousState getDockPreviousState()

setDockPreviousState

public void setDockPreviousState(com.jidesoft.action.PreviousState dockPreviousState)

getFloatPreviousState

public com.jidesoft.action.PreviousState getFloatPreviousState()

setFloatPreviousState

public void setFloatPreviousState(com.jidesoft.action.PreviousState floatPreviousState)

getDockSideName

public static String getDockSideName(int side)

getDockID

public int getDockID()

setDockID

public void setDockID(int dockID)

resetDockID

public void resetDockID()

isAvailable

public boolean isAvailable()
Returns:
true if the bar is available.

setAvailable

public void setAvailable(boolean available)
Impose the availability status.

Parameters:
available - True if the bar is available, false otherwise.

getAvailablePreviousState

public com.jidesoft.action.PreviousState getAvailablePreviousState()
Gets the state before the bar was made unavailable.

Returns:
A previous state.

setAvailablePreviousState

public void setAvailablePreviousState(com.jidesoft.action.PreviousState availablePreviousState)
Sets the previous state before the bar is made unavailable.

Parameters:
availablePreviousState -

JIDE 3.5.15