NWNDialogEditorInterface
Class MainWindow.EditWindow.DialogTreeNode

java.lang.Object
  |
  +--NWNDialogEditorInterface.MainWindow.EditWindow.DialogTreeNode
Enclosing class:
MainWindow.EditWindow

protected class MainWindow.EditWindow.DialogTreeNode
extends Object

Author:
Alexandre Brunel Class used to represent a dialog node in the JTree.

Constructor Summary
MainWindow.EditWindow.DialogTreeNode(GFFFile.Structure _node, GFFFile.Structure _nodeRef, boolean _isEntry)
          Returns a new TreeNode.
 
Method Summary
 long countWords()
          Counts the words in the english phrase.
 GFFFile.Structure getNode()
           
 GFFFile.Structure getNodeRef()
           
 boolean isEntry()
           
 boolean isLink()
           
 String toString()
          Converts the object to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MainWindow.EditWindow.DialogTreeNode

public MainWindow.EditWindow.DialogTreeNode(GFFFile.Structure _node,
                                            GFFFile.Structure _nodeRef,
                                            boolean _isEntry)
Returns a new TreeNode.

Parameters:
_node - node The dialog node
_nodeRef - The structure pointing to the node.
_isEntry - A boolean value which is true if the node is a speaker entry, false if it's a PC reply
Method Detail

countWords

public long countWords()
Counts the words in the english phrase.

Returns:
Word count.

getNode

public GFFFile.Structure getNode()
Returns:
The dialog node.

getNodeRef

public GFFFile.Structure getNodeRef()
Returns:
The structure pointing to the node.

isEntry

public boolean isEntry()
Returns:
Returns true if the node is a speaker entry, false if it's a PC reply.

isLink

public boolean isLink()
Returns:
true if this node is a link to another node.

toString

public String toString()
Converts the object to a string. This methode is used to display the node text in dialog tree. The returned String depends on the selected language and gender in the EditWindow that contains the dialog tree.

Overrides:
toString in class Object
Returns:
This methode returns a String containing the node text.
See Also:
Object.toString()