Class marimba.gui.TextWidget
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.TextWidget

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.TextWidget

public class TextWidget
extends Widget
A generic text widget.
Version:
1.10, 12/04/96
Author:
Arthur van Hoff

Variable Index

 o editable
A textWidget can be editable or not editable.

Constructor Index

 o TextWidget()

Method Index

 o append(char)
Append to the end of text.
 o append(String)
Append to the end of text.
 o clear()
Clear the text.
 o delete()
Clear the current selection.
 o eventInText(Event)
Checks whether the given event is within the text area of this text widget.
 o focus(int)
Focus on a character position.
 o focusInterest()
This widget is interested in getting the character focus.
 o getLength()
Get the length of the text.
 o getProperties(PropertyList)
Get the properties of this widget.
 o getSelected()
Get the selected part of the text.
 o getSelEnd()
Return the end of the selection.
 o getSelStart()
Return the start of the selection.
 o getStringValue()
Get the value of the text.
 o getValue()
Get the value of the text.
 o handleEvent(Event)
Change the cursor when necessary.
 o insert(char)
Insert a character.
 o insert(String)
Insert a string at the current cursor position.
 o isEditable()
Check if this text is editable.
 o isWord(char)
Determine which characters are part of a word.
 o select(int)
Select a postition.
 o select(int, int)
Select a portion of the text.
 o select(int, int, int)
Select a portion of the text.
 o selectAll()
Select the entire text.
 o setEditable(boolean)
Make this text editable.
 o setProperties(PropertyList)
Set the properties of this widget.
 o setValue(Object)
Set the value of the text.

Variables

 o editable
  public boolean editable
A textWidget can be editable or not editable. This means that the content can be changed or not.
See Also:
isEditable, setEditable

Constructors

 o TextWidget
  public TextWidget()

Methods

 o isWord
  public static boolean isWord(char ch)
Determine which characters are part of a word.
 o getProperties
  public void getProperties(PropertyList list)
Get the properties of this widget.
Overrides:
getProperties in class Widget
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of this widget.
Overrides:
setProperties in class Widget
 o getStringValue
  public String getStringValue()
Get the value of the text.
 o getValue
  public Object getValue()
Get the value of the text.
Overrides:
getValue in class Widget
 o setValue
  public void setValue(Object value)
Set the value of the text.
Overrides:
setValue in class Widget
 o isEditable
  public boolean isEditable()
Check if this text is editable.
See Also:
editable
 o setEditable
  public void setEditable(boolean editable)
Make this text editable.
See Also:
editable
 o getLength
  public int getLength()
Get the length of the text.
 o getSelStart
  public int getSelStart()
Return the start of the selection.
 o getSelEnd
  public int getSelEnd()
Return the end of the selection.
 o getSelected
  public String getSelected()
Get the selected part of the text.
 o clear
  public void clear()
Clear the text.
 o delete
  public void delete()
Clear the current selection.
 o insert
  public void insert(char ch)
Insert a character. This wil first clear the selecton, before inserting the character.
 o insert
  public void insert(String str)
Insert a string at the current cursor position.
 o append
  public void append(char ch)
Append to the end of text.
 o append
  public void append(String str)
Append to the end of text.
 o focusInterest
  public boolean focusInterest()
This widget is interested in getting the character focus.
Overrides:
focusInterest in class Widget
 o selectAll
  public void selectAll()
Select the entire text.
 o select
  public void select(int pos)
Select a postition.
 o select
  public void select(int selStart,
                     int selEnd)
Select a portion of the text.
 o select
  public void select(int selStart,
                     int selEnd,
                     int depth)
Select a portion of the text. Depth controls character (1), word (2), and line selection (3).
 o focus
  public void focus(int pos)
Focus on a character position.
 o eventInText
  protected boolean eventInText(Event evt)
Checks whether the given event is within the text area of this text widget. Used in handleEvent to determine whether the mouse is in the text area so the cursor should be changed.
 o handleEvent
  public boolean handleEvent(Event evt)
Change the cursor when necessary.
Overrides:
handleEvent in class Widget

All Packages  Class Hierarchy  This Package  Previous  Next  Index