All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.TextAreaGadget

java.lang.Object
   |
   +----dtai.gwt.Gadget
           |
           +----dtai.gwt.ContainerGadget
                   |
                   +----dtai.gwt.PanelGadget
                           |
                           +----dtai.gwt.BorderGadget
                                   |
                                   +----dtai.gwt.ScrollPaneGadget
                                           |
                                           +----dtai.gwt.TextAreaGadget

public class TextAreaGadget
extends ScrollPaneGadget
implements TextGadget
A TextAreaGadget object is a multi-line area that displays text. It can be set to allow editing or read-only modes.


Variable Index

 o SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.
 o SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.
 o SCROLLBARS_NONE
Do not create or display any scrollbars for the text area.
 o SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.

Constructor Index

 o TextAreaGadget()
Constructs a new TextAreaGadget.
 o TextAreaGadget(int, int)
Constructs a new TextAreaGadget with the specified number of rows and columns.
 o TextAreaGadget(String)
Constructs a new TextAreaGadget with the specified text displayed.
 o TextAreaGadget(String, int, int)
Constructs a new TextAreaGadget with the specified text and number of rows and columns.
 o TextAreaGadget(String, int, int, int)
Constructs a new TextAreaGadget with the specified text and number of rows and columns.

Method Index

 o addFocusListener(FocusListener)
Adds the specified focus listener to receive focus events from this component.
 o append(String)
Appends the given text to the end.
 o copy()
copies the selected text to the GWT clipboard
 o cut()
cuts the selected text and puts it in the GWT clipboard
 o fixedSize(int, int)
returns the size need for give numner of rows and cols
 o getCaretPosition()
Returns the Caret Position.
 o getColumns()
Returns the number of columns in the TextAreaGadget.
 o getFirstSelectionRect()
 o getMinimumSize(int, int)
Returns the specified minimum size Dimensions of the TextAreaGadget.
 o getPreferredSize(int, int)
Returns the specified row and column Dimensions of the TextAreaGadget.
 o getRows()
Returns the number of rows in the TextAreaGadget.
 o getScrollbarVisibility()
Returns the number of columns in the TextAreaGadget.
 o getScrolledMinimumSize()
getScrolledMinimumSize
 o getScrolledPreferredSize()
getScrolledPreferredSize
 o getSelectedText()
Returns the selected text contained in this TextComponent.
 o getSelectionEnd()
Returns the selected text's end position.
 o getSelectionStart()
Returns the selected text's start position.
 o getShowGuides()
returns the value of the show guides flag
 o getText()
Returns the text contained in this TextComponent.
 o getTextBackground()
getTextBackground
 o getWordWrap()
returns the value of the word wrap flag
 o insert(String, int)
Inserts the specified text at the specified position.
 o isEditable()
Returns the boolean indicating whether this TextComponent is editable or not.
 o paste()
pastes the text from the GWT clipboard to the current position, replacing any selected text
 o processFocusEvent(FocusEvent)
processFocusEvent
 o removeFocusListener(FocusListener)
Removes the specified focus listener so it no longer receives focus events from this component.
 o replaceRange(String, int, int)
Replaces text from the indicated start to end position with the new text specified.
 o select(int, int)
Selects the text found between the specified start and end locations.
 o selectAll()
Selects all the text in the TextComponent.
 o setCaretPosition(int)
Sets the Caret Position.
 o setColumns(int)
set the number of columns in the TextAreaGadset.
 o setEditable(boolean)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
 o setRows(int)
set the number of rows in the TextAreaGadset.
 o setSelectionEnd(int)
Set the Selection End
 o setSelectionStart(int)
Set the Selection Start
 o setShowGuides(boolean)
Sets show guides flag
 o setText(String)
Sets the text of this TextComponent to the specified text.
 o setTextBackground(Color)
setTextBackground
 o setWordWrap(boolean)
Sets word wrap
 o undo()
undoes the last action

Variables

 o SCROLLBARS_BOTH
 public static final int SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.

 o SCROLLBARS_VERTICAL_ONLY
 public static final int SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.

 o SCROLLBARS_HORIZONTAL_ONLY
 public static final int SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.

 o SCROLLBARS_NONE
 public static final int SCROLLBARS_NONE
Do not create or display any scrollbars for the text area.

Constructors

 o TextAreaGadget
 public TextAreaGadget()
Constructs a new TextAreaGadget.

 o TextAreaGadget
 public TextAreaGadget(int rows,
                       int cols)
Constructs a new TextAreaGadget with the specified number of rows and columns.

Parameters:
rows - the number of rows
cols - the number of columns
 o TextAreaGadget
 public TextAreaGadget(String text)
Constructs a new TextAreaGadget with the specified text displayed.

Parameters:
text - the text to be displayed
 o TextAreaGadget
 public TextAreaGadget(String text,
                       int rows,
                       int cols)
Constructs a new TextAreaGadget with the specified text and number of rows and columns.

Parameters:
text - the text to be displayed
rows - the number of rows
cols - the number of cols
 o TextAreaGadget
 public TextAreaGadget(String text,
                       int rows,
                       int cols,
                       int scrollbarVisibility)
