|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--lava.gui.ListenableLayoutManager
Adds LayoutListener support to any LayoutManager.
Details: ListenableLayoutManager is a LayoutManager that forwards most of its work to another LayoutManager. This class adds LayoutListener support to existing LayoutManager implementations.
| Field Summary | |
protected java.awt.LayoutManager |
lm
Represented LayoutManager. |
| Constructor Summary | |
ListenableLayoutManager(java.awt.LayoutManager lm)
Specifies LayoutManager. |
|
| Method Summary | |
void |
addLayoutComponent(java.lang.String s,
java.awt.Component c)
Forwards call to lm. |
void |
addLayoutListener(LayoutListener ll)
Subscribes LayoutListener to laidOutContainer messages. |
void |
layoutContainer(java.awt.Container c)
Forwards call to lm. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container c)
Forwards call to lm. |
protected void |
notifyListeners(java.awt.Container c)
Sends laidOutContainer messages to registered LayoutListeners. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container c)
Forwards call to lm. |
void |
removeLayoutComponent(java.awt.Component c)
Forwards call to lm. |
void |
removeLayoutListener(LayoutListener ll)
Unsubscribes LayoutListener to laidOutContainer messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.awt.LayoutManager lm
Details: lm is the real LayoutManager for which I am acting as a proxy. I forward most of my layout work to lm. This value is defined at construction time.
| Constructor Detail |
public ListenableLayoutManager(java.awt.LayoutManager lm)
Details: This constructor prepares me to act as a proxy for the given LayoutManager.
lm - the LayoutManager| Method Detail |
public void addLayoutListener(LayoutListener ll)
Details: addLayoutListener adds ll, a LayoutListener, to my list of registered LayoutListeners. If ll is already registered, this does nothing.
ll - the interested LayoutListenerpublic void removeLayoutListener(LayoutListener ll)
Details: removeLayoutListener removes ll, a LayoutListener, from my list of registered LayoutListeners. No action is taken if ll is not registered.
ll - the uninterested LayoutListenerprotected void notifyListeners(java.awt.Container c)
Details: notifyListeners calls laidOutContainer(c) for all registered LayoutListeners.
c - passed to laidOutContainerpublic void layoutContainer(java.awt.Container c)
Details: I forward layoutContainer calls to lm, and then call notifyListeners(c) on each of the registered LayoutListeners to let them know that I just laid out a Container.
layoutContainer in interface java.awt.LayoutManagerc - the Containerpublic void removeLayoutComponent(java.awt.Component c)
Details: I forward removeLayoutComponent calls to lm.
removeLayoutComponent in interface java.awt.LayoutManagerc - a forwarded parameter
public void addLayoutComponent(java.lang.String s,
java.awt.Component c)
Details: I forward addLayoutComponent calls to lm.
addLayoutComponent in interface java.awt.LayoutManagers - a forwarded parameterc - a forwarded parameterpublic java.awt.Dimension preferredLayoutSize(java.awt.Container c)
Details: I forward preferredLayoutSize calls to lm and return the result.
preferredLayoutSize in interface java.awt.LayoutManagerc - a forwarded parameterpublic java.awt.Dimension minimumLayoutSize(java.awt.Container c)
Details: I forward minimumLayoutSize calls to lm and return the result.
minimumLayoutSize in interface java.awt.LayoutManagerc - a forwarded parameter
|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||