|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.ComponentAdapter
de.uni_paderborn.fujaba.fsa.swing.GrabManager
The GrabManager associates a number of Grabs to a target JComponent, manages events of the target and calls the GrabLayouter to relayout the Grabs when necessary.
The association to the JComponent is implemented using the clientProperty-Methods of the JComponent. This means that the association to the JComponent is implemented with the traditional access methods, but the backward association is implemented as the client property with name
GrabManager.TARGET_PROPERTYof the target component. It is accessible via:
(GrabManager)targetComponent.getClientProperty(GrabManager.TARGET_PROPERTY)
0..1 N GrabManager ----------------------------- JGrab manager grabs 0..1 N GrabManager ---------------------------------------- JComponent getClientProperty target
JComponent.getClientProperty(java.lang.Object)
,
JComponent.putClientProperty(java.lang.Object, java.lang.Object)
,
JGrab
,
GrabLayouter
Field Summary | |
static java.lang.String |
TARGET_PROPERTY
No comment provided by developer, please add a comment to improve documentation. |
Constructor Summary | |
GrabManager()
Constructor for class GrabManager |
|
GrabManager(javax.swing.JComponent target)
Constructor for class GrabManager |
Method Summary | |
boolean |
addToGrabs(JGrab value)
Add a Grab to the list of Grabs that are managed by this Object. |
void |
ancestorMoved(java.awt.event.HierarchyEvent e)
Listen for changes to ancestors of the target. |
void |
ancestorResized(java.awt.event.HierarchyEvent e)
No comment provided by developer, please add a comment to improve documentation. |
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
static void |
doPostPonedGrabLayout()
No comment provided by developer, please add a comment to improve documentation. |
javax.swing.JComponent |
getTarget()
|
boolean |
hasInGrabs(JGrab value)
|
void |
hierarchyChanged(java.awt.event.HierarchyEvent e)
|
java.util.Iterator |
iteratorOfGrabs()
No comment provided by developer, please add a comment to improve documentation. |
static void |
postPoneGrabLayout()
No comment provided by developer, please add a comment to improve documentation. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Listens for changes to Position or size of the target to revalidate the grabs and for changes to the parents of the Grabs to update the common ancestor |
void |
removeAllFromGrabs()
No comment provided by developer, please add a comment to improve documentation. |
boolean |
removeFromGrabs(JGrab value)
Removes the Grab value from the list of Grabs and updates the common ancestor of all grabs |
void |
revalidate()
Checks the Target if a specific GrabLayouter is set as client property with name GrabLayouter.TARGET_PROPERTY. |
void |
revalidate(int depthIncrease)
Checks the Target if a specific GrabLayouter is set as client property with name GrabLayouter.TARGET_PROPERTY. |
boolean |
setTarget(javax.swing.JComponent value)
Set the target of this Manager (and all of its Grabs) to value. |
int |
sizeOfGrabs()
No comment provided by developer, please add a comment to improve documentation. |
Methods inherited from class java.awt.event.ComponentAdapter |
componentHidden, componentShown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TARGET_PROPERTY
Constructor Detail |
public GrabManager()
public GrabManager(javax.swing.JComponent target)
target
- No description providedMethod Detail |
public static void postPoneGrabLayout()
public static void doPostPonedGrabLayout()
public boolean setTarget(javax.swing.JComponent value)
Reverse Link is
(GrabManager)value.getClientProperty(GrabManager.TARGET_PROPERTY)
value
- The new target
getTarget()
public javax.swing.JComponent getTarget()
public boolean addToGrabs(JGrab value)
value
- the Grab to add
#updateCommonAncestorOfGrabs(java.awt.Container, boolean)
public boolean hasInGrabs(JGrab value)
value
-
public java.util.Iterator iteratorOfGrabs()
public int sizeOfGrabs()
public boolean removeFromGrabs(JGrab value)
value
- the grab in question
#updateCommonAncestorOfGrabs(java.awt.Container, boolean)
public void removeAllFromGrabs()
public void revalidate()
Then the layout-Method of the Layouter is called to reposition the grabs around the target JComponent
GrabLayouter
,
GrabLayouter.getDefaultLayouter()
,
GrabLayouter.layout(de.uni_paderborn.fujaba.fsa.swing.GrabManager)
public void revalidate(int depthIncrease)
Then the layout-Method of the Layouter is called to reposition the grabs around the target JComponent
depthIncrease
- recursion is limitted to 2.GrabLayouter
,
GrabLayouter.getDefaultLayouter()
,
GrabLayouter.layout(de.uni_paderborn.fujaba.fsa.swing.GrabManager)
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- the eventrevalidate()
,
#updateCommonAncestorOfGrabs(java.awt.Container, boolean)
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
e
- the eventpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
e
- the eventpublic void hierarchyChanged(java.awt.event.HierarchyEvent e)
hierarchyChanged
in interface java.awt.event.HierarchyListener
e
- the eventpublic void ancestorMoved(java.awt.event.HierarchyEvent e)
If a parent of the common ancestor of grabs is changed there is nothing to do, because the changes affect the grabs, too. Otherwise the grabs have to be relayouted
ancestorMoved
in interface java.awt.event.HierarchyBoundsListener
e
- The eventrevalidate()
,
#updateCommonAncestorOfGrabs(Container)
public void ancestorResized(java.awt.event.HierarchyEvent e)
ancestorResized
in interface java.awt.event.HierarchyBoundsListener
e
- No description provided
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |