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.
-
SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
-
SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
-
SCROLLBARS_NONE
- Do not create or display any scrollbars for the text area.
-
SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
-
TextAreaGadget()
- Constructs a new TextAreaGadget.
-
TextAreaGadget(int, int)
- Constructs a new TextAreaGadget with the specified number of rows and columns.
-
TextAreaGadget(String)
- Constructs a new TextAreaGadget with the specified text displayed.
-
TextAreaGadget(String, int, int)
- Constructs a new TextAreaGadget with the specified text and number of rows
and columns.
-
TextAreaGadget(String, int, int, int)
- Constructs a new TextAreaGadget with the specified text and number of rows
and columns.
-
addFocusListener(FocusListener)
- Adds the specified focus listener to receive focus events
from this component.
-
append(String)
- Appends the given text to the end.
-
copy()
- copies the selected text to the GWT clipboard
-
cut()
- cuts the selected text and puts it in the GWT clipboard
-
fixedSize(int, int)
- returns the size need for give numner of rows and cols
-
getCaretPosition()
- Returns the Caret Position.
-
getColumns()
- Returns the number of columns in the TextAreaGadget.
-
getFirstSelectionRect()
-
-
getMinimumSize(int, int)
- Returns the specified minimum size Dimensions of the TextAreaGadget.
-
getPreferredSize(int, int)
- Returns the specified row and column Dimensions of the TextAreaGadget.
-
getRows()
- Returns the number of rows in the TextAreaGadget.
-
getScrollbarVisibility()
- Returns the number of columns in the TextAreaGadget.
-
getScrolledMinimumSize()
- getScrolledMinimumSize
-
getScrolledPreferredSize()
- getScrolledPreferredSize
-
getSelectedText()
- Returns the selected text contained in this TextComponent.
-
getSelectionEnd()
- Returns the selected text's end position.
-
getSelectionStart()
- Returns the selected text's start position.
-
getShowGuides()
- returns the value of the show guides flag
-
getText()
- Returns the text contained in this TextComponent.
-
getTextBackground()
- getTextBackground
-
getWordWrap()
- returns the value of the word wrap flag
-
insert(String, int)
- Inserts the specified text at the specified position.
-
isEditable()
- Returns the boolean indicating whether this TextComponent is editable or not.
-
paste()
- pastes the text from the GWT clipboard to the current position,
replacing any selected text
-
processFocusEvent(FocusEvent)
- processFocusEvent
-
removeFocusListener(FocusListener)
- Removes the specified focus listener so it no longer receives focus
events from this component.
-
replaceRange(String, int, int)
- Replaces text from the indicated start to end position with the
new text specified.
-
select(int, int)
- Selects the text found between the specified start and end locations.
-
selectAll()
- Selects all the text in the TextComponent.
-
setCaretPosition(int)
- Sets the Caret Position.
-
setColumns(int)
- set the number of columns in the TextAreaGadset.
-
setEditable(boolean)
- Sets the specified boolean to indicate whether or not this TextComponent should be
editable.
-
setRows(int)
- set the number of rows in the TextAreaGadset.
-
setSelectionEnd(int)
- Set the Selection End
-
setSelectionStart(int)
- Set the Selection Start
-
setShowGuides(boolean)
- Sets show guides flag
-
setText(String)
- Sets the text of this TextComponent to the specified text.
-
setTextBackground(Color)
- setTextBackground
-
setWordWrap(boolean)
- Sets word wrap
-
undo()
- undoes the last action
SCROLLBARS_BOTH
public static final int SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
SCROLLBARS_VERTICAL_ONLY
public static final int SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
SCROLLBARS_HORIZONTAL_ONLY
public static final int SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
SCROLLBARS_NONE
public static final int SCROLLBARS_NONE
- Do not create or display any scrollbars for the text area.
TextAreaGadget
public TextAreaGadget()
- Constructs a new TextAreaGadget.
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
TextAreaGadget
public TextAreaGadget(String text)
- Constructs a new TextAreaGadget with the specified text displayed.
- Parameters:
- text - the text to be displayed
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
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
setTextBackground
public void setTextBackground(Color color)
- setTextBackground
- Parameters:
- color - - TBD
getTextBackground
public Color getTextBackground()
- getTextBackground
- Returns:
- Color
cut
public void cut()
- cuts the selected text and puts it in the GWT clipboard
copy
public void copy()
- copies the selected text to the GWT clipboard
paste
public void paste()
- pastes the text from the GWT clipboard to the current position,
replacing any selected text
undo
public void undo()
- undoes the last action
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
append
public void append(String str)
- Appends the given text to the end.
- Parameters:
- str - the text to insert
- See Also:
- insertText
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
getRows
public int getRows()
- Returns the number of rows in the TextAreaGadget.
- Returns:
- int
setRows
public void setRows(int rows)
- set the number of rows in the TextAreaGadset.
- Parameters:
- rows - - TBD
getColumns
public int getColumns()
- Returns the number of columns in the TextAreaGadget.
- Returns:
- int
setColumns
public void setColumns(int cols)
- set the number of columns in the TextAreaGadset.
- Parameters:
- cols - - TBD
getScrollbarVisibility
public int getScrollbarVisibility()
- Returns the number of columns in the TextAreaGadget.
- Returns:
- int
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
getScrolledPreferredSize
public Dimension getScrolledPreferredSize()
- getScrolledPreferredSize
- Returns:
- Dimension
- Overrides:
- getScrolledPreferredSize in class ScrollPaneGadget
getScrolledMinimumSize
public Dimension getScrolledMinimumSize()
- getScrolledMinimumSize
- Returns:
- Dimension
- Overrides:
- getScrolledMinimumSize in class ScrollPaneGadget
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
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
getFirstSelectionRect
public Rectangle getFirstSelectionRect()
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
getText
public String getText()
- Returns the text contained in this TextComponent.
- Returns:
- String
- See Also:
- setText
getSelectedText
public String getSelectedText()
- Returns the selected text contained in this TextComponent.
- Returns:
- String
- See Also:
- setText
isEditable
public boolean isEditable()
- Returns the boolean indicating whether this TextComponent is editable or not.
- Returns:
- boolean
- See Also:
- setEditable
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
setWordWrap
public void setWordWrap(boolean wordWrap)
- Sets word wrap
- Parameters:
- wordWrap - the boolean to be set
getWordWrap
public boolean getWordWrap()
- returns the value of the word wrap flag
- Returns:
- boolean
setShowGuides
public void setShowGuides(boolean showGuides)
- Sets show guides flag
- Parameters:
- showGuides - the boolean to be set
getShowGuides
public boolean getShowGuides()
- returns the value of the show guides flag
- Returns:
- boolean
getCaretPosition
public int getCaretPosition()
- Returns the Caret Position.
- Returns:
- int
setCaretPosition
public void setCaretPosition(int position)
- Sets the Caret Position.
- Parameters:
- position - - TBD
getSelectionStart
public int getSelectionStart()
- Returns the selected text's start position.
- Returns:
- int
getSelectionEnd
public int getSelectionEnd()
- Returns the selected text's end position.
- Returns:
- int
setSelectionStart
public void setSelectionStart(int position)
- Set the Selection Start
- Parameters:
- position - - TBD
setSelectionEnd
public void setSelectionEnd(int position)
- Set the Selection End
- Parameters:
- position - - TBD
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
selectAll
public void selectAll()
- Selects all the text in the TextComponent.
addFocusListener
public synchronized void addFocusListener(FocusListener l)
- Adds the specified focus listener to receive focus events
from this component.
- Overrides:
- addFocusListener in class Gadget
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
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