All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jclass.bwt.JCTextInterface

public interface JCTextInterface

Method Index

 o addTextCursorListener(JCTextCursorListener)
Adds the specified JCTextCursorEvent listener to receive cursor movement events.
 o addTextListener(JCTextListener)
Adds the specified listener to receive text events.
 o append(String)
Appends text to the end.
 o beep()
Emits a beep.
 o getChanged()
Returns true if the user has changed the value since the last programmatic setting.
 o getColumns()
Returns the number of columns.
 o getCursorPosition()
Gets the position of the cursor.
 o getEditable()
Returns the boolean indicating whether this component is editable or not.
 o getLastPosition()
Gets the position of the last character in the text.
 o getMinimumSize(int)
Returns the minimum size needed for the specified number of columns.
 o getOverstrike()
Gets the Overstrike value.
 o getSelectedBackground()
Gets the SelectedBackground value.
 o getSelectedForeground()
Gets the SelectedForeground value.
 o getSelectedText()
Returns the selected text contained in this component.
 o getSelectionEnd()
Returns the selected text's end position.
 o getSelectionList()
Gets the current SelectionList.
 o getSelectionStart()
Returns the selected text's start position.
 o getShowCursorPosition()
Gets the ShowCursorPosition value.
 o getText()
Returns the text contained in this component.
 o insert(String, int)
Inserts text at the specified position.
 o isEditable()
Returns the boolean indicating whether this component is editable or not.
 o pointToPosition(int, int)
Maps a physical position to the corresponding character position.
 o replaceRange(String, int, int)
Replaces text between two positions with the specified text.
 o select(int, int)
Selects the text found between the specified start and end locations.
 o selectAll()
Selects all the text in the component.
 o setAlignment(int)
Sets the position of the text:
BWTEnum.LEFT (default), CENTER, or RIGHT.
 o setColumns(int)
Sets the number of columns.
 o setCursorPosition(int)
Sets the position of the cursor.
 o setEditable(boolean)
Determines whether this component is editable.
 o setMaximumLength(int)
Sets the maximum number of characters which may be entered by the user (default: BWTEnum.MAXINT).
 o setOverstrike(boolean)
If false (default), characters typed by the user are inserted into the current text.
 o setSelectedBackground(Color)
Sets the background color of selected text (default: blue).

HTML param name/value: "SelectedBackground"/color

 o setSelectedForeground(Color)
Sets the foreground color of selected text (default: background color).

HTML param name/value: "SelectedForeground"/color

 o setSelectionEnd(int)
Sets the selected text's end position.
 o setSelectionList(int[])
Sets a list of values used for multi-click.
 o setSelectionStart(int)
Sets the selected text's start position.
 o setShowCursorPosition(boolean)
If set to true (default), the cursor position will be indicated with a vertical I-beam.
 o setStringCase(int)
Sets the case of text entered by the user or set programmatically:
BWTEnum.CASE_AS_IS       No conversion (default)
BWTEnum.CASE_LOWER       Convert to lower case
BWTEnum.CASE_UPPER       Convert to upper case
 o setText(String)
Sets the text of this component to the specified text.
 o showPosition(int)
Scrolls the text if necessary to ensure that the position is visible.

Methods

 o setText
 public abstract void setText(String t)
Sets the text of this component to the specified text.

See Also:
getText
 o getText
 public abstract String getText()
Returns the text contained in this component.

See Also:
setText
 o getSelectedText
 public abstract String getSelectedText()
Returns the selected text contained in this component.

See Also:
setText
 o isEditable
 public abstract boolean isEditable()
Returns the boolean indicating whether this component is editable or not.

See Also:
setEditable
 o getEditable
 public abstract boolean getEditable()
Returns the boolean indicating whether this component is editable or not.

See Also:
setEditable
 o setEditable
 public abstract void setEditable(boolean t)
Determines whether this component is editable.

See Also:
isEditable
 o getSelectionStart
 public abstract int getSelectionStart()
Returns the selected text's start position.

 o getSelectionEnd
 public abstract int getSelectionEnd()
Returns the selected text's end position.

 o setSelectionStart
 public abstract void setSelectionStart(int pos)
Sets the selected text's start position.

 o setSelectionEnd
 public abstract void setSelectionEnd(int pos)
Sets the selected text's end position.

 o select
 public abstract void select(int start,
                             int end)
Selects the text found between the specified start and end locations.

 o selectAll
 public abstract void selectAll()
Selects all the text in the component.

 o insert
 public abstract void insert(String str,
                             int pos)
