Class marimba.gui.RichTextBoxWidget
All Packages Class Hierarchy This Package Previous Next Index
Class marimba.gui.RichTextBoxWidget
java.lang.Object
|
+----marimba.gui.Widget
|
+----marimba.gui.TextWidget
|
+----marimba.gui.RichTextBoxWidget
- public class RichTextBoxWidget
- extends TextWidget
A rich text widget.
- Version:
- 1.39, 01/13/97
- Author:
- Jonathan Payne
-
fillScrollbar
- The scrollbar can be made filled.
-
text
- The text that is currently in the rich text box.
-
view
- The textview that is used for rich text boxes.
-
vsbar
- The vertical scrollbar that can be used in
rich text boxes.
-
RichTextBoxWidget()
- Constructor
-
append(char)
- Append to the end of text.
-
append(String)
- Append to the end of text.
-
appendStyle(String, int, Color)
-
-
clear()
- Clear the text.
-
delete()
- Clear the current selection.
-
disable(boolean)
- Disable this text
-
eventInText(Event)
- Checks whether the given event is within the text view.
-
focus(int)
- Focus on a character position.
-
focusInterest()
- This widget is not interested in the character focus.
-
getAlign()
- Get the current align of the text.
-
getAlignOptions()
- Get the align options.
-
getCaretColor()
- Get the color of the caret.
-
getChildProperties(PropertyList)
- Don't save the children of this container.
-
getEditor()
- Get the editor.
-
getFillScrollbar()
- Check whether the scrollbar is filled.
-
getInset()
- Get the inset of the rich text box.
-
getLength()
- Get the length of the text.
-
getProperties(PropertyList)
- Get the properties of this widget.
-
getRichText()
-
-
getSavetext()
- Check whether the text is being saved.
-
getScrollbar()
- Get the vertical scrollbar.
-
getScrolling()
- Check whether the text can scroll.
-
getSelected()
- Get the selected part of the text.
-
getSelections()
- Check whether the text can be selected.
-
getSelEnd()
- Return the end of the selection.
-
getSelStart()
- Return the start of the selection.
-
getShadowColor()
- Get the shadow color.
-
getStyle()
- Get the current style.
-
getStyleOptions()
- Get the style options.
-
getText()
- Get the value of the text.
-
getTextValue()
- Get the Text object associated with this view.
-
getTextViewValue()
- Get the TextView object associated with this widget.
-
getWrap()
- Get the current wrap.
-
getWrapOptions()
- Get the wrap options.
-
handleEvent(Event)
- Forward events to the right widget during editing.
-
hasScrollbar()
- Check whether the RichTextBox displays a scrollbar.
-
insert(char)
- Insert a character.
-
insert(String)
- Insert a string at the current cursor position.
-
invalidate()
- Invalidate the widget (the size has changed).
-
layout()
- Layout
-
newTextView()
-
-
preferredSize()
-
-
requestFocus()
- Request focus
-
select(int, int)
- Select a portion of the text.
-
select(int, int, int)
- Select a portion of the text.
-
selectAll()
- Select the entire text.
-
setAlign(int)
- Set the alignment.
-
setCaretColor(Color)
- Set the color of the caret.
-
setEditable(boolean)
- Make this text editable.
-
setEditor(Object)
- Set the editor.
-
setFillScrollbar(boolean)
- Fill the scrollbar or not.
-
setForeground(Color)
- Set the foreground color.
-
setInset(int)
- Set the inset of the rich text box.
-
setProperties(PropertyList)
- Set the properties of this widget.
-
setSavetext(boolean)
- Let the text be saved or not.
-
setScrollbar(boolean)
- Let the RichTextBox use a scrollbar or not.
-
setScrollbar(ScrollbarWidget)
- Set the vertical scrollbar.
-
setScrolling(boolean)
- Allow or forbid scrolling of the text.
-
setSelections(boolean)
- Allow or forbid selections.
-
setShadowColor(Color)
- Set the shadow color.
-
setStyle(int)
- Set the style.
-
setText(String)
- Sets the value for the text.
-
setWrap(int)
- Set the wrap.
view
public TextView view
- The textview that is used for rich text boxes.
The actual text processing is done by this textview.
text
public Text text
- The text that is currently in the rich text box.
vsbar
public ScrollbarWidget vsbar
- The vertical scrollbar that can be used in
rich text boxes.
- See Also:
- hasScrollbar, getScrollbar, setScrollbar
fillScrollbar
public boolean fillScrollbar
- The scrollbar can be made filled.
- See Also:
- getFillScrollbar, setFillScrollbar
RichTextBoxWidget
public RichTextBoxWidget()
- Constructor
getProperties
public void getProperties(PropertyList list)
- Get the properties of this widget.
- Overrides:
- getProperties in class TextWidget
getChildProperties
public void getChildProperties(PropertyList list)
- Don't save the children of this container.
- Overrides:
- getChildProperties in class Widget
setProperties
public void setProperties(PropertyList list)
- Set the properties of this widget.
- Overrides:
- setProperties in class TextWidget
getStyleOptions
public Options getStyleOptions()
- Get the style options.
getAlignOptions
public Options getAlignOptions()
- Get the align options.
getWrapOptions
public Options getWrapOptions()
- Get the wrap options.
getFillScrollbar
public boolean getFillScrollbar()
- Check whether the scrollbar is filled.
- See Also:
- fillScrollbar
setFillScrollbar
public void setFillScrollbar(boolean fillScrollbar)
- Fill the scrollbar or not.
- See Also:
- fillScrollbar
setForeground
public void setForeground(Color c)
- Set the foreground color.
- Overrides:
- setForeground in class Widget
getRichText
public String getRichText()
newTextView
public TextView newTextView()
preferredSize
public Dimension preferredSize()
getEditor
public String getEditor()
- Get the editor.
- Overrides:
- getEditor in class Widget
setEditor
public void setEditor(Object editor)
- Set the editor.
- Overrides:
- setEditor in class Widget
getText
public String getText()
- Get the value of the text.
- Overrides:
- getText in class Widget
setText
public void setText(String str)
- Sets the value for the text.
- Overrides:
- setText in class Widget
getTextValue
public Text getTextValue()
- Get the Text object associated with this view.
getTextViewValue
public TextView getTextViewValue()
- Get the TextView object associated with this widget.
disable
public void disable(boolean disabled)
- Disable this text
- Overrides:
- disable in class Widget
setEditable
public void setEditable(boolean editable)
- Make this text editable.
- Overrides:
- setEditable in class TextWidget
hasScrollbar
public boolean hasScrollbar()
- Check whether the RichTextBox displays a scrollbar.
- See Also:
- vsbar
setScrollbar
public void setScrollbar(boolean scrollbar)
- Let the RichTextBox use a scrollbar or not.
- See Also:
- vsbar
getScrollbar
public ScrollbarWidget getScrollbar()
- Get the vertical scrollbar.
- See Also:
- vsbar
setScrollbar
public void setScrollbar(ScrollbarWidget vsbar)
- Set the vertical scrollbar.
- See Also:
- vsbar
getSavetext
public boolean getSavetext()
- Check whether the text is being saved.
- See Also:
- setSavetext
setSavetext
public void setSavetext(boolean savetext)
- Let the text be saved or not.
- See Also:
- setSavetext
getSelections
public boolean getSelections()
- Check whether the text can be selected.
setSelections
public void setSelections(boolean selections)
- Allow or forbid selections.
getScrolling
public boolean getScrolling()
- Check whether the text can scroll.
setScrolling
public void setScrolling(boolean scrolling)
- Allow or forbid scrolling of the text.
getInset
public int getInset()
- Get the inset of the rich text box.
setInset
public void setInset(int inset)
- Set the inset of the rich text box.
getCaretColor
public Color getCaretColor()
- Get the color of the caret.
setCaretColor
public void setCaretColor(Color caretColor)
- Set the color of the caret.
getShadowColor
public Color getShadowColor()
- Get the shadow color.
setShadowColor
public void setShadowColor(Color shadowColor)
- Set the shadow color.
getLength
public int getLength()
- Get the length of the text.
- Overrides:
- getLength in class TextWidget
getSelStart
public int getSelStart()
- Return the start of the selection.
- Overrides:
- getSelStart in class TextWidget
getSelEnd
public int getSelEnd()
- Return the end of the selection.
- Overrides:
- getSelEnd in class TextWidget
getSelected
public String getSelected()
- Get the selected part of the text.
- Overrides:
- getSelected in class TextWidget
clear
public void clear()
- Clear the text.
- Overrides:
- clear in class TextWidget
delete
public void delete()
- Clear the current selection.
- Overrides:
- delete in class TextWidget
insert
public void insert(char ch)
- Insert a character. This wil first clear the selecton, before
inserting the character.
- Overrides:
- insert in class TextWidget
insert
public void insert(String str)
- Insert a string at the current cursor position.
- Overrides:
- insert in class TextWidget
append
public void append(char ch)
- Append to the end of text.
- Overrides:
- append in class TextWidget
append
public void append(String str)
- Append to the end of text.
- Overrides:
- append in class TextWidget
appendStyle
public void appendStyle(String str,
int face,
Color c)
focusInterest
public boolean focusInterest()
- This widget is not interested in the character focus.
- Overrides:
- focusInterest in class TextWidget
selectAll
public void selectAll()
- Select the entire text.
- Overrides:
- selectAll in class TextWidget
select
public void select(int selStart,
int selEnd)
- Select a portion of the text.
- Overrides:
- select in class TextWidget
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).
- Overrides:
- select in class TextWidget
focus
public void focus(int pos)
- Focus on a character position.
- Overrides:
- focus in class TextWidget
layout
public void layout()
- Layout
- Overrides:
- layout in class Widget
invalidate
public void invalidate()
- Invalidate the widget (the size has changed).
- Overrides:
- invalidate in class Widget
getStyle
public int getStyle()
- Get the current style.
setStyle
public void setStyle(int style)
- Set the style.
getAlign
public int getAlign()
- Get the current align of the text.
setAlign
public void setAlign(int align)
- Set the alignment.
getWrap
public int getWrap()
- Get the current wrap.
Returns a widgetConstant: CHAR, WORD, TRUNCATE.
setWrap
public void setWrap(int wrap)
- Set the wrap.
Expects a widgetConstant: CHAR, WORD, TRUNCATE.
requestFocus
public void requestFocus()
- Request focus
- Overrides:
- requestFocus in class Widget
eventInText
protected boolean eventInText(Event evt)
- Checks whether the given event is within the text view.
- Overrides:
- eventInText in class TextWidget
handleEvent
public boolean handleEvent(Event evt)
- Forward events to the right widget during editing.
- Overrides:
- handleEvent in class TextWidget
All Packages Class Hierarchy This Package Previous Next Index