|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.vlsolutions.swing.docking.DockViewTitleBar
public class DockViewTitleBar
A title bar, associated to a DockView (container of a single user component).
Here is an example of a title bar : .
DockViewTitleBar is able to display the following properties of a DockKey :
This title bar supports buttons used for docking features :
function | Version 1.1 | Version 2.0 |
---|---|---|
maximize | ![]() | ![]() |
restore | ![]() | ![]() |
hide | ![]() | ![]() |
dock | ![]() | ![]() |
close | ![]() | ![]() |
float (detach) | n/a | ![]() |
attach | n/a | ![]() |
The buttons managed have no effect on the state of the dockable : they just fire property change events, and it is the responsibility of the DockableContainer to listen to those events and to relay the operation to the docking desktop.
Note : the UI Delegate of the DockViewTitleBar is the DockViewTitleBarUI
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 | |
---|---|
static String |
PROPERTY_AUTOHIDE
Property name designating the autohide button selection |
static String |
PROPERTY_CLOSED
Property name designating the close button selection |
static String |
PROPERTY_DRAGGED
Property name designating a drag gesture beginning |
static String |
PROPERTY_FLOAT
Property name designating the float button selection |
static String |
PROPERTY_MAXIMIZED
Property name designating the maximized button selection |
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 | |
---|---|
DockViewTitleBar()
Constructs an empty title bar (no dockable yet associated) |
|
DockViewTitleBar(Dockable dockable)
Constructs a title bar for the specified dockable |
Method Summary | |
---|---|
void |
closePopUp()
This method is invoked to hide the pop-up that could still be visible (To avoid a visible pop-up for an invisible component) |
JButton |
getCloseButton()
|
Dockable |
getDockable()
Returns the Dockable component this source is for |
Container |
getDockableContainer()
returns the DockableContainer responsible for displaying the associated dockable |
JButton |
getFloatButton()
returns the button used for floating (detach) the view. |
JButton |
getHideOrDockButton()
returns the button used for hiding or docking the view. |
JButton |
getMaximizeOrRestoreButton()
returns the button used for maximizing or restoring the view. |
JLabel |
getTitleLabel()
Returns the label used to display the dockkey name. |
String |
getUIClassID()
|
protected void |
initAutoHidePopUp(JPopupMenu popup)
|
protected void |
initDockedPopUp(JPopupMenu popup)
|
protected void |
initFloatingPopUp(JPopupMenu popup)
Init the popup displayed as the title bar contextual menu |
protected void |
initMaximizedPopUp(JPopupMenu popup)
Init the popup displayed as the title bar contextual menu |
boolean |
isActive()
Returns true if the dockable is the currently active one. |
protected void |
layoutTitleBar()
called to build the title bar |
void |
removeNotify()
Overriden as a means to unregister internal listeners, do not call directly |
void |
setActive(boolean active)
Updates the active property. |
void |
setDockable(Dockable dockable)
Changes the dockable this title bar is for |
boolean |
startDragComponent(Point p)
Notifies this source that a drag operation has begun. |
String |
toString()
Returns a readeable String representing this title bar |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, paramString, 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_AUTOHIDE
public static final String PROPERTY_CLOSED
public static final String PROPERTY_DRAGGED
public static final String PROPERTY_MAXIMIZED
public static final String PROPERTY_FLOAT
Constructor Detail |
---|
public DockViewTitleBar()
public DockViewTitleBar(Dockable dockable)
Method Detail |
---|
public void removeNotify()
removeNotify
in class JComponent
protected void layoutTitleBar()
public JLabel getTitleLabel()
Shouldn't be used to update the title : the best way is to update the DockKey (property listener ensure the labels and buttons stay in sync).
public JButton getCloseButton()
public JButton getHideOrDockButton()
As hiding and docking are mutually exclusive, the same button is used for both purposes
public JButton getMaximizeOrRestoreButton()
As those operations are mutually exclusive, the same button is used for both purposes
public JButton getFloatButton()
public void closePopUp()
public String getUIClassID()
getUIClassID
in class JPanel
public boolean isActive()
There is at most one active dockable for a dekstop, and it there is one, it is the one which contains the keybord focused component.
public void setActive(boolean active)
public void setDockable(Dockable dockable)
public Dockable getDockable()
Dockable
component this source is for
getDockable
in interface DockableDragSource
public boolean startDragComponent(Point p)
The source may reject the drag according to internal conditions (in that case
this method shall return false
) or to wrong mouse position .
startDragComponent
in interface DockableDragSource
p
refers to
a draggable component), false otherwise.public String toString()
toString
in class Component
protected void initMaximizedPopUp(JPopupMenu popup)
protected void initAutoHidePopUp(JPopupMenu popup)
protected void initDockedPopUp(JPopupMenu popup)
protected void initFloatingPopUp(JPopupMenu popup)
public Container getDockableContainer()
DockableDragSource
getDockableContainer
in interface DockableDragSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |