|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.component.layout.AbstractLayout<T>
T - The type of layout constraints associated with each component.
This class and subclasses represent layout definitions, not layout implementations.public abstract class AbstractLayout<T extends Constraints>
Abstract implementation of layout information for a layout component.
| Nested Class Summary | |
|---|---|
protected class |
AbstractLayout.ConstraintsPropertyChangeListener
A property change listener that listens for changes in a constraint object's properties and fires a layout constraints property change event in response. |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Constructor Summary | |
|---|---|
AbstractLayout()
|
|
| Method Summary | ||
|---|---|---|
void |
addComponent(Component component)
Adds a component to the layout. |
|
protected void |
componentConstraintsChanged(Component component,
Constraints oldConstraints,
Constraints newConstraints)
Indicates that the constraints for a component have changed. |
|
protected
|
fireConstraintsPropertyChange(Component component,
T constraints,
java.lang.String propertyName,
V oldValue,
V newValue)
Reports that the bound property of a component's constraints has changed. |
|
protected com.globalmentor.beans.GenericPropertyChangeListener<Constraints> |
getComponentConstraintsChangeListener()
|
|
T |
getConstraints(Component component)
Retreives layout constraints associated with a component. |
|
protected AbstractLayout.ConstraintsPropertyChangeListener |
getConstraintsPropertyChangeListener()
|
|
LayoutComponent |
getOwner()
|
|
void |
removeComponent(Component component)
Removes a component from the layout. |
|
void |
setOwner(LayoutComponent newOwner)
Sets the layout component that owns this layout This method is managed by layout components, and normally should not be called by applications. |
|
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.guiseframework.component.layout.Layout |
|---|
createDefaultConstraints, getConstraintsClass, getSession |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public AbstractLayout()
| Method Detail |
|---|
protected AbstractLayout.ConstraintsPropertyChangeListener getConstraintsPropertyChangeListener()
protected com.globalmentor.beans.GenericPropertyChangeListener<Constraints> getComponentConstraintsChangeListener()
protected void componentConstraintsChanged(Component component,
Constraints oldConstraints,
Constraints newConstraints)
component - The component for which constraints have changed.oldConstraints - The old component constraints, or null if there were no constraints previously.newConstraints - The new component constraints, or null if the component now has no constraints.public LayoutComponent getOwner()
getOwner in interface Layout<T extends Constraints>null if this layout has not been installed into a layout component.public void setOwner(LayoutComponent newOwner)
setOwner in interface Layout<T extends Constraints>newOwner - The new layout component for this layout.
//TODO del @exception NullPointerException if the given layout component is null.
java.lang.IllegalStateException - if a different layout component is provided and this layout already has a layout component.
java.lang.IllegalArgumentException - if a different layout component is provided and the given layout component does not already recognize this layout as its layout.public void addComponent(Component component)
addComponent in interface Layout<T extends Constraints>component - The component to add to the layout.
java.lang.IllegalStateException - if this layout has not yet been installed into a layout component.public void removeComponent(Component component)
removeComponent in interface Layout<T extends Constraints>component - The component to remove from the layout.public T getConstraints(Component component)
getConstraints in interface Layout<T extends Constraints>component - The component for which layout metadata is being requested.
java.lang.IllegalStateException - if this layout has not yet been installed into a layout component.
java.lang.IllegalStateException - if no constraints are associated with the given component and this layout does not support default constraints.Layout.getConstraintsClass(),
Component.getConstraints(),
Component.setConstraints(Constraints)
protected <V> void fireConstraintsPropertyChange(Component component,
T constraints,
java.lang.String propertyName,
V oldValue,
V newValue)
null or are both non-null and equal according to the Object.equals(java.lang.Object) method.
No event is fired if no listeners are registered for the given property.
This method delegates actual firing of the event to BoundPropertyObject.firePropertyChange(PropertyChangeEvent).
component - The component for which a constraint value changed.constraints - The constraints for which a value changed.propertyName - The name of the property being changed.oldValue - The old property value.newValue - The new property value.LayoutConstraintsPropertyChangeEvent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||