Groovy 1.7.0

org.codehaus.groovy.binding
Class BindPath

java.lang.Object
  org.codehaus.groovy.binding.BindPath

@SuppressWarnings({"unchecked"}) // all are of type Object, so generics are useless
class BindPath
extends Object

The bind path object. This class represents one "step" in the bind path.


Field Summary
static Class[] GLOBAL_PARAMS

static Class[] NAME_PARAMS

BindPath[] children

The steps further down the path from us

Object currentObject

The object we think we are bound to

PropertyChangeListener globalListener

PropertyChangeListener localListener

Map localSynthetics

The local lookup for syhtnetic properties, like JTextField#text

String propertyName

The proeprty we are intiereted in

BindingUpdatable syntheticFullBinding

 
Constructor Summary
BindPath()

 
Method Summary
void addAllListeners(PropertyChangeListener listener, Object newObject, Set updateSet)

Adds all the listeners to the objects in the bind path.

void addListeners(PropertyChangeListener listener, Object newObject, Set updateSet)

Add listeners to a specific object.

TriggerBinding getSyntheticTriggerBinding(Object newObject)

void removeListeners()

Remove listeners, believeing that our bould flags are accurate and it removes only as declared.

void updateLocalSyntheticProperties(Map synthetics)

void updatePath(PropertyChangeListener listener, Object newObject, Set updateSet)

Called when we detect a change somewherer down our path.

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Field Detail

GLOBAL_PARAMS

static final Class[] GLOBAL_PARAMS


NAME_PARAMS

static final Class[] NAME_PARAMS


children

BindPath[] children
The steps further down the path from us


currentObject

Object currentObject
The object we think we are bound to


globalListener

PropertyChangeListener globalListener


localListener

PropertyChangeListener localListener


localSynthetics

Map localSynthetics
The local lookup for syhtnetic properties, like JTextField#text


propertyName

String propertyName
The proeprty we are intiereted in


syntheticFullBinding

BindingUpdatable syntheticFullBinding


 
Constructor Detail

BindPath

BindPath()


 
Method Detail

addAllListeners

public void addAllListeners(PropertyChangeListener listener, Object newObject, Set updateSet)
Adds all the listeners to the objects in the bind path. This assumes that we are not added as listeners to any of them, hence it is not idempotent.
param:
listener This listener to attach.
param:
newObject The object we should read our property off of.
param:
updateSet The list of objects we have added listeners to


addListeners

public void addListeners(PropertyChangeListener listener, Object newObject, Set updateSet)
Add listeners to a specific object. Updates the bould flags and update set
param:
listener This listener to attach.
param:
newObject The object we should read our property off of.
param:
updateSet The list of objects we have added listeners to


getSyntheticTriggerBinding

public TriggerBinding getSyntheticTriggerBinding(Object newObject)


removeListeners

public void removeListeners()
Remove listeners, believeing that our bould flags are accurate and it removes only as declared.


updateLocalSyntheticProperties

public void updateLocalSyntheticProperties(Map synthetics)


updatePath

public void updatePath(PropertyChangeListener listener, Object newObject, Set updateSet)
Called when we detect a change somewherer down our path. First, check to see if our object is changing. If so remove our old listener Next, update the reference object the children have and recurse Finally, add listeners if we have a different object
param:
listener This listener to attach.
param:
newObject The object we should read our property off of.
param:
updateSet The list of objects we have added listeners to


 

Copyright © 2003-2009 The Codehaus. All rights reserved.