com.borland.primetime.node
Class TextFileNode

java.lang.Object
  |
  +--com.borland.primetime.node.Node
        |
        +--com.borland.primetime.node.UrlNode
              |
              +--com.borland.primetime.node.FileNode
                    |
                    +--com.borland.primetime.node.TextFileNode
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
CPPFileNode, HTMLFileNode, IDLFileNode, JavaFileNode, PropertiesFileNode, SchemaFileNode, SQLFileNode, SQLJFileNode, XMLFileNode

public class TextFileNode
extends FileNode


Field Summary
static java.lang.String EXTENSION
          The default extension of files represented by this class.
static javax.swing.Icon ICON
          The icon used for files for this class.
 
Fields inherited from class com.borland.primetime.node.Node
EMPTY_ARRAY, nodeListeners
 
Constructor Summary
TextFileNode(Project project, Node parent, Url url)
          All FileNode subtypes must expose this constructor signature.
 
Method Summary
 javax.swing.Icon getDisplayIcon()
          Returns the default icon for Node of this class.
 java.lang.Class getEditorKitClass()
          Get the TextEditorKit class used by this file node type to customize the editor.
 java.lang.String getEncoding()
          Describes the encoding used to read and write this text file.
 java.lang.Class getTextStructureClass()
          Get the type of the class that is responsible for filling in the structure pane.
static void initOpenTool(byte majorVersion, byte minorVersion)
          OpenTool initialization
 void setCaretPosition(int line, int column, boolean requestFocus)
          Attempts to set the caret at the given position.
 
Methods inherited from class com.borland.primetime.node.FileNode
check, findBuffer, findFileNodeClass, findFileNodeClass, findFileNodeClass, getBuffer, getDisplayName, getDisplaySequence, getInputStream, getLongDisplayName, getOutputStream, getTimestamp, getUrl, isModified, isNew, isPersistant, isReadOnly, registerFileNodeClass, rename, revert, save, saveAs, setUrl
 
Methods inherited from class com.borland.primetime.node.UrlNode
getSuggestedUrl
 
Methods inherited from class com.borland.primetime.node.Node
addNodeListener, compareTo, dumpNodes, dumpNodes, dumpNodes, equals, fireNodeRenamed, getChildren, getDisplayChildren, getNodeID, getParent, getProject, getProperties, getProperty, getProperty, getProperty, hasChildren, hasDisplayChildren, hashCode, makePersistant, removeNodeListener, setParent, setProperty, setProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
The default extension of files represented by this class.

ICON

public static final javax.swing.Icon ICON
The icon used for files for this class.
Constructor Detail

TextFileNode

public TextFileNode(Project project,
                    Node parent,
                    Url url)
             throws DuplicateNodeException
All FileNode subtypes must expose this constructor signature.
Parameters:
project - Project (cannot be null) to which this node will be associated.
parent - Immediate parent (may be null) of this node and must be of same Project.
url - The storage available to this node.
Throws:
DuplicateNodeException - if node already registered.
See Also:
Project.getNode(com.borland.primetime.vfs.Url)
Method Detail

initOpenTool

public static void initOpenTool(byte majorVersion,
                                byte minorVersion)
OpenTool initialization
Parameters:
majorVersion - Major release number for which OpenTool is being initialized.
minorVersion - Minor release number for which OpenTool is being initialized.

getTextStructureClass

public java.lang.Class getTextStructureClass()
Get the type of the class that is responsible for filling in the structure pane. This would normally be the TextStructure class.
Returns:
The type of the class responsible for filling the structure pane.

getEditorKitClass

public java.lang.Class getEditorKitClass()
Get the TextEditorKit class used by this file node type to customize the editor.
Returns:
The editor kit to use.

setCaretPosition

public void setCaretPosition(int line,
                             int column,
                             boolean requestFocus)
Attempts to set the caret at the given position.
Parameters:
line - The 1-based line number where to set caret.
column - The 1-based column position of the given line to set caret.
requestFocus - Causes focus to be moved to the Editor if true, otherwise line is just highlighted.

getEncoding

public java.lang.String getEncoding()
Describes the encoding used to read and write this text file.
Returns:
A Java encoding name, or null if the default encoding should be used.

getDisplayIcon

public javax.swing.Icon getDisplayIcon()
Returns the default icon for Node of this class.
Overrides:
getDisplayIcon in class FileNode
Returns:
Returns an icon.