net.refractions.udig.project
Class LayerEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.refractions.udig.project.LayerEvent
All Implemented Interfaces:
java.io.Serializable

public class LayerEvent
extends java.util.EventObject

An event indicating a change in a layer.

Since:
1.0.0
Author:
Jesse
See Also:
Serialized Form

Nested Class Summary
static class LayerEvent.EventType
           
 
Field Summary
static int ALL
          Indicates something somewhere is different - make no assumptions
static int FILTER
          Indicate a change has occured the the filter (defines the selection)
static int RESOURCE
          Resource used by the layer has changed
static int STYLE
          The contents of the blackboard have changed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LayerEvent(ILayer layer)
          Creates a new event for the given source, indicating that all labels provided by the source are no longer valid and should be updated.
LayerEvent(ILayer layer, LayerEvent.EventType type)
          Creates a specific kind of layer event, FILTER, RESOURCE, ALL or STYLE
LayerEvent(ILayer layer, LayerEvent.EventType type, java.lang.Object oldValue, java.lang.Object newValue)
          Creates a specific kind of layer event, FILTER, RESOURCE, ALL or STYLE
 
Method Summary
 java.lang.Object getNewValue()
           
 java.lang.Object getOldValue()
           
 ILayer getSource()
          The layer being modified.
 LayerEvent.EventType getType()
          Type of event
 void setNewValue(java.lang.Object newValue)
           
 void setOldValue(java.lang.Object oldValue)
           
 void setType(LayerEvent.EventType type)
          Type of event
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FILTER

public static final int FILTER
Indicate a change has occured the the filter (defines the selection)


RESOURCE

public static final int RESOURCE
Resource used by the layer has changed


ALL

public static final int ALL
Indicates something somewhere is different - make no assumptions


STYLE

public static final int STYLE
The contents of the blackboard have changed.

Constructor Detail

LayerEvent

public LayerEvent(ILayer layer)
Creates a new event for the given source, indicating that all labels provided by the source are no longer valid and should be updated.

Parameters:
source - the label provider

LayerEvent

public LayerEvent(ILayer layer,
                  LayerEvent.EventType type)
Creates a specific kind of layer event, FILTER, RESOURCE, ALL or STYLE


LayerEvent

public LayerEvent(ILayer layer,
                  LayerEvent.EventType type,
                  java.lang.Object oldValue,
                  java.lang.Object newValue)
Creates a specific kind of layer event, FILTER, RESOURCE, ALL or STYLE

Method Detail

getSource

public ILayer getSource()
The layer being modified.

Overrides:
getSource in class java.util.EventObject
Returns:
The modified layer
See Also:
ILayer

getNewValue

public java.lang.Object getNewValue()
Returns:
the newValue.

setNewValue

public void setNewValue(java.lang.Object newValue)
Parameters:
newValue - The newValue to set.

getOldValue

public java.lang.Object getOldValue()
Returns:
Returns the oldValue.

setOldValue

public void setOldValue(java.lang.Object oldValue)
Parameters:
oldValue - The oldValue to set.

getType

public LayerEvent.EventType getType()
Type of event


setType

public void setType(LayerEvent.EventType type)
Type of event

Parameters:
type -
See Also:
LayerEvent.EventType