org.geotools.event
Class AbstractGTRoot

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.event.AbstractGTRoot
All Implemented Interfaces:
GTComponent, GTRoot
Direct Known Subclasses:
StyledLayerDescriptorImpl

public abstract class AbstractGTRoot
extends AbstractGTComponent
implements GTRoot

Provides basic StyleEvent notification, may be used in conjuction with StyleList during event handling.

This class has package scope to prevent user code mistaking it for something important. It is only used to assist in the construction of this one implementation of StyleEvents. Basically this is NOT API :-)

Since:
2.2.M3

Field Summary
 
Fields inherited from interface org.geotools.event.GTRoot
NO_PARENT
 
Constructor Summary
AbstractGTRoot()
           
 
Method Summary
 void addListener(GTListener listener)
          Listens to changes in the Style content.
 void changed(GTDelta childDelta)
          Used to pass on "We changed" notification from children.
protected  java.lang.Object clone()
           
protected  void fire(GTDelta delta)
          Issue a change event w/ POST_CHANGE
protected  void fire(GTEvent event)
          Provides notification of daring do (and undo) in style space.
protected  void fireChanged()
          Simple notification that we changed.
protected  void fireChildChanged(java.lang.String childName, java.lang.Object child, java.lang.Object oldValue)
          Create a child delta and send it off.
protected  boolean hasListeners()
           
 void removed(GTDelta childDelta)
          Used to pass on "something is about to change" notification from children.
 void removeListener(GTListener listener)
          Remove a style listener
 
Methods inherited from class org.geotools.event.AbstractGTComponent
getNote, getParent, setNote
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.event.GTRoot
getParent
 
Methods inherited from interface org.geotools.event.GTComponent
getNote, setNote
 

Constructor Detail

AbstractGTRoot

public AbstractGTRoot()
Method Detail

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class AbstractGTComponent
Throws:
java.lang.CloneNotSupportedException

removed

public void removed(GTDelta childDelta)
Used to pass on "something is about to change" notification from children.

Specified by:
removed in interface GTRoot
Overrides:
removed in class AbstractGTComponent
Parameters:
childDelta - object containing change information

changed

public void changed(GTDelta childDelta)
Used to pass on "We changed" notification from children.

Specified by:
changed in interface GTRoot
Overrides:
changed in class AbstractGTComponent
Parameters:
childDelta - object containing change information

fireChanged

protected void fireChanged()
Simple notification that we changed.

Change will be passed on to parent.changed( delta ).

Overrides:
fireChanged in class AbstractGTComponent

fireChildChanged

protected final void fireChildChanged(java.lang.String childName,
                                      java.lang.Object child,
                                      java.lang.Object oldValue)
Create a child delta and send it off.

Use this for changes to simple types like int and Color.

Overrides:
fireChildChanged in class AbstractGTComponent
Parameters:
childName - used to the child (often bean propertyName or map key)
child -
oldValue - DOCUMENT ME!

addListener

public void addListener(GTListener listener)
Listens to changes in the Style content.

Changes are provided:

Since the Style data structure can be vast and complicated a trail of breadcrumbs (a delta) is provided to help find your way to the change.

Specified by:
addListener in interface GTRoot
Parameters:
listener -

removeListener

public void removeListener(GTListener listener)
Remove a style listener

Specified by:
removeListener in interface GTRoot
Parameters:
listener - Listen to notifications

fire

protected void fire(GTEvent event)
Provides notification of daring do (and undo) in style space.

Parameters:
event - Event describing notification

fire

protected void fire(GTDelta delta)
Issue a change event w/ POST_CHANGE

Parameters:
delta - Used to quickly fire off a child delta

hasListeners

protected boolean hasListeners()


Copyright © GeoTools. All Rights Reserved.