com.levigo.jadice.document.render
Class RenderSettingsEvent

java.lang.Object
  extended by com.levigo.jadice.document.render.RenderSettingsEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InventoryRenderSettingsEvent

public class RenderSettingsEvent
extends Object
implements Serializable

This event gets delivered whenever a RenderSettings property change happen.

This event provides access to the name, the old and new value of the changed property. If the new value is a primitive type (such as int or boolean) it must be wrapped as the corresponding java.lang.* object type (such as Integer or Boolean).

Null values may be provided for the old and the new values if their true values are not known.

A reference of the changed RenderSettings can be obtained by a call of getSource(). If available, the RenderControls instance which the render setting belongs to can be accessed by a call of getSourceControls().

The types of render settings which support change event propagation are descendants of AbstractListenableRenderSettings.

See Also:
Serialized Form

Constructor Summary
RenderSettingsEvent(RenderControls parent, RenderSettings source, String propertyName, Object oldValue, Object newValue)
          Constructor
RenderSettingsEvent(RenderSettingsEvent evt)
          Copy constructor
 
Method Summary
 Object getNewValue()
          Gets the new value of the changed setting, expressed as an Object.
 Object getOldValue()
          Gets the old value of the changed setting, expressed as an Object.
 String getPropertyName()
          Gets the name of the setting that was changed.
 RenderSettings getSource()
          Returns the source RenderSettings instance which caused this event.
 RenderControls getSourceControls()
          Returns the RenderControls instance the source RenderSettings belongs to.
 String paramString()
          Returns a parameter string identifying this event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderSettingsEvent

public RenderSettingsEvent(RenderControls parent,
                           RenderSettings source,
                           String propertyName,
                           Object oldValue,
                           Object newValue)
Constructor

Parameters:
parent - the render controls the changed render settings object belongs to
source - the changed render settings object
propertyName - the name of the changed property
oldValue - the old value of the property
newValue - the new value of the property

RenderSettingsEvent

public RenderSettingsEvent(RenderSettingsEvent evt)
Copy constructor

Parameters:
evt - the event which should be copied
Method Detail

getSource

public RenderSettings getSource()
Returns the source RenderSettings instance which caused this event.


getSourceControls

public RenderControls getSourceControls()
Returns the RenderControls instance the source RenderSettings belongs to. May be null if unknown.


getPropertyName

public String getPropertyName()
Gets the name of the setting that was changed.

Returns:
The name of the setting that was changed.

getNewValue

public Object getNewValue()
Gets the new value of the changed setting, expressed as an Object.

Returns:
The new value, expressed as an Object.

getOldValue

public Object getOldValue()
Gets the old value of the changed setting, expressed as an Object.

Returns:
The old value, expressed as an Object.

toString

public String toString()
Overrides:
toString in class Object

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.

Returns:
a string identifying the event and its attributes


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.