|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vlsolutions.swing.docking.DockGroup
public class DockGroup
This class describes a logical group of Dockables.
When a dockable is associated to a DockGroup (via its DockKey) drag and drop operations
are limited to dockables of the same group (or new location) or compatible group (a group with
a common ancestor see isCompatibleGroup(DockGroup)
).
It becomes easy to develop, for example, and MDI program : all documents are given the same DockGroup, and other dockable are given another group so they don't mess with each other.
The DockGroups can be nested to allow some mixing (for example, an editor application can consist of 4 groups : "Formaters" and "Files" the parent of "TextFiles" and "HTMLfile". In that case, Textfiles and Htmlfiles can be part of tha same tabbed container whereas Formaters are kept outside.
DockKey.setDockGroup(DockGroup)
Constructor Summary | |
---|---|
DockGroup(java.lang.String name)
Constructs a new dockgroup with a given name. |
|
DockGroup(java.lang.String name,
DockGroup parent)
Constructs a new dockgroup with a given name and a parent group. |
Method Summary | |
---|---|
static boolean |
areGroupsCompatible(DockGroup g1,
DockGroup g2)
convenience method to check compatibility between groups |
boolean |
equals(java.lang.Object o)
overriden for storage/comparisons with the "name" property |
java.lang.String |
getName()
returns the name of this group (which is used as an internal key) |
DockGroup |
getParent()
returns the parent of this group (may be null) |
int |
hashCode()
overriden for storage/comparisons with the "name" property |
boolean |
isAncestorOf(DockGroup g)
returns true if this group is the ancestor of group g. |
boolean |
isCompatibleGroup(DockGroup g)
returns true is this group is compatible with the given parameter. |
void |
setParent(DockGroup parent)
Updates the parent of this group |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockGroup(java.lang.String name)
Note that names must be unique (this feature is not controlled by the framework) through all DockGroups.
public DockGroup(java.lang.String name, DockGroup parent)
Note that names must be unique (this feature is not controlled by the framework) through all DockGroups.
Method Detail |
---|
public DockGroup getParent()
public void setParent(DockGroup parent)
public java.lang.String getName()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isAncestorOf(DockGroup g)
public boolean isCompatibleGroup(DockGroup g)
two groups are compatible if they share the same ancestor or if one is the ancestor of the other.
When compatibility is found, dockables of those groups can be docked in the same tab container.
public static boolean areGroupsCompatible(DockGroup g1, DockGroup g2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |