net.sourceforge.nite.tools.dacoder
Class DAEditorModule

java.lang.Object
  extended by net.sourceforge.nite.tools.dacoder.DAEditorModule
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, SignalListener, NTASelectionListener, NOMWriteElementContainer

public class DAEditorModule
extends java.lang.Object
implements NTASelectionListener, java.awt.event.ActionListener, SignalListener, NOMWriteElementContainer

This Editor Module is the first step in the 'plug-in' like restructuring of ou annotation tools. The editor module provides a graphical interface (JComponent... e.g. JPanel) for editing elements of a certain type (Dialogue acts). The module also provides a number of editing functions for external access, such as may be createNewElement or deleteCurrentElement. And last but not least the module provides an ActionMap of actions, which can be connected to keypresses in main tool, or displayed as a toolbar...


Field Summary
static java.lang.String CHANGE_DA_RANGE_ACTION
          Change text range for DA.
static java.lang.String CHANGE_DA_TYPE_ACTION
          Change type
static java.lang.String CHECK_ADDRESSEE_ACTION
          Check addressee of a DA.
static java.lang.String CHECK_ALL_ADDRESSEES_ACTION
          Check all participants as addressees of a DA.
static java.lang.String CHECK_REFLEXIVITY_ACTION
          Check reflexivity checkbox.
static java.lang.String DELETE_DA_ACTION
          Delete DA action: Delete the current dialog act in the editPane after asking for confirmation.
static java.lang.String DELETE_DA_ACTION_NO_CONFIRM
          Delete DA action without confirm: Immediately delete the current dialog act in the editPane.
static java.lang.String NEW_DA_ACTION
          New DA action: Create a new dialog act and display it in edit pane
static int NORMAL
           
static java.lang.String SET_DA_COMMENT_ACTION
          set comment action
static java.lang.String UNCHECK_ALL_ADDRESSEES_ACTION
          Uncheck all addressees of a DA.
static int WAITING
           
 
Constructor Summary
DAEditorModule(DACoder main)
           
DAEditorModule(DACoder main, java.lang.String longname, java.lang.String shortname)
          Alternative constructor that sets the long and short names of the discourse entities to be edited in this window (defaults: "Dialogue Act"; "DA").
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          Called for ontology popup menu.
 javax.swing.ActionMap getActionMap()
          Initializes (if still needed) and returns the ActionMap for this module.
 NOMWriteElement getCurrentElement()
           
 javax.swing.JComponent getPanel()
           
 void layoutAddresseeChecks()
           
 void selectionChanged()
          Depending on the state of the editormodule , this method reacts appropriately to selection changes (change range, or set current element
 void setCurrentElement(NOMWriteElement element)
           
 void setType(NOMElement newType)
          Change the dialogue act type of the current element
 void setType(java.lang.String newType)
          Change the dialogue act type of the current element - this version takes a String and assumes that getDAAttributeName is non-null (i.e.
 void signalChanged(java.lang.String name)
          Called when another signal is loaded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

WAITING

public static final int WAITING
See Also:
Constant Field Values

NEW_DA_ACTION

public static final java.lang.String NEW_DA_ACTION
New DA action: Create a new dialog act and display it in edit pane

See Also:
Constant Field Values

SET_DA_COMMENT_ACTION

public static final java.lang.String SET_DA_COMMENT_ACTION
set comment action

See Also:
Constant Field Values

CHANGE_DA_TYPE_ACTION

public static final java.lang.String CHANGE_DA_TYPE_ACTION
Change type

See Also:
Constant Field Values

DELETE_DA_ACTION

public static final java.lang.String DELETE_DA_ACTION
Delete DA action: Delete the current dialog act in the editPane after asking for confirmation.

See Also:
Constant Field Values

DELETE_DA_ACTION_NO_CONFIRM

public static final java.lang.String DELETE_DA_ACTION_NO_CONFIRM
Delete DA action without confirm: Immediately delete the current dialog act in the editPane.

See Also:
Constant Field Values

CHANGE_DA_RANGE_ACTION

public static final java.lang.String CHANGE_DA_RANGE_ACTION
Change text range for DA.

See Also:
Constant Field Values

CHECK_ADDRESSEE_ACTION

public static final java.lang.String CHECK_ADDRESSEE_ACTION
Check addressee of a DA.

See Also:
Constant Field Values

CHECK_ALL_ADDRESSEES_ACTION

public static final java.lang.String CHECK_ALL_ADDRESSEES_ACTION
Check all participants as addressees of a DA.

See Also:
Constant Field Values

UNCHECK_ALL_ADDRESSEES_ACTION

public static final java.lang.String UNCHECK_ALL_ADDRESSEES_ACTION
Uncheck all addressees of a DA.

See Also:
Constant Field Values

CHECK_REFLEXIVITY_ACTION

public static final java.lang.String CHECK_REFLEXIVITY_ACTION
Check reflexivity checkbox.

See Also:
Constant Field Values
Constructor Detail

DAEditorModule

public DAEditorModule(DACoder main)

DAEditorModule

public DAEditorModule(DACoder main,
                      java.lang.String longname,
                      java.lang.String shortname)
Alternative constructor that sets the long and short names of the discourse entities to be edited in this window (defaults: "Dialogue Act"; "DA").

Method Detail

getActionMap

public javax.swing.ActionMap getActionMap()
Initializes (if still needed) and returns the ActionMap for this module. The action names are stored in public variables in this class.


setType

public void setType(NOMElement newType)
Change the dialogue act type of the current element


setType

public void setType(java.lang.String newType)
Change the dialogue act type of the current element - this version takes a String and assumes that getDAAttributeName is non-null (i.e. we're using an enumerated attribute rather than a type ontology). JK 22/3/06.


getPanel

public javax.swing.JComponent getPanel()

setCurrentElement

public void setCurrentElement(NOMWriteElement element)

getCurrentElement

public NOMWriteElement getCurrentElement()
Specified by:
getCurrentElement in interface NOMWriteElementContainer

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Called for ontology popup menu. Change type...

Specified by:
actionPerformed in interface java.awt.event.ActionListener

selectionChanged

public void selectionChanged()
Depending on the state of the editormodule , this method reacts appropriately to selection changes (change range, or set current element

Specified by:
selectionChanged in interface NTASelectionListener

layoutAddresseeChecks

public void layoutAddresseeChecks()

signalChanged

public void signalChanged(java.lang.String name)
Description copied from interface: SignalListener

Called when another signal is loaded.

Specified by:
signalChanged in interface SignalListener
Parameters:
name - the name of the new signal