org.jext.event
Class JextEvent

java.lang.Object
  extended byorg.jext.event.JextEvent

public class JextEvent
extends java.lang.Object

The JextEvent emitted by Jext windows on the order of a Jext instance or on the order of another class (JextTextArea for example).

Author:
Romain Guy
See Also:
JextListener

Field Summary
static int BATCH_MODE_SET
          Event type indicating batch mode is on
static int BATCH_MODE_UNSET
          Event type indicating batch mode is off
static int CHANGED_UPDATE
          Event type indicating a change in a text area
static int CLOSING_WINDOW
          Event type indicating a window was closed
static int FILE_CLEARED
          Event type indicating a file was cleared (new)
static int FILE_OPENED
          Event type indicating a file was opened
static int INSERT_UPDATE
          Event type indicating an insertion in a text area
static int KILLING_JEXT
          Event type indicating the last Jext window is being killed, and maybe Jext itself.
static int OPENING_WINDOW
          Event type indicating a new window was opened
static int PROPERTIES_CHANGED
          Event type indicating a change of the options
static int REMOVE_UPDATE
          Event type indicating a removing in a text area
static int SYNTAX_MODE_CHANGED
          Event type indicating a change of the colorizing syntax mode
static int TEXT_AREA_CLOSED
          Event type indicating a text area was closed
static int TEXT_AREA_FOCUS_GAINED
          Event type indicating current selected text area has gained focus.
static int TEXT_AREA_OPENED
          Event type indicating a new text area is available
static int TEXT_AREA_SELECTED
          Event type indicating current selected text area has changed
 
Constructor Summary
JextEvent(JextFrame parent, int eventType)
          Creates a new JextEvent, registering the parent of this event, the type of the event and also the text area which was selected when event was created.
JextEvent(JextFrame parent, JextTextArea textArea, int eventType)
          Creates a new JextEvent, registering the parent of this event, the type of the event and also the text area which was selected when event was created.
 
Method Summary
 JextFrame getJextFrame()
          Returns the Jext parent from which the event has been fired.
 JextTextArea getTextArea()
          Returns the text area which was visible when the event has been fired as the selected text area may have changed when event is received due to the action of another listener.
 int getWhat()
          Returns the type of event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_CHANGED

public static final int PROPERTIES_CHANGED
Event type indicating a change of the options

See Also:
Constant Field Values

SYNTAX_MODE_CHANGED

public static final int SYNTAX_MODE_CHANGED
Event type indicating a change of the colorizing syntax mode

See Also:
Constant Field Values

CHANGED_UPDATE

public static final int CHANGED_UPDATE
Event type indicating a change in a text area

See Also:
Constant Field Values

INSERT_UPDATE

public static final int INSERT_UPDATE
Event type indicating an insertion in a text area

See Also:
Constant Field Values

REMOVE_UPDATE

public static final int REMOVE_UPDATE
Event type indicating a removing in a text area

See Also:
Constant Field Values

FILE_OPENED

public static final int FILE_OPENED
Event type indicating a file was opened

See Also:
Constant Field Values

FILE_CLEARED

public static final int FILE_CLEARED
Event type indicating a file was cleared (new)

See Also:
Constant Field Values

BATCH_MODE_SET

public static final int BATCH_MODE_SET
Event type indicating batch mode is on

See Also:
Constant Field Values

BATCH_MODE_UNSET

public static final int BATCH_MODE_UNSET
Event type indicating batch mode is off

See Also:
Constant Field Values

TEXT_AREA_FOCUS_GAINED

public static final int TEXT_AREA_FOCUS_GAINED
Event type indicating current selected text area has gained focus. UNUSED

See Also:
Constant Field Values

TEXT_AREA_SELECTED

public static final int TEXT_AREA_SELECTED
Event type indicating current selected text area has changed

See Also:
Constant Field Values

TEXT_AREA_OPENED

public static final int TEXT_AREA_OPENED
Event type indicating a new text area is available

See Also:
Constant Field Values

TEXT_AREA_CLOSED

public static final int TEXT_AREA_CLOSED
Event type indicating a text area was closed

See Also:
Constant Field Values

OPENING_WINDOW

public static final int OPENING_WINDOW
Event type indicating a new window was opened

See Also:
Constant Field Values

CLOSING_WINDOW

public static final int CLOSING_WINDOW
Event type indicating a window was closed

See Also:
Constant Field Values

KILLING_JEXT

public static final int KILLING_JEXT
Event type indicating the last Jext window is being killed, and maybe Jext itself. In the background mode, in fact, when the last window of Jext is closed, you'll get this event and you should, i.e., save properties; but when a new window is created, the start method won't be called, so it won't be able to reinitialize freed resources. If Jext instead is completely closed, Plugin.stop() is called. But it is not assured that the stop method will be called, for instance if the user shutdowns the PC while Jext is still in the bg(and the user won't close Jext when it's in the BG). So don't rely on stop().

See Also:
Constant Field Values
Constructor Detail

JextEvent

public JextEvent(JextFrame parent,
                 int eventType)
Creates a new JextEvent, registering the parent of this event, the type of the event and also the text area which was selected when event was created.

Parameters:
parent - Jext parent
eventType - A int value which determine the nature of the event

JextEvent

public JextEvent(JextFrame parent,
                 JextTextArea textArea,
                 int eventType)
Creates a new JextEvent, registering the parent of this event, the type of the event and also the text area which was selected when event was created.

Parameters:
parent - Jext parent
eventType - A int value which determine the nature of the event
Method Detail

getWhat

public int getWhat()
Returns the type of event.

Returns:
A int indicating the type of the fired event

getJextFrame

public JextFrame getJextFrame()
Returns the Jext parent from which the event has been fired.

Returns:
A Jext instance, indicating which window has fired the event

getTextArea

public JextTextArea getTextArea()
Returns the text area which was visible when the event has been fired as the selected text area may have changed when event is received due to the action of another listener.

Returns:
A JextTextArea designating the selected text area when event has been fired


Copyright © 2002 Romain Guy.