|
Revision 3254 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pathvisio.gui.swing.propertypanel.PropertyDisplayManager
public class PropertyDisplayManager
This class manages how properties should be displayed. It keeps track of TypeHandlers, which properties should be visible, and the order in which properties should be displayed.
The main entry point for plugins are registerProperty(Property) and
registerTypeHandler(TypeHandler).
| Nested Class Summary | |
|---|---|
static class |
PropertyDisplayManager.PropPreference
Preference for property display information. |
| Method Summary | |
|---|---|
static Property |
getDynamicProperty(java.lang.String key)
|
static int |
getPropertyOrder(Property prop)
Gets the order of the given Property. |
static java.util.EnumSet<ObjectType> |
getPropertyScope(Property prop)
Get the scope of a property (defines on which object types it should apply). |
static TypeHandler |
getTypeHandler(PropertyType type)
Gets the TypeHandler for the given PropertyType. |
static java.util.Set<java.lang.Object> |
getVisiblePropertyKeys(PathwayElement e)
Gets the visible property keys for the given PathwayElement. |
static boolean |
isStorePreferences()
Gets whether visibility and order of properties is stored as a preference. |
static boolean |
isVisible(Property prop)
Gets whether the given Property should be visible. |
static void |
registerProperty(Property prop)
Register a property here. |
static void |
registerProperty(Property prop,
boolean manage)
Register a property here. |
static boolean |
registerTypeHandler(TypeHandler handler)
Registers a TypeHandler. |
static void |
setPropertyOrder(Property prop,
java.lang.Integer order)
Sets the order of the given Property. |
static void |
setPropertyScope(Property prop,
java.util.EnumSet<ObjectType> types)
Set the scope of a dynamic property (on which object types it applies). |
static void |
setStorePreferences(boolean storePreferences)
Sets whether visibility and order of properties is stored as a preference. |
static void |
setVisible(Property prop,
boolean isVisible)
Sets whether the given Property should be visible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Set<java.lang.Object> getVisiblePropertyKeys(PathwayElement e)
public static TypeHandler getTypeHandler(PropertyType type)
public static boolean registerTypeHandler(TypeHandler handler)
public static void registerProperty(Property prop)
Dynamic properties will automatically be managed by the display manager, which means that the property
will be editable from the property panel (for all object types by default, see
setPropertyScope(Property, EnumSet) to customize this behavior). Note that the property is not saved to
GPML unless the property is modified.
public static void registerProperty(Property prop,
boolean manage)
Dynamic properties will only be managed by the display manager if manage is set to true. When the
display manager manages a property, it means that the property will be editable from the property panel (for
all object types by default, see setPropertyScope(Property, EnumSet) to customize this behavior).
Note that the property is not saved to GPML unless the property is modified.
prop - the Property being registeredmanage - true if the display manager should manage this property, false if not
public static void setPropertyScope(Property prop,
java.util.EnumSet<ObjectType> types)
prop - The property this scope applies to.types - The object types that define the scope of this property. If
null is supplied as value, the property will be displayed on
all object types (default behavior).public static java.util.EnumSet<ObjectType> getPropertyScope(Property prop)
public static Property getDynamicProperty(java.lang.String key)
public static int getPropertyOrder(Property prop)
Integer.MAX_VALUE is returned.
public static void setPropertyOrder(Property prop,
java.lang.Integer order)
public static boolean isVisible(Property prop)
public static void setVisible(Property prop,
boolean isVisible)
public static boolean isStorePreferences()
public static void setStorePreferences(boolean storePreferences)
|
Generated July 29 2010 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||