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
-
editable
- A textWidget can be editable or not editable.
-
TextWidget()
-
-
append(char)
- Append to the end of text.
-
append(String)
- Append to the end of text.
-
clear()
- Clear the text.
-
delete()
- Clear the current selection.
-
eventInText(Event)
- Checks whether the given event is within the text area of
this text widget.
-
focus(int)
- Focus on a character position.
-
focusInterest()
- This widget is interested in getting the character focus.
-
getLength()
- Get the length of the text.
-
getProperties(PropertyList)
- Get the properties of this widget.
-
getSelected()
- Get the selected part of the text.
-
getSelEnd()
- Return the end of the selection.
-
getSelStart()
- Return the start of the selection.
-
getStringValue()
- Get the value of the text.
-
getValue()
- Get the value of the text.
-
handleEvent(Event)
- Change the cursor when necessary.
-
insert(char)
- Insert a character.
-
insert(String)
- Insert a string at the current cursor position.
-
isEditable()
- Check if this text is editable.
-
isWord(char)
- Determine which characters are part of a word.
-
select(int)
- Select a postition.
-
select(int, int)
- Select a portion of the text.
-
select(int, int, int)
- Select a portion of the text.
-
selectAll()
- Select the entire text.
-
setEditable(boolean)
- Make this text editable.
-
setProperties(PropertyList)
- Set the properties of this widget.
-
setValue(Object)
- Set the value of the text.
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
TextWidget
public TextWidget()
isWord
public static boolean isWord(char ch)
- Determine which characters are part of a word.
getProperties
public void getProperties(PropertyList list)
- Get the properties of this widget.
- Overrides:
- getProperties in class Widget
setProperties
public void setProperties(PropertyList list)
- Set the properties of this widget.
- Overrides:
- setProperties in class Widget
getStringValue
public String getStringValue()
- Get the value of the text.
getValue
public Object getValue()
- Get the value of the text.
- Overrides:
- getValue in class Widget
setValue
public void setValue(Object value)
- Set the value of the text.
- Overrides:
- setValue in class Widget
isEditable
public boolean isEditable()
- Check if this text is editable.
- See Also:
- editable
setEditable
public void setEditable(boolean editable)
- Make this text editable.
- See Also:
- editable
getLength
public int getLength()
- Get the length of the text.
getSelStart
public int getSelStart()
- Return the start of the selection.
getSelEnd
public int getSelEnd()
- Return the end of the selection.
getSelected
public String getSelected()
- Get the selected part of the text.
clear
public void clear()
- Clear the text.
delete
public void delete()
- Clear the current selection.
insert
public void insert(char ch)
- Insert a character. This wil first clear the selecton, before
inserting the character.
insert
public void insert(String str)
- Insert a string at the current cursor position.
append
public void append(char ch)
- Append to the end of text.
append
public void append(String str)
- Append to the end of text.
focusInterest
public boolean focusInterest()
- This widget is interested in getting the character focus.
- Overrides:
- focusInterest in class Widget
selectAll
public void selectAll()
- Select the entire text.
select
public void select(int pos)
- Select a postition.
select
public void select(int selStart,
int selEnd)
- Select a portion of the text.
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).
focus
public void focus(int pos)
- Focus on a character position.
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.
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