Constructs a new TextAreaGadget with the specified text and number of rows and columns.

Parameters:
text - the text to be displayed
rows - the number of rows
cols - the number of cols
scrollbarVisibility - the default scrollbar visibility

Methods

 o setTextBackground
 public void setTextBackground(Color color)
setTextBackground

Parameters:
color - - TBD
 o getTextBackground
 public Color getTextBackground()
getTextBackground

Returns:
Color
 o cut
 public void cut()
cuts the selected text and puts it in the GWT clipboard

 o copy
 public void copy()
copies the selected text to the GWT clipboard

 o paste
 public void paste()
pastes the text from the GWT clipboard to the current position, replacing any selected text

 o undo
 public void undo()
undoes the last action

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

Parameters:
str - the text to insert.
pos - the position at which to insert.
See Also:
setText, replaceText
 o append
 public void append(String str)
Appends the given text to the end.

Parameters:
str - the text to insert
See Also:
insertText
 o replaceRange
 public void replaceRange(String str,
                          int start,
                          int end)
Replaces text from the indicated start to end position with the new text specified.

Parameters:
str - the text to use as the replacement.
start - the start position.
end - the end position.
See Also:
insertText, replaceText
 o getRows
 public int getRows()
Returns the number of rows in the TextAreaGadget.

Returns:
int
 o setRows
 public void setRows(int rows)
set the number of rows in the TextAreaGadset.

Parameters:
rows - - TBD
 o getColumns
 public int getColumns()
Returns the number of columns in the TextAreaGadget.

Returns:
int
 o setColumns
 public void setColumns(int cols)
set the number of columns in the TextAreaGadset.

Parameters:
cols - - TBD
 o getScrollbarVisibility
 public int getScrollbarVisibility()
Returns the number of columns in the TextAreaGadget.

Returns:
int
 o getPreferredSize
 public Dimension getPreferredSize(int rows,
                                   int cols)
Returns the specified row and column Dimensions of the TextAreaGadget.

Parameters:
rows - the preferred rows amount
cols - the preferred columns amount
Returns:
Dimension
 o getScrolledPreferredSize
 public Dimension getScrolledPreferredSize()
getScrolledPreferredSize

Returns:
Dimension
Overrides:
getScrolledPreferredSize in class ScrollPaneGadget
 o getScrolledMinimumSize
 public Dimension getScrolledMinimumSize()
getScrolledMinimumSize

Returns:
Dimension
Overrides:
getScrolledMinimumSize in class ScrollPaneGadget
 o getMinimumSize
 public Dimension getMinimumSize(int rows,
                                 int cols)
Returns the specified minimum size Dimensions of the TextAreaGadget.

Parameters:
rows - the minimum row size
cols - the minimum column size
Returns:
Dimension
 o fixedSize
 public Dimension fixedSize(int row,
                            int cols)
returns the size need for give numner of rows and cols

Parameters:
row - - TBD
cols - - TBD
Returns:
Dimension
 o getFirstSelectionRect
 public Rectangle getFirstSelectionRect()
 o setText
 public void setText(String text)
Sets the text of this TextComponent to the specified text.

Parameters:
t - the new text to be set
See Also:
getText
 o getText
 public String getText()
Returns the text contained in this TextComponent.

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

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

Returns:
boolean
See Also:
setEditable
 o setEditable
 public void setEditable(boolean t)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.

Parameters:
t - the boolean to be set
See Also:
isEditable
 o setWordWrap
 public void setWordWrap(boolean wordWrap)
Sets word wrap

Parameters:
wordWrap - the boolean to be set
 o getWordWrap
 public boolean getWordWrap()
returns the value of the word wrap flag

Returns:
boolean
 o setShowGuides
 public void setShowGuides(boolean showGuides)
Sets show guides flag

Parameters:
showGuides - the boolean to be set
 o getShowGuides
 public boolean getShowGuides()
returns the value of the show guides flag

Returns:
boolean
 o getCaretPosition
 public int getCaretPosition()
Returns the Caret Position.

Returns:
int
 o setCaretPosition
 public void setCaretPosition(int position)
Sets the Caret Position.

Parameters:
position - - TBD
 o getSelectionStart
 public int getSelectionStart()
Returns the selected text's start position.

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

Returns:
int
 o setSelectionStart
 public void setSelectionStart(int position)
Set the Selection Start

Parameters:
position - - TBD
 o setSelectionEnd
 public void setSelectionEnd(int position)
Set the Selection End

Parameters:
position - - TBD
 o select
 public void select(int selStart,
                    int selEnd)
Selects the text found between the specified start and end locations.

Parameters:
selStart - the start position of the text
selEnd - the end position of the text
 o selectAll
 public void selectAll()
Selects all the text in the TextComponent.

 o addFocusListener
 public synchronized void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.

Overrides:
addFocusListener in class Gadget
 o removeFocusListener
 public synchronized void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.

Overrides:
removeFocusListener in class Gadget
 o processFocusEvent
 protected void processFocusEvent(FocusEvent e)
processFocusEvent

Parameters:
e - the firing FocusEvent
Overrides:
processFocusEvent in class Gadget

All Packages  Class Hierarchy  This Package  Previous  Next  Index