Class DynamicPropertyUtil
- java.lang.Object
- 
- com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil
 
- 
 public class DynamicPropertyUtil extends java.lang.ObjectThis class can be used to delegate the functions that a MutableDynamicPropertyProvider needs to implement.
- 
- 
Constructor SummaryConstructors Constructor Description DynamicPropertyUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddProperty(MutableDynamicPropertyProvider thiz, DynamicPropertyDescriptor prop)Deprecated.static voidcheckRemovalLegality(DynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList)Checks to see if it is legal to remove the named property from the given dynamic property provider.static booleanclassHasProperty(java.lang.Class clz, java.lang.String name)static intcountDependencies(java.awt.Component component, java.lang.String propertyName)Counts the number of interactions that are dependent on the named property of the given componentstatic voidfirePropertyChange(javax.swing.JComponent parent, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)static java.util.Set<PropertyAdapter>getDependencies(DynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList)Finds all property adapters that have an interaction to the given property name, ignoring adapters whose target is the given source and whose target prop name is in the ignore list.static InteractionControllergetInteractionController(java.awt.Component comp)Fetches the interaction controller given a component.static DynamicPropertyDescriptor[]getProperties(java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> dynamicProps)static java.lang.ClassgetPropertyType(MutableDynamicPropertyProvider thiz, java.lang.String name)static java.lang.ObjectgetPropertyValue(MutableDynamicPropertyProvider thiz, java.lang.String name)static booleanisPropertyDefined(MutableDynamicPropertyProvider thiz, java.lang.String name)static booleanisPropertyNameUnique(DynamicPropertyProvider thiz, DynamicPropertyDescriptor prop)Returns true if the given property's name is unique to the property provider, checking both static and dynamic propertiesstatic java.lang.StringlistToHTML(java.util.Collection<PropertyAdapter> list)static voidremoveProperty(MutableDynamicPropertyProvider thiz, java.lang.String name)Deprecated.static voidremoveProperty(MutableDynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList)static voidsetPropertyValue(MutableDynamicPropertyProvider thiz, java.lang.String name, java.lang.Object value)protected static booleantypesEqual(UdtDefinitionInfo a, UdtDefinitionInfo b)
 
- 
- 
- 
Method Detail- 
getPropertiespublic static DynamicPropertyDescriptor[] getProperties(java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> dynamicProps) 
 - 
checkRemovalLegalitypublic static void checkRemovalLegality(DynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList) throws java.lang.IllegalArgumentException Checks to see if it is legal to remove the named property from the given dynamic property provider. If another component's property is bound to this property, legality fails, and an IllegalArgumentException is thrown. If legality succeeds, this function simply returns.- Parameters:
- thiz- The dynamic property provider that contains the property to remove
- name- The name of the property to remove
- ignoreSiblingsList- An optional (null-OK) list of names of properties that will also be deleted from the same property provider, so their dependencies can be ignored
- Throws:
- java.lang.IllegalArgumentException
 
 - 
getDependenciespublic static java.util.Set<PropertyAdapter> getDependencies(DynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList) Finds all property adapters that have an interaction to the given property name, ignoring adapters whose target is the given source and whose target prop name is in the ignore list.
 - 
countDependenciespublic static int countDependencies(java.awt.Component component, java.lang.String propertyName)Counts the number of interactions that are dependent on the named property of the given component
 - 
getInteractionControllerpublic static InteractionController getInteractionController(java.awt.Component comp) Fetches the interaction controller given a component. Can return null if you pass in a null component or if theBindingRootcannot be found in the component's ancestors.- Parameters:
- comp- The component whose ancestors we want to search for the interaction controller
- Returns:
- The interaction controller for the given component's ancestor chain
 
 - 
listToHTMLpublic static java.lang.String listToHTML(java.util.Collection<PropertyAdapter> list) 
 - 
removeProperty@Deprecated public static void removeProperty(MutableDynamicPropertyProvider thiz, java.lang.String name) throws java.lang.IllegalArgumentException Deprecated.- Throws:
- java.lang.IllegalArgumentException
 
 - 
removePropertypublic static void removeProperty(MutableDynamicPropertyProvider thiz, java.lang.String name, java.util.Collection<java.lang.String> ignoreSiblingsList) throws java.lang.IllegalArgumentException - Throws:
- java.lang.IllegalArgumentException
 
 - 
addProperty@Deprecated public static void addProperty(MutableDynamicPropertyProvider thiz, DynamicPropertyDescriptor prop) throws javax.naming.InvalidNameException Deprecated.- Throws:
- javax.naming.InvalidNameException
 
 - 
getPropertyValuepublic static java.lang.Object getPropertyValue(MutableDynamicPropertyProvider thiz, java.lang.String name) 
 - 
getPropertyTypepublic static java.lang.Class getPropertyType(MutableDynamicPropertyProvider thiz, java.lang.String name) 
 - 
typesEqualprotected static boolean typesEqual(UdtDefinitionInfo a, UdtDefinitionInfo b) 
 - 
setPropertyValuepublic static void setPropertyValue(MutableDynamicPropertyProvider thiz, java.lang.String name, java.lang.Object value) throws java.lang.ClassCastException - Throws:
- java.lang.ClassCastException
 
 - 
firePropertyChangepublic static void firePropertyChange(javax.swing.JComponent parent, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
 - 
isPropertyNameUniquepublic static boolean isPropertyNameUnique(DynamicPropertyProvider thiz, DynamicPropertyDescriptor prop) Returns true if the given property's name is unique to the property provider, checking both static and dynamic properties
 - 
classHasPropertypublic static boolean classHasProperty(java.lang.Class clz, java.lang.String name)
 - 
isPropertyDefinedpublic static boolean isPropertyDefined(MutableDynamicPropertyProvider thiz, java.lang.String name) 
 
- 
 
-