Inserts text at the specified position.

See Also:
setText, replaceRange
 o append
 public abstract void append(String str)
Appends text to the end.

See Also:
insert
 o replaceRange
 public abstract void replaceRange(String str,
                                   int start,
                                   int end)
Replaces text between two positions with the specified text.

 o getColumns
 public abstract int getColumns()
Returns the number of columns.

 o setColumns
 public abstract void setColumns(int v)
Sets the number of columns.

 o setAlignment
 public abstract void setAlignment(int v)
Sets the position of the text:
BWTEnum.LEFT (default), CENTER, or RIGHT.

 o setMaximumLength
 public abstract void setMaximumLength(int v)
Sets the maximum number of characters which may be entered by the user (default: BWTEnum.MAXINT). If the user attempts to enter more characters, the values will be ignored and the bell will be sounded. This value is ignored for values set programmatically.

 o setStringCase
 public abstract void setStringCase(int v)
Sets the case of text entered by the user or set programmatically:
BWTEnum.CASE_AS_IS       No conversion (default)
BWTEnum.CASE_LOWER       Convert to lower case
BWTEnum.CASE_UPPER       Convert to upper case

 o beep
 public abstract void beep()
Emits a beep.

 o getChanged
 public abstract boolean getChanged()
Returns true if the user has changed the value since the last programmatic setting.

 o getMinimumSize
 public abstract Dimension getMinimumSize(int columns)
Returns the minimum size needed for the specified number of columns.

 o getSelectionList
 public abstract int[] getSelectionList()
Gets the current SelectionList.

See Also:
setSelectionList
 o setSelectionList
 public abstract void setSelectionList(int list[])
Sets a list of values used for multi-click. As the mouse is clicked in rapid succession, each click selects the next type in the list. Valid BWTEnum values (in order of the default list):
 SELECT_POSITION     Selects the current pointer position
 SELECT_WORD         Selects the current word
 SELECT_LINE         Selects the current line
 SELECT_PARAGRAPH    Selects the current paragraph
 SELECT_ALL          Selects all the text
 
Default list: { BWTEnum.SELECT_POSITION, SELECT_WORD, SELECT_LINE, SELECT_ALL }

 o getSelectedBackground
 public abstract Color getSelectedBackground()
Gets the SelectedBackground value.

See Also:
setSelectedBackground
 o setSelectedBackground
 public abstract void setSelectedBackground(Color v)
Sets the background color of selected text (default: blue).

HTML param name/value: "SelectedBackground"/color

See Also:
toColor
 o getSelectedForeground
 public abstract Color getSelectedForeground()
Gets the SelectedForeground value.

See Also:
setSelectedForeground
 o setSelectedForeground
 public abstract void setSelectedForeground(Color v)
Sets the foreground color of selected text (default: background color).

HTML param name/value: "SelectedForeground"/color

See Also:
toColor
 o pointToPosition
 public abstract int pointToPosition(int x,
                                     int y)
Maps a physical position to the corresponding character position.

 o showPosition
 public abstract void showPosition(int pos)
Scrolls the text if necessary to ensure that the position is visible.

Parameters:
pos - the number of characters from the beginning of the text buffer.
 o getCursorPosition
 public abstract int getCursorPosition()
Gets the position of the cursor.

See Also:
setCursorPosition
 o setCursorPosition
 public abstract void setCursorPosition(int pos)
Sets the position of the cursor.

 o setOverstrike
 public abstract void setOverstrike(boolean v)
If false (default), characters typed by the user are inserted into the current text.

 o getOverstrike
 public abstract boolean getOverstrike()
Gets the Overstrike value.

See Also:
setOverstrike
 o getLastPosition
 public abstract int getLastPosition()
Gets the position of the last character in the text. This represents the position that text appended to the component would be placed after.

 o getShowCursorPosition
 public abstract boolean getShowCursorPosition()
Gets the ShowCursorPosition value.

See Also:
setShowCursorPosition
 o setShowCursorPosition
 public abstract void setShowCursorPosition(boolean v)
If set to true (default), the cursor position will be indicated with a vertical I-beam.

 o addTextListener
 public abstract void addTextListener(JCTextListener l)
Adds the specified listener to receive text events.

See Also:
JCTextEvent
 o addTextCursorListener
 public abstract void addTextCursorListener(JCTextCursorListener l)
Adds the specified JCTextCursorEvent listener to receive cursor movement events.

See Also:
JCTextCursorEvent

All Packages  Class Hierarchy  This Package  Previous  Next  Index