com.partnersoft.gui.forms
Class FormTextField

java.lang.Object
  extended by com.partnersoft.gui.forms.AbstractFormField<java.lang.String>
      extended by com.partnersoft.gui.forms.FormTextField
All Implemented Interfaces:
FormField<java.lang.String>

public class FormTextField
extends AbstractFormField<java.lang.String>

A FormField that allows you to modify multi-lined text.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis, Russell Cagle

Field Summary
 
Fields inherited from class com.partnersoft.gui.forms.AbstractFormField
gui
 
Constructor Summary
FormTextField()
           
FormTextField(boolean scrollingEnabled, boolean navigationBarEnabled)
           
FormTextField(int columns, int rows)
           
 
Method Summary
 boolean find(java.lang.String text, boolean incremental, boolean forward, boolean matchCase, boolean wholeWord, boolean regex)
           
 boolean findIncremental(java.lang.String text)
           
 boolean findNext(java.lang.String text)
           
 boolean findPrevious(java.lang.String text)
           
 int getColumnCount()
           
 int getCurrentLineNumber()
          Get the number of the line where the caret is.
 java.awt.Component getCustomNavigationControls()
           
 FormStringField getFindField()
           
 javax.swing.JPanel getNavigationBar()
           
 int getRowCount()
           
 org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getRSyntaxTextArea()
           
 java.lang.String getSyntaxStyle()
           
 java.lang.String getValue()
          Returns the current value for this field.
 void highlightLine(int lineNumber)
          Highlights the line at the given number.
 boolean isEditable()
           
 boolean isNavigationBarEnabled()
           
 boolean isScrollingEnabled()
           
 boolean replace(java.lang.String text, java.lang.String replacement, boolean forward, boolean matchCase, boolean wholeWord, boolean regex)
           
 boolean replaceNext(java.lang.String text, java.lang.String replacement)
           
 boolean replacePrevious(java.lang.String text, java.lang.String replacement)
           
 void setColumnAndRowCount(int columnCount, int rowCount)
           
 void setColumnCount(int newCount)
           
 void setCustomNavigationControls(java.awt.Component controls)
           
 void setEditable(boolean editable)
           
 void setNavigationBarEnabled(boolean navigationBarEnabled)
           
 void setRowCount(int newCount)
           
 void setScrollingEnabled(boolean scrollingEnabled)
           
 void setSyntaxStyle(java.lang.String syntaxStyle)
          Sets the syntax coloring mode for the editor.
 void setSyntaxStyleForFile(VfsFile file)
          Sets the syntax coloring mode for the editor based on the actual file.
 void setValue(java.lang.String newValue)
          Sets the current value for this field.
 
Methods inherited from class com.partnersoft.gui.forms.AbstractFormField
addFieldListener, doAction, fireActionRequested, fireValueChanged, getGui, isDisabled, removeFieldListener, setDisabled, setToolTipText, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormTextField

public FormTextField(int columns,
                     int rows)

FormTextField

public FormTextField()

FormTextField

public FormTextField(boolean scrollingEnabled,
                     boolean navigationBarEnabled)
Method Detail

getValue

public java.lang.String getValue()
Description copied from interface: FormField
Returns the current value for this field.


setValue

public void setValue(java.lang.String newValue)
Description copied from interface: FormField
Sets the current value for this field.


getRSyntaxTextArea

public org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getRSyntaxTextArea()

getCurrentLineNumber

public int getCurrentLineNumber()
Get the number of the line where the caret is. NOTE: the first line is 1, NOT 0.

Returns:
current line number

highlightLine

public void highlightLine(int lineNumber)
Highlights the line at the given number. NOTE: the first line is 1, NOT 0.

Parameters:
lineNumber -

getColumnCount

public int getColumnCount()

setColumnCount

public void setColumnCount(int newCount)

getRowCount

public int getRowCount()

setRowCount

public void setRowCount(int newCount)

setColumnAndRowCount

public void setColumnAndRowCount(int columnCount,
                                 int rowCount)

isNavigationBarEnabled

public boolean isNavigationBarEnabled()

setNavigationBarEnabled

public void setNavigationBarEnabled(boolean navigationBarEnabled)

isScrollingEnabled

public boolean isScrollingEnabled()

setScrollingEnabled

public void setScrollingEnabled(boolean scrollingEnabled)

setEditable

public void setEditable(boolean editable)

isEditable

public boolean isEditable()

getNavigationBar

public javax.swing.JPanel getNavigationBar()

getSyntaxStyle

public java.lang.String getSyntaxStyle()

setSyntaxStyle

public void setSyntaxStyle(java.lang.String syntaxStyle)
Sets the syntax coloring mode for the editor. This can be a mime type (e.g. text/java) or an extension (e.g. ".bat")

Parameters:
syntaxStyle -

setSyntaxStyleForFile

public void setSyntaxStyleForFile(VfsFile file)
Sets the syntax coloring mode for the editor based on the actual file.


find

public boolean find(java.lang.String text,
                    boolean incremental,
                    boolean forward,
                    boolean matchCase,
                    boolean wholeWord,
                    boolean regex)

replace

public boolean replace(java.lang.String text,
                       java.lang.String replacement,
                       boolean forward,
                       boolean matchCase,
                       boolean wholeWord,
                       boolean regex)

findIncremental

public boolean findIncremental(java.lang.String text)

findNext

public boolean findNext(java.lang.String text)

findPrevious

public boolean findPrevious(java.lang.String text)

replaceNext

public boolean replaceNext(java.lang.String text,
                           java.lang.String replacement)

replacePrevious

public boolean replacePrevious(java.lang.String text,
                               java.lang.String replacement)

setCustomNavigationControls

public void setCustomNavigationControls(java.awt.Component controls)

getCustomNavigationControls

public java.awt.Component getCustomNavigationControls()

getFindField

public FormStringField getFindField()