org.fife.rtext
Class CurrentTextAreaEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.fife.rtext.CurrentTextAreaEvent
All Implemented Interfaces:
java.io.Serializable

public class CurrentTextAreaEvent
extends java.util.EventObject

Event that notifies when a property of the current text area changes.

Version:
0.6
Author:
Robert Futrell
See Also:
Serialized Form

Field Summary
static int FILE_NAME_CHANGED
          Fired when the current text area's filename is changed.
static int IS_MODIFIED_CHANGED
          Fired when the current text area is made dirty or saved.
static int SYNTAX_STYLE_CNANGED
          Fired when the current text area's syntax style changes.
static int TEXT_AREA_CHANGED
          Fired when the currently active text area changes.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CurrentTextAreaEvent(AbstractMainView mainView, int type, java.lang.Object oldValue, java.lang.Object newValue)
          Constructor.
 
Method Summary
 AbstractMainView getMainView()
          Returns the main view whose current text area (or a property of it) changed.
 java.lang.Object getNewValue()
          Returns the new value of the current text area property.
 java.lang.Object getOldValue()
          Returns the old value of the current text area property.
 int getType()
          Returns the type of property that changed.
 java.lang.String toString()
          Returns a string representation of this event.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT_AREA_CHANGED

public static final int TEXT_AREA_CHANGED
Fired when the currently active text area changes.

See Also:
Constant Field Values

IS_MODIFIED_CHANGED

public static final int IS_MODIFIED_CHANGED
Fired when the current text area is made dirty or saved.

See Also:
Constant Field Values

FILE_NAME_CHANGED

public static final int FILE_NAME_CHANGED
Fired when the current text area's filename is changed.

See Also:
Constant Field Values

SYNTAX_STYLE_CNANGED

public static final int SYNTAX_STYLE_CNANGED
Fired when the current text area's syntax style changes.

See Also:
Constant Field Values
Constructor Detail

CurrentTextAreaEvent

public CurrentTextAreaEvent(AbstractMainView mainView,
                            int type,
                            java.lang.Object oldValue,
                            java.lang.Object newValue)
Constructor.

Parameters:
mainView - The main view whose current text area (or a property of it) changed.
type - The type of property that changed.
oldValue - The old value of the property.
newValue - The new value of the property.
Method Detail

getNewValue

public java.lang.Object getNewValue()
Returns the new value of the current text area property.

Returns:
The new value.

getOldValue

public java.lang.Object getOldValue()
Returns the old value of the current text area property.

Returns:
The old value.

getMainView

public AbstractMainView getMainView()
Returns the main view whose current text area (or a property of it) changed.

Returns:
The main view.

getType

public int getType()
Returns the type of property that changed. This allows you to know what type the old and new value objects are.

Returns:
The type of property that changed.

toString

public java.lang.String toString()
Returns a string representation of this event. Useful for debugging.

Overrides:
toString in class java.util.EventObject
Returns:
A string representation of this event.