Class ReferenceLayout
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
io.guise.framework.event.GuiseBoundPropertyObject
io.guise.framework.component.layout.AbstractLayout<ReferenceConstraints>
io.guise.framework.component.layout.ReferenceLayout
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,Layout<ReferenceConstraints>
A layout for components bound to component references such as IDs.
- Author:
- Garret Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from class io.guise.framework.component.layout.AbstractLayout
AbstractLayout.ConstraintsPropertyChangeListener
-
Field Summary
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
componentConstraintsChanged
(Component component, Constraints oldConstraints, Constraints newConstraints) Indicates that the constraints for a component have changed.Creates default constraints for the layout component.Retrieves a component bound to a given ID.Class<? extends ReferenceConstraints>
Methods inherited from class io.guise.framework.component.layout.AbstractLayout
addComponent, fireConstraintsPropertyChange, getComponentConstraintsChangeListener, getConstraints, getConstraintsPropertyChangeListener, getOwner, removeComponent, setOwner
Methods inherited from class io.guise.framework.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 io.guise.framework.component.layout.Layout
getSession
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
ReferenceLayout
public ReferenceLayout()
-
-
Method Details
-
getReferenceIDComponentMap
- Returns:
- The lazily-created map of components mapped to reference IDs.
-
getConstraintsClass
- Returns:
- The class representing the type of constraints appropriate for this layout.
-
componentConstraintsChanged
protected void componentConstraintsChanged(Component component, Constraints oldConstraints, Constraints newConstraints) Indicates that the constraints for a component have changed. This method is also called when the component is first added to the layout. This version removes and installs property change listeners to and from the constraints objects as appropriate.This version adds or removes the component reference ID to the map.
- Overrides:
componentConstraintsChanged
in classAbstractLayout<ReferenceConstraints>
- Parameters:
component
- The component for which constraints have changed.oldConstraints
- The old component constraints, ornull
if there were no constraints previously.newConstraints
- The new component constraints, ornull
if the component now has no constraints.
-
createDefaultConstraints
Description copied from interface:Layout
Creates default constraints for the layout component.- Returns:
- New default constraints for the layout component.
-
getComponentByID
Retrieves a component bound to a given ID.- Parameters:
id
- The ID with which a component may be bound.- Returns:
- A component with constraints specifying the given ID, or
null
if there is no component bound to the given ID.
-