|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JMenuBar com.jidesoft.action.DockableBar
public abstract class DockableBar
DockableBar
is the base component that works with DockableBarManager.
Alignable
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JMenuBar |
---|
JMenuBar.AccessibleJMenuBar |
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 | |
---|---|
protected int |
_orientation
|
static String |
PROPERTY_ALLOWED_DOCK_SIDES
|
static String |
PROPERTY_AVAILABLE
Bound property name for the events regarding the DockableBar availability. |
static String |
PROPERTY_CHEVRON_ALWAYS_VISIBLE
|
static String |
PROPERTY_FLOATABLE
Constrained property name indicating that the DockableBar is floatable. |
static String |
PROPERTY_FLOATED
Constrained property name indicating that the DockableBar is floated. |
static String |
PROPERTY_HIDABLE
Constrained property name indicating that the DockableBar can be hidden. |
static String |
PROPERTY_HIDDEN
Constrained property name indicating that the DockableBar is hidden. |
static String |
PROPERTY_HORI_DOCKED
Constrained property name indicating that the DockableBar is docked. |
static String |
PROPERTY_INIT_INDEX
|
static String |
PROPERTY_INIT_MODE
|
static String |
PROPERTY_INIT_SIDE
|
static String |
PROPERTY_INIT_SUBINDEX
|
static String |
PROPERTY_KEY
Constrained property name indicating that the key of the dockable bar. |
static String |
PROPERTY_MENU_BAR
|
static String |
PROPERTY_PAINT_BACKGROUND
|
static String |
PROPERTY_REARRANGABLE
Constrained property name indicating that the DockableBar is floatable. |
static String |
PROPERTY_STRETCH
Constrained property name indicating that the DockableBar is stretching. |
static String |
PROPERTY_TITLE
Constrained property name indicating that the key of the DockableBar. |
static String |
PROPERTY_UNDOCKED_BOUNDS
|
static String |
PROPERTY_VERT_DOCKED
Constrained property name indicating that the DockableBar is docked. |
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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface com.jidesoft.swing.Alignable |
---|
PROPERTY_ORIENTATION |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DockableBar()
Creates a DockableBar. |
|
DockableBar(String key)
Creates a DockableBar with a specified key. |
|
DockableBar(String key,
String title)
Creates a DockableBar with a specified key and title. |
Method Summary | |
---|---|
void |
addDockableBarListener(DockableBarListener l)
Adds the specified listener to receive DockableBarEvent from this DockableBar. |
protected void |
addImpl(Component comp,
Object constraints,
int index)
|
void |
adjustChildrenOrientation(int orientation)
|
protected void |
checkOrientation(int orientation)
|
protected void |
fireDockableBarEvent(int id)
Fires a DockableBarEvent. |
int |
getAllowedDockSides()
Gets the sides which the DockableBar can dock to. |
DockableBarContext |
getContext()
Gets the context of DockableBar. |
DockableBarListener[] |
getDockableBarListeners()
Returns an array of all the DockableBarListener s added to this DockableBar with
addDockableBarListener . |
DockableBarManager |
getDockableBarManager()
Gets the DockableBarManager. |
int |
getDockID()
Get dock id. |
int |
getInitIndex()
Gets the init index. |
int |
getInitMode()
Gets initial state. |
int |
getInitSide()
Gets the initial side. |
int |
getInitSubindex()
Gets the init index. |
String |
getKey()
Gets the key of DockableBar. |
int |
getOrientation()
Returns the current orientation of the tool bar. |
String |
getTitle()
Gets the title of DockableBar. |
Rectangle |
getUndockedBounds()
|
boolean |
isAvailable()
Checks if the DockableBar is available. |
boolean |
isChevronAlwaysVisible()
Checks if the chevron is always visible. |
boolean |
isFloatable()
Gets the floatable property. |
boolean |
isFloating()
Checks if the DockableBar is floating. |
boolean |
isHidable()
Gets the hidable property. |
boolean |
isHidden()
Checks if the DockableBar is hidden. |
boolean |
isHoriDocked()
Checks if the DockableBar is docked horizontally (on the north side or south side). |
boolean |
isMenuBar()
Checks if the command bar is used as menu bar. |
boolean |
isPaintBackground()
Checks if the background of command bar should be painted. |
boolean |
isRearrangable()
Gets the rearrangeable property. |
boolean |
isStretch()
Checks if the DockableBar is stretching. |
boolean |
isVertDocked()
Checks if the DockableBar is docked vertically (on the east side or west side). |
void |
readElement(Element element)
|
void |
removeDockableBarListener(DockableBarListener l)
Removes the specified DockableBar listener so that it no longer receives DockableBarEvent from this DockableBar. |
void |
resetDockID()
Resets dock id. |
void |
setAllowedDockSides(int allowedDockSides)
Sets the sides which the DockableBar can dock to. |
void |
setAvailable(boolean avail)
Sets true to make the DockableBar available. |
void |
setChevronAlwaysVisible(boolean chevronAlwaysVisible)
Sets the flag if the chevron should always be visible even when there is no hidden component. |
void |
setContext(DockableBarContext context)
Sets the context of DockableBar. |
void |
setDockableBarManager(DockableBarManager dockingManager)
Sets the DockableBarManager. |
void |
setDockID(int id)
Sets dock id. |
void |
setFloatable(boolean b)
Sets the floatable property. |
void |
setFloating()
Sets the DockableBar to floating state. |
void |
setHidable(boolean b)
Sets the hidable property. |
void |
setHidden()
Sets the DockableBar to hidden state. |
void |
setHoriDocked()
|
void |
setInitIndex(int initIndex)
Sets initial index. |
void |
setInitMode(int initMode)
Sets the initial state. |
void |
setInitSide(int initSide)
Sets the initial side. |
void |
setInitSubindex(int initSubindex)
Sets initial index. |
void |
setKey(String key)
Sets the key of DockableBar. |
void |
setLayout(LayoutManager mgr)
|
void |
setMenuBar(boolean menuBar)
If a CommandBar is used as menu bar, you should call this method and set the value to true. |
void |
setOpaque(boolean isOpaque)
Overrides to call setPaintBackground(isOpaque).By default, paintBackground is true and opaque is false. |
void |
setOrientation(int orientation)
Sets the orientation of the DockableBar. |
void |
setPaintBackground(boolean paintBackground)
Sets if the background of command bar should be painted. |
void |
setRearrangable(boolean b)
Sets the rearrangeable property. |
void |
setStretch(boolean stretch)
Sets the stretch property to a new value. |
void |
setTitle(String title)
Sets the title of DockableBar. |
void |
setUndockedBounds(Rectangle undockedBounds)
|
void |
setVertDocked()
Sets the DockableBar to vertically docked state. |
boolean |
supportHorizontalOrientation()
Implementing method in Alignable. |
boolean |
supportVerticalOrientation()
Implementing method in Alignable. |
Methods inherited from class javax.swing.JMenuBar |
---|
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_KEY
public static final String PROPERTY_TITLE
public static final String PROPERTY_FLOATABLE
public static final String PROPERTY_REARRANGABLE
public static final String PROPERTY_STRETCH
public static final String PROPERTY_HIDABLE
public static final String PROPERTY_HIDDEN
public static final String PROPERTY_HORI_DOCKED
public static final String PROPERTY_VERT_DOCKED
public static final String PROPERTY_FLOATED
public static final String PROPERTY_INIT_SIDE
public static final String PROPERTY_INIT_MODE
public static final String PROPERTY_INIT_INDEX
public static final String PROPERTY_INIT_SUBINDEX
public static final String PROPERTY_ALLOWED_DOCK_SIDES
public static final String PROPERTY_UNDOCKED_BOUNDS
protected int _orientation
public static final String PROPERTY_CHEVRON_ALWAYS_VISIBLE
public static final String PROPERTY_PAINT_BACKGROUND
public static final String PROPERTY_MENU_BAR
public static final String PROPERTY_AVAILABLE
Constructor Detail |
---|
public DockableBar()
setKey(String)
to give it a unique key before adding to
DockableBarManager.
public DockableBar(String key)
key
- the key for the DockableBar. It is used to uniquely identify a DockableBar in DockableBarManager. If
setTitle() is never called, key will be used as the title of DockableBar as well.public DockableBar(String key, String title)
key
- the key for the DockableBar. It is used to uniquely identify a DockableBar in DockableBarManager.title
- the text will be shown on the title bar when the DockableBar is floating.Method Detail |
---|
public DockableBarContext getContext()
public void setContext(DockableBarContext context)
context
- the new DockableBarContextpublic void setKey(String key)
key
- the key of DockableBar.public String getKey()
public void setTitle(String title)
title
- the new titlepublic String getTitle()
public DockableBarManager getDockableBarManager()
Dockable
getDockableBarManager
in interface Dockable
public void setDockableBarManager(DockableBarManager dockingManager)
Dockable
setDockableBarManager
in interface Dockable
dockingManager
- new DockableBarManagerpublic boolean isHidden()
getContext().isHidden()
.
public void setHidden() throws PropertyVetoException
PropertyVetoException
- of the property change is vetoed.public boolean isFloating()
getContext().isFloating()
.
public void setFloating() throws PropertyVetoException
PropertyVetoException
- of the property change is vetoed.public boolean isVertDocked()
getContext().isVertDocked()
.
public void setVertDocked() throws PropertyVetoException
PropertyVetoException
- of the property change is vetoed.public boolean isHoriDocked()
getContext().isVertDocked()
.
public void setHoriDocked() throws PropertyVetoException
PropertyVetoException
public void addDockableBarListener(DockableBarListener l)
l
- the DockableBarListenerpublic void removeDockableBarListener(DockableBarListener l)
l
- the DockableBarListenerpublic DockableBarListener[] getDockableBarListeners()
DockableBarListener
s added to this DockableBar
with
addDockableBarListener
.
DockableBarListener
s added or an empty array if no listeners have been addedaddDockableBarListener(com.jidesoft.action.event.DockableBarListener)
protected void fireDockableBarEvent(int id)
id
- the type of the event being fired; one of the following: If the event type is not one of the above,
nothing happens.public int getDockID()
getDockID
in interface Dockable
public void setDockID(int id)
Dockable
setDockID
in interface Dockable
id
- new idpublic void resetDockID()
Dockable
resetDockID
in interface Dockable
public boolean isFloatable()
floatable
property.
floatable
propertysetFloatable(boolean)
public void setFloatable(boolean b)
floatable
property.
b
- if true
, the command bar can be floated; false
otherwiseisFloatable()
public boolean isRearrangable()
rearrangeable
property.
rearrangeable
propertysetRearrangable(boolean)
public void setRearrangable(boolean b)
rearrangeable
property.
b
- if true
, the command bar can be floated; false
otherwiseisRearrangable()
public boolean isHidable()
hidable
property.
hidable
propertysetHidable(boolean)
public void setHidable(boolean b)
hidable
property.
b
- if true
, the tool bar can be hidden; false
otherwiseisHidable()
public Rectangle getUndockedBounds()
public void setUndockedBounds(Rectangle undockedBounds)
public boolean isStretch()
DockableBar
can be at the same row.
public void setStretch(boolean stretch)
stretch
- true or false.public int getOrientation()
HORIZONTAL
or
VERTICAL
.
getOrientation
in interface Alignable
HORIZONTAL
or
VERTICAL
setOrientation(int)
public void setOrientation(int orientation)
HORIZONTAL
or
VERTICAL
. If orientation
is an invalid value, an exception will be thrown.
setOrientation
in interface Alignable
orientation
- the new orientation -- either HORIZONTAL
or VERTICAL
IllegalArgumentException
- if orientation is neither HORIZONTAL
nor VERTICAL
getOrientation()
public void setLayout(LayoutManager mgr)
setLayout
in class Container
public boolean supportVerticalOrientation()
supportVerticalOrientation
in interface Alignable
public boolean supportHorizontalOrientation()
supportHorizontalOrientation
in interface Alignable
protected void checkOrientation(int orientation)
public int getAllowedDockSides()
DockableBar
can dock to. By default, the value is
DockableBarContext.DOCK_SIDE_ALL meaning it can dock to all four sides.
public void setAllowedDockSides(int allowedDockSides)
allowedDockSides
- true or false.protected void addImpl(Component comp, Object constraints, int index)
addImpl
in class Container
public int getInitMode()
public void setInitMode(int initMode)
initMode
- public int getInitSide()
public void setInitSide(int initSide)
initSide
- the initial size such as DOCK_SIDE_NORTH, DOCK_SIDE_SOUTH, DOCK_SIDE_EAST and DOCK_SIDE_WEST as
defined in DockableBarContext.public int getInitIndex()
public void setInitIndex(int initIndex)
initIndex
- the initial indexpublic int getInitSubindex()
public void setInitSubindex(int initSubindex)
initSubindex
- the initial indexpublic void readElement(Element element)
public void adjustChildrenOrientation(int orientation)
public boolean isAvailable()
public void setAvailable(boolean avail)
avail
- true or false.public boolean isChevronAlwaysVisible()
public void setChevronAlwaysVisible(boolean chevronAlwaysVisible)
chevronAlwaysVisible
- true or false.public boolean isPaintBackground()
public void setPaintBackground(boolean paintBackground)
paintBackground
- true or false.public void setOpaque(boolean isOpaque)
setOpaque
in class JComponent
isOpaque
- true or false.public boolean isMenuBar()
public void setMenuBar(boolean menuBar)
menuBar
- true or false.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |