public class BindUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLOSE_DELIM |
static java.lang.String |
OPEN_DELIM |
static java.lang.String |
RELPATH_PARENT |
static java.lang.String |
RELPATH_SOURCE |
Constructor and Description |
---|
BindUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
addAllInteractions(Expression e,
java.util.List<InteractionDescriptor> list) |
static void |
connectBindings(BindingRoot window,
TagManager manager,
Expression expr,
Adapter adapter,
InteractionListener interactionListener)
Recursively goes through the given expression, connecting all BoundVariableExpressions up with
PropertyListenerDescriptors.
|
static QueryHolder |
createQueryHolder(java.lang.String query,
TagManager manager,
BindingRoot selectedWindow,
PropertyAdapter adapter,
java.lang.String thisPath) |
static QueryHolder |
createQueryHolderForTagBinding(java.lang.String query,
TagManager manager,
TagPath localPath) |
static BoundValueHolder |
createValueHolder(java.lang.String expression,
TagManager manager,
BindingRoot selectedWindow,
PropertyAdapter adapter,
java.lang.String thisPath) |
static TagPath |
derelativezie(TagPath tagPath,
TagPath parentPath)
Deprecated.
|
static java.util.List<PropertyNode> |
getAllProperties(java.lang.Object o) |
static java.util.List<PropertyNode> |
getBoundProperties(java.lang.Object o) |
static java.lang.Object |
getCurrentValue(PropertyNode property)
Deprecated.
Use PropertyNode.getQValue().getValue() instead
|
static java.beans.FeatureDescriptor |
getFeatureDescriptor(java.awt.Component parent,
java.lang.String propName)
Returns the FeatureDescriptor for the given property name on the given component or null if the property is not
found.
|
static PropertyListenerDescriptor |
getPLDForPath(BindingRoot selectedWindow,
java.lang.String path)
Creates a new PropertyListenerDescriptor for the given path.
|
static PropertyNode |
getPropertyNode(java.awt.Component parent,
java.beans.FeatureDescriptor fd)
Returns a PropertyNode (Dynamic or Static) for the given feature descriptor on the given component
|
static PropertyNode |
getPropertyNode(java.awt.Component source,
java.lang.String propName,
boolean onlyBindable)
Finds the PropertyNode for the given component+name.
|
static PropertyNode |
getPropertyNodeForPath(BindingRoot window,
java.lang.String path,
boolean onlyBindable)
For the given path (with or without path delimiters { and }) in the given window, returns the PropertyNode.
|
static PropertyNode |
getPropertyNodeForRelativePath(javax.swing.JComponent relativeTo,
java.lang.String path,
boolean onlyBindable) |
static java.lang.Class |
getPropertyType(java.beans.FeatureDescriptor fd) |
static QualifiedValue |
getQValue(java.awt.Component component,
java.beans.FeatureDescriptor property) |
static boolean |
isBound(javax.swing.JComponent component,
java.lang.String propertyName)
Checks to see if the property of the given component is bound or not.
|
static boolean |
isBound(java.lang.String s) |
static boolean |
isDBBound(javax.swing.JComponent component,
java.lang.String propertyName)
Checks to see if the property of the given component has a database binding.
|
static boolean |
isPath(java.lang.String s)
Returns true if the string seems to be a path (absolute OR relative).
|
static boolean |
isPropertyBindable(java.beans.FeatureDescriptor fd) |
static boolean |
isPropertyDefined(BindingRoot window,
java.lang.String path) |
static boolean |
isRelativePath(java.lang.String s)
Matches something like "{$...}"
|
static void |
main(java.lang.String[] args) |
static ExpressionParseContext |
newBinder(BindingRoot selectedWindow,
TagManager tagManager,
TagPath localPath,
FunctionFactory funcFactory) |
static void |
pullCurrentValues(PropertyAdapter adapter) |
public static final java.lang.String OPEN_DELIM
public static final java.lang.String CLOSE_DELIM
public static final java.lang.String RELPATH_SOURCE
public static final java.lang.String RELPATH_PARENT
public static void addAllInteractions(Expression e, java.util.List<InteractionDescriptor> list)
public static java.lang.Class getPropertyType(java.beans.FeatureDescriptor fd)
public static boolean isBound(javax.swing.JComponent component, java.lang.String propertyName)
public static boolean isBound(java.lang.String s)
public static boolean isDBBound(@Nonnull javax.swing.JComponent component, @Nonnull java.lang.String propertyName)
@Deprecated public static TagPath derelativezie(TagPath tagPath, TagPath parentPath) throws java.lang.RuntimeException
TagPathParser
derelativezie(TagPath, TagPath)
instead (this calls through to that).java.lang.RuntimeException
public static ExpressionParseContext newBinder(BindingRoot selectedWindow, TagManager tagManager, TagPath localPath, FunctionFactory funcFactory)
public static PropertyListenerDescriptor getPLDForPath(BindingRoot selectedWindow, java.lang.String path) throws java.lang.Exception
java.lang.Exception
- if it can't pull the current value for the property.public static void connectBindings(BindingRoot window, TagManager manager, Expression expr, Adapter adapter, InteractionListener interactionListener) throws java.lang.RuntimeException
java.lang.RuntimeException
public static QueryHolder createQueryHolderForTagBinding(java.lang.String query, TagManager manager, TagPath localPath) throws java.lang.Exception
java.lang.Exception
public static QueryHolder createQueryHolder(java.lang.String query, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, java.lang.String thisPath) throws java.lang.Exception
java.lang.Exception
public static BoundValueHolder createValueHolder(java.lang.String expression, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, java.lang.String thisPath) throws java.lang.Exception
java.lang.Exception
public static java.util.List<PropertyNode> getBoundProperties(java.lang.Object o)
public static java.util.List<PropertyNode> getAllProperties(java.lang.Object o)
public static boolean isPropertyBindable(java.beans.FeatureDescriptor fd)
public static void main(java.lang.String[] args)
public static boolean isPropertyDefined(BindingRoot window, java.lang.String path)
public static boolean isPath(java.lang.String s)
public static boolean isRelativePath(java.lang.String s)
public static PropertyNode getPropertyNodeForPath(BindingRoot window, java.lang.String path, boolean onlyBindable) throws java.lang.RuntimeException
window
- The window in which the path resides. Throws a RuntimeException if the path isn't valid.path
- The path to the propertyonlyBindable
- If true, only bindable properties will be consideredjava.lang.RuntimeException
public static PropertyNode getPropertyNodeForRelativePath(javax.swing.JComponent relativeTo, java.lang.String path, boolean onlyBindable) throws java.lang.RuntimeException
java.lang.RuntimeException
public static PropertyNode getPropertyNode(java.awt.Component source, java.lang.String propName, boolean onlyBindable) throws java.lang.RuntimeException
source
- The component to look for the property on.propName
- The name of the property. Can be in the format "name:path.to.subprop" for UDT sub-properties.onlyBindable
- If true, only bindable properties will be accepted.java.lang.RuntimeException
@Deprecated public static java.lang.Object getCurrentValue(PropertyNode property) throws java.lang.Exception
java.lang.Exception
public static QualifiedValue getQValue(java.awt.Component component, java.beans.FeatureDescriptor property) throws java.lang.Exception
java.lang.Exception
public static void pullCurrentValues(PropertyAdapter adapter)
public static java.beans.FeatureDescriptor getFeatureDescriptor(java.awt.Component parent, java.lang.String propName)
public static PropertyNode getPropertyNode(java.awt.Component parent, java.beans.FeatureDescriptor fd)