org.progeeks.meta.swing
Class MetaPropertyContext
java.lang.Object
org.progeeks.util.beans.BeanChangeSupport
org.progeeks.util.DefaultViewContext
org.progeeks.meta.swing.MetaPropertyContext
- All Implemented Interfaces:
- java.io.Serializable, StandardBean, ViewContext
public class MetaPropertyContext
- extends DefaultViewContext
A ViewContext implementation provided the factory registry
when creating new editors and renderers. This context potentially
has a reference to the parent and additionally provides access
to the registry used to create it as well as the PropertyType it
was loaded under and so on.
- Version:
- $Revision: 1.4 $
- Author:
- Paul Speed
- See Also:
- Serialized Form
Methods inherited from class org.progeeks.util.DefaultViewContext |
findContext, getBooleanProperty, getDoubleProperty, getIntProperty, getObjectProperty, getObjectProperty, getParentContext, getRootContext, getStringProperty, setBooleanProperty, setDoubleProperty, setIntProperty, setObjectProperty, setParentContext, setStringProperty |
Methods inherited from class org.progeeks.util.beans.BeanChangeSupport |
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hasListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaPropertyContext
public MetaPropertyContext(PropertyType type,
FactoryRegistry factories,
boolean editable)
MetaPropertyContext
public MetaPropertyContext(ViewContext parent,
PropertyType type,
FactoryRegistry factories,
boolean editable)
isEditable
public boolean isEditable()
- Returns true if the general context is editable. Individual components
and sub-contexts can still decide to be editable or not on their own
but this can clue them into what the original intent of this context
hierarhcy was.
getPropertyType
public PropertyType getPropertyType()
- Returns the local PropertyType that spawned this MetaPropertyContext.
getFactoryRegistry
public FactoryRegistry getFactoryRegistry()
- Returns the FactoryRegistry that participants in this context should
use when creating new components.
getPropertyForm
public MetaForm getPropertyForm(MetaFormFlavor flavor)
- Returns the form with the specified flavor for this context's property type and factory
registry. This is both a convenience method and possible way for
overriding this behavior in the future.
This implementation calls getFactoryRegistry().getForm( getPropertyType(), flavor ).
Copyright © 2002-2003 Paul Speed. All Rights Reserved.