All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCComboBox

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jclass.bwt.JCContainer
                                   |
                                   +----jclass.bwt.JCComboBox

public class JCComboBox
extends JCContainer
implements JCListListener, JCActionListener, JCItemSelectable, JCChoiceInterface, JCTextInterface, JCTextManagerInterface
JCComboBox provides the capabilities of a JCTextField and a JCList component. It allows users to perform operations like typing and pasting information, and it also provides a list of possible choices that the user can select from to complete the TextField entry.

Note that on MS-Windows, AWT currently uses a Windows ComboBox as the peer for its Choice component. JCComboBox provides this functionality on all platforms.

The list may be displayed at all times, or may only drop down when the user presses an arrow button next to the TextField (a "drop-down" ComboBox).

Behavior
If the arrow button is pressed and released, the list pops up and stays up until the user clicks an item inside it, hits RETURN, clicks outside the list, or presses ESCAPE. If an item is clicked or RETURN is hit, the item is copied to the text field.

Properties

WrapAroundSearch
Name Method
Alignment setAlignment
Background setBackground
Changed setChanged
Columns setColumns
CursorPosition setCursorPosition
Editable setEditable
Font setFont
Foreground setForeground
HighlightColor setHighlightColor
HighlightThickness setHighlightThickness
Items setItems
Insets setInsets
MaximumLength setMaximumLength
Overstrike setOverstrike
PreferredSize setPreferredSize
SelectedBackground setSelectedBackground
SelectedForeground setSelectedForeground
SelectionEnd setSelectionEnd
SelectionList setSelectionList
SelectionStart setSelectionStart
ShadowThickness setShadowThickness
ShowCursorPosition setShowCursorPosition
StringCase setStringCase
Style setStyle
Text setText
UserData setUserData
VisibleRows setVisibleRows
setWrapAroundSearch

Events

JCTextEvent JCTextCursorEvent
Class Listener Description
JCActionEvent addActionListener Called when the ENTER key is hit
JCItemEvent addItemListener Cafter the user selects an item
JCComboBoxEvent addComboBoxListener Called before the list is displayed, and after the user has made a selection
addTextListener Posted when the value changes
addTextCursorListener Posted when the cursor is moved


Variable Index

 o actionListeners
List of JCActionEvent listeners
 o BEGIN
 o COMBOBOX_DROPDOWN
 o COMBOBOX_DROPDOWN_LIST
 o COMBOBOX_SIMPLE
 o END
 o itemListeners
List of JCItemEvent listeners
 o list_poppedup
Set to true when non-COMBOBOX_SIMPLE list is displayed.
 o listeners
List of JCComboBoxEvent listeners

Constructor Index

 o JCComboBox()
Creates an empty ComboBox.
 o JCComboBox(JCVector)
Creates an empty ComboBox with the specified list items.
 o JCComboBox(JCVector, Applet, String)
Creates a comboBox which reads parameters from the applet's HTML file.
 o JCComboBox(String[], String)
Creates a comboBox with the specified items and name.

Method Index

 o actionPerformed(JCActionEvent)
If the arrow button was clicked, calls showListAction to display the list.
If the list is displayed and the RETURN key was hit, calls setTextAction to copy the selected item to the text field.
 o add(String)
Adds an item to the list.
 o addActionListener(JCActionListener)
Adds the specified action listener to receive JCTextField action events.
 o addComboBoxListener(JCComboBoxListener)
Adds the specified JCComboBoxEvent listener to receive events.
 o addFocusListener(FocusListener)
Add focus listener to the TextComponent Since the JCComboBox itself never receives focus it is necessary to be able to set it
 o addItemListener(JCItemListener)
Adds the specified item listener to receive item selection events.
 o addKeyListener(KeyListener)
Add key listener to the TextComponent Since the JCComboBox itself never receives focus it is necessary to be able to set it
 o addNotify()
 o addTextCursorListener(JCTextCursorListener)
Adds the specified JCTextCursorEvent listener to receive cursor movement events.
 o addTextListener(JCTextListener)
Adds the specified listener to receive text events.
 o append(String)
Appends text to the end.
 o beep()
Emits a beep.
 o getAlignment()
Gets the field's alignment.
 o getButton()
Gets the button component.
 o getChanged()
Returns true if the user has changed the value since the last programmatic setting.
 o getColumns()
Returns the number of columns.
 o getCursorPosition()
Gets the position of the cursor.
 o getEditable()
Returns the boolean indicating whether this component is editable or not.
 o getHighlightColor()
Gets the color of the highlight rectangle.
 o getHighlightThickness()
Gets the thickness of the highlight rectangle.
 o getItem(int)
Returns the item at the specified index in the list.
 o getItemCount()
Returns the number of items in the list.
 o getItems()
Gets the list's values as a list of Strings.
 o getLastPosition()
Gets the position of the last character in the text.
 o getList()
Gets the list component.
 o getMaximumLength()
Gets the MaximumLength value.
 o getMinimumSize(int)
Returns the minimum size needed for the specified number of columns.
 o getNextAutoSearchIndex(Event, int)
 o getOverstrike()
Gets the Overstrike value.
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o getPrevAutoSearchIndex(Event, int)
 o getSelectedBackground()
Gets the SelectedBackground value.
 o getSelectedForeground()
Gets the SelectedForeground value.
 o getSelectedIndex()
Returns the index of the currently selected item.
 o getSelectedIndexes()
Returns an array (length 1) containing the currently selected item.
 o getSelectedItem()
Returns a String representation of the current choice.
 o getSelectedObjects()
Returns an array (length 1) containing the currently selected item.
 o getSelectedText()
Returns the selected text contained in this component.
 o getSelectionEnd()
Returns the selected text's end position.
 o getSelectionList()
Gets the current SelectionList.
 o getSelectionStart()
Returns the selected text's start position.
 o getShadowThickness()
Gets the shadow's thickness.

HTML param name/value: "ShadowThickness"/int

 o getShowCursorPosition()
Gets the ShowCursorPosition value.
 o getStringCase()
Gets the StringCase value.
 o getStyle()
Gets the Style value.
 o getText()
Gets the value of the text.
 o getTextComponent()
Gets the component to be used as the data entry field as an object which supports the JCTextInterface
 o getTextField()
Gets the component to be used as the data entry field.
 o getWrapAroundSearch()
Gets the WrapAroundSearch value.
 o insert(String, int)
Inserts text at the specified position.
 o isEditable()
Returns the boolean indicating whether this component is editable or not.
 o itemStateChanged(JCItemEvent)
JCItemListener method - no-op
 o keyDown(Event, int)
 o layout()
 o listItemSelectBegin(JCListEvent)
JCListListener method - no-op
 o listItemSelectEnd(JCListEvent)
If the user clicked an item, calls setTextAction to copy the item to the text field.
 o paintInterior(Graphics)
Draws the shadows and title.
 o pointToPosition(int, int)
Maps a physical position to the corresponding character position.
 o postComboBoxEvent(int, Object)
Posts a JCComboBoxEvent
 o preferredHeight()
Gets the subclass' preferred height (default: 100).
 o preferredWidth()
Gets the subclass' preferred width (default: 100).
 o remove(String)
Removes the first occurrence of an item from the list.
 o removeActionListener(JCActionListener)
Removes the specified action listener so it no longer receives action events.
 o removeAll()
Removes all items from the list.
 o removeComboBoxListener(JCComboBoxListener)
Removes the specified listener so it no longer receives JCComboBoxEvents.
 o removeFocusListener(FocusListener)
Remove focus listener to the TextComponent
 o removeItemListener(JCItemListener)
Removes the specified item listener so it no longer receives item events.
 o removeKeyListener(KeyListener)
Remove focus listener to the TextComponent
 o removeTextCursorListener(JCTextCursorListener)
Removes the specified listener so it no longer receives JCTextCursorEvents.
 o removeTextListener(JCTextListener)
Removes the specified text listener so it no longer receives text events.
 o replaceRange(String, int, int)
Replaces text between two positions with the specified text.
 o select(int)
Selects the item with the specified postion.
 o select(int, int)
Selects the text found between the specified start and end locations.
 o select(Object)
Selects the specified item.
 o selectAll()
Selects all the text in the component.
 o setAlignment(int)
Sets the position of the text:
BWTEnum.LEFT (default), CENTER, or RIGHT.
 o setChanged(boolean)
Resets the Changed flag.
 o setColumns(int)
Sets the number of columns.
 o setCursorPosition(int)
Sets the position of the cursor.
 o setEditable(boolean)
Determines whether this component is editable.
 o setHighlightColor(Color)
Sets the color of the rectangle drawn when the component has focus (default: black).

HTML param name/value: "HighlightColor"/Color

 o setHighlightThickness(int)
Sets the thickness of the rectangle drawn when the component has focus (default: 2).

HTML param name/value: "HighlightThickness"/int

 o setItems(String[])
Sets the list's values as a list of Strings.
 o setLayout(LayoutManager)
Sets the layout manager for this container.
 o setMaximumLength(int)
Sets the maximum number of characters which may be entered by the user (default: BWTEnum.MAXINT).
 o setOverstrike(boolean)
If false (default), characters typed by the user are inserted into the current text.
 o setSelectedBackground(Color)
Sets the background color of selected text (default: blue).

HTML param name/value: "SelectedBackground"/color

 o setSelectedForeground(Color)
Sets the foreground color of selected text (default: background color).

HTML param name/value: "SelectedForeground"/color

 o setSelectionEnd(int)
Sets the selected text's end position.
 o setSelectionList(int[])
Sets a list of values used for multi-click.
 o setSelectionStart(int)
Sets the selected text's start position.
 o setShadowThickness(int)
Sets the shadow's thickness (default: 2)
 o setShowCursorPosition(boolean)
If set to true (default), the cursor position will be indicated with a vertical I-beam.
 o setStringCase(int)
Sets the case of text entered by the user or set programmatically:
BWTEnum.CASE_AS_IS       No conversion (default)
BWTEnum.CASE_LOWER       Convert to lower case
BWTEnum.CASE_UPPER       Convert to upper case
 o setStyle(int)
Sets the style, which specifies whether the list is always displayed and whether the text field is editable.
 o setText(String)
Sets the text field's value to the specified string.

HTML param name/value: "Text"/string

 o setTextAction(String)
Copies the item to the text field, after first posting a JCComboBoxEvent to allow the application to disallow the selection or change its value.
 o setVisibleRows(int)
Sets the number of visible rows; if set to 0 (default), the list will attempt to resize itself so that all its items are visible.

HTML param name/value: "VisibleRows"/int

 o setWrapAroundSearch(boolean)
Sets the WrapAroundSearch value.
 o showListAction(JCActionEvent)
Displays the list if it is not visible.
 o showPosition(int)
Scrolls the text if necessary to ensure that the position is visible.

Variables

 o COMBOBOX_SIMPLE
 public static final int COMBOBOX_SIMPLE
 o COMBOBOX_DROPDOWN
 public static final int COMBOBOX_DROPDOWN
 o COMBOBOX_DROPDOWN_LIST
 public static final int COMBOBOX_DROPDOWN_LIST
 o list_poppedup
 protected boolean list_poppedup
Set to true when non-COMBOBOX_SIMPLE list is displayed.

 o itemListeners
 protected JCVector itemListeners
List of JCItemEvent listeners

 o actionListeners
 protected JCVector actionListeners
List of JCActionEvent listeners

 o listeners
 protected JCVector listeners
List of JCComboBoxEvent listeners

 o BEGIN
 protected static final int BEGIN
 o END
 protected static final int END

Constructors

 o JCComboBox
 public JCComboBox()
Creates an empty ComboBox. No parameters are read from an HTML file.

 o JCComboBox
 public JCComboBox(JCVector items)
Creates an empty ComboBox with the specified list items.

 o JCComboBox
 public JCComboBox(String items[],
                   String name)
Creates a comboBox with the specified items and name. No parameters are read from an HTML file.

 o JCComboBox
 public JCComboBox(JCVector items,
                   Applet applet,
                   String name)
Creates a comboBox which reads parameters from the applet's HTML file.

Parameters:
applet - the applet whose PARAM tags are to be read
name - if this is not null, only parameters preceded by this name are read
See Also:
getParameter

Methods

 o getParameters
 protected void getParameters()
Reads the parameter values from the HTML page using the component's applet. The values will override those previously set.

Overrides:
getParameters in class JCContainer
 o getTextField
 public JCTextField getTextField()
Gets the component to be used as the data entry field.

 o getTextComponent
 public JCTextInterface getTextComponent()
Gets the component to be used as the data entry field as an object which supports the JCTextInterface

See Also:
getTextField
 o getList
 public JCList getList()
Gets the list component.

 o getButton
 public JCArrowButton getButton()
Gets the button component.

 o setText
 public synchronized void setText(String s)
Sets the text field's value to the specified string.

HTML param name/value: "Text"/string

 o getText
 public synchronized String getText()
Gets the value of the text.

See Also:
setText
 o setItems
 public void setItems(String items[])
Sets the list's values as a list of Strings.

 o getItems
 public synchronized String[] getItems()
Gets the list's values as a list of Strings.

See Also:
setItems
 o getStyle
 public int getStyle()
Gets the Style value.

See Also:
setStyle
 o setStyle
 public void setStyle(int v)
Sets the style, which specifies whether the list is always displayed and whether the text field is editable. If the list is hidden, it can be displayed by pressing the arrow button or hitting the down or up arrow key. The value must be one of the following values:
 COMBOBOX_SIMPLE           list is always displayed, text field is editable
 COMBOBOX_DROPDOWN         list is hidden, text field is editable (default)
 COMBOBOX_DROPDOWN_LIST    list is hidden, text field is uneditable
 

Throws: IllegalArgumentException
If an invalid value is set
 o getItemCount
 public int getItemCount()
Returns the number of items in the list.

See Also:
getItem
 o getItem
 public Object getItem(int index)
Returns the item at the specified index in the list.

See Also:
getItemCount
 o add
 public void add(String item)
Adds an item to the list.

Throws: NullPointerException
If the item's value is null.
 o remove
 public void remove(String item)
Removes the first occurrence of an item from the list.

Throws: IllegalArgumentException
If the item doesn't exist
 o removeAll
 public void removeAll()
Removes all items from the list.

Overrides:
removeAll in class Container
See Also:
remove
 o getSelectedItem
 public String getSelectedItem()
Returns a String representation of the current choice.

See Also:
getSelectedIndex
 o getSelectedIndex
 public int getSelectedIndex()
Returns the index of the currently selected item.

See Also:
getSelectedItem
 o select
 public synchronized void select(int pos)
Selects the item with the specified postion.

Throws: IllegalArgumentException
If the choice item position is invalid.
See Also:
getSelectedItem, getSelectedIndex
 o select
 public synchronized void select(Object item)
Selects the specified item.

See Also:
getSelectedItem, getSelectedIndex
 o getSelectedObjects
 public Object[] getSelectedObjects()
Returns an array (length 1) containing the currently selected item.

See Also:
JCItemSelectable, getSelectedIndex
 o getSelectedIndexes
 public synchronized int[] getSelectedIndexes()
Returns an array (length 1) containing the currently selected item.

See Also:
JCItemSelectable
 o setVisibleRows
 public void setVisibleRows(int v)
Sets the number of visible rows; if set to 0 (default), the list will attempt to resize itself so that all its items are visible.

HTML param name/value: "VisibleRows"/int

See Also:
setItems
 o getWrapAroundSearch
 public boolean getWrapAroundSearch()
Gets the WrapAroundSearch value.

See Also:
setWrapAroundSearch
 o setWrapAroundSearch
 public void setWrapAroundSearch(boolean v)
Sets the WrapAroundSearch value. If true (default), search by key entered will wrap around to the beginning/end of the list to find the next/previous item.

 o addComboBoxListener
 public void addComboBoxListener(JCComboBoxListener l)
Adds the specified JCComboBoxEvent listener to receive events.

See Also:
JCComboBoxEvent
 o removeComboBoxListener
 public void removeComboBoxListener(JCComboBoxListener l)
Removes the specified listener so it no longer receives JCComboBoxEvents.

See Also:
addComboBoxListener
 o addActionListener
 public void addActionListener(JCActionListener l)
Adds the specified action listener to receive JCTextField action events.

See Also:
JCActionEvent
 o removeActionListener
 public void removeActionListener(JCActionListener l)
Removes the specified action listener so it no longer receives action events.

See Also:
addActionListener
 o addItemListener
 public void addItemListener(JCItemListener l)
Adds the specified item listener to receive item selection events.

See Also:
JCItemEvent, JCItemListener
 o removeItemListener
 public void removeItemListener(JCItemListener l)
Removes the specified item listener so it no longer receives item events.

 o preferredWidth
 protected int preferredWidth()
Gets the subclass' preferred width (default: 100).

Overrides:
preferredWidth in class JCContainer
 o preferredHeight
 protected int preferredHeight()
Gets the subclass' preferred height (default: 100).

Overrides:
preferredHeight in class JCContainer
 o addNotify
 public void addNotify()
Overrides:
addNotify in class JCContainer
 o layout
 public void layout()
Overrides:
layout in class Container
 o showListAction
 public void showListAction(JCActionEvent ev)
Displays the list if it is not visible. A JCComboBoxEvent is first posted.

 o setTextAction
 protected void setTextAction(String value)
Copies the item to the text field, after first posting a JCComboBoxEvent to allow the application to disallow the selection or change its value. After the value is copied, an JCItemEvent is posted.

See Also:
addComboBoxListener, addItemListener
 o postComboBoxEvent
 protected JCComboBoxEvent postComboBoxEvent(int stage,
                                             Object value)
Posts a JCComboBoxEvent

Returns:
the posted event, or null if there are no listeners
See Also:
addComboBoxListener, JCComboBoxEvent
 o itemStateChanged
 public void itemStateChanged(JCItemEvent ev)
JCItemListener method - no-op

 o getNextAutoSearchIndex
 protected int getNextAutoSearchIndex(Event ev,
                                      int key)
 o getPrevAutoSearchIndex
 protected int getPrevAutoSearchIndex(Event ev,
                                      int key)
 o keyDown
 public boolean keyDown(Event ev,
                        int key)
Overrides:
keyDown in class Component
 o actionPerformed
 public void actionPerformed(JCActionEvent ev)
If the arrow button was clicked, calls showListAction to display the list.
If the list is displayed and the RETURN key was hit, calls setTextAction to copy the selected item to the text field.

See Also:
showListAction, setTextAction
 o listItemSelectBegin
 public void listItemSelectBegin(JCListEvent ev)
JCListListener method - no-op

 o listItemSelectEnd
 public void listItemSelectEnd(JCListEvent ev)
If the user clicked an item, calls setTextAction to copy the item to the text field.

See Also:
setTextAction
 o setLayout
 public final void setLayout(LayoutManager mgr)
Sets the layout manager for this container. This method is overridden to prevent the layout mgr from being set.

Overrides:
setLayout in class Container
 o paintInterior
 public void paintInterior(Graphics gc)
Draws the shadows and title.

Overrides:
paintInterior in class JCContainer
 o addKeyListener
 public void addKeyListener(KeyListener l)
Add key listener to the TextComponent Since the JCComboBox itself never receives focus it is necessary to be able to set it

Overrides:
addKeyListener in class Component
See Also:
removeKeyListener
 o removeKeyListener
 public void removeKeyListener(KeyListener l)
Remove focus listener to the TextComponent

Overrides:
removeKeyListener in class Component
See Also:
addKeyListener
 o addFocusListener
 public void addFocusListener(FocusListener l)
Add focus listener to the TextComponent Since the JCComboBox itself never receives focus it is necessary to be able to set it

Overrides:
addFocusListener in class Component
See Also:
removeFocusListener
 o removeFocusListener
 public void removeFocusListener(FocusListener l)
Remove focus listener to the TextComponent

Overrides:
removeFocusListener in class Component
See Also:
addFocusListener
 o getSelectedText
 public String getSelectedText()
Returns the selected text contained in this component.

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

See Also:
setEditable
 o getEditable
 public boolean getEditable()
Returns the boolean indicating whether this component is editable or not.

See Also:
setEditable
 o setEditable
 public void setEditable(boolean t)
Determines whether this component is editable.

See Also:
isEditable
 o getSelectionStart
 public int getSelectionStart()
Returns the selected text's start position.

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

 o setSelectionStart
 public void setSelectionStart(int pos)
Sets the selected text's start position.

 o setSelectionEnd
 public void setSelectionEnd(int pos)
Sets the selected text's end position.

 o select
 public void select(int start,
                    int end)
Selects the text found between the specified start and end locations.

 o selectAll
 public void selectAll()
Selects all the text in the component.

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

See Also:
setText, replaceRange
 o append
 public void append(String str)
Appends text to the end.

See Also:
insert
 o replaceRange
 public void replaceRange(String str,
                          int start,
                          int end)
Replaces text between two positions with the specified text.

 o getColumns
 public int getColumns()
Returns the number of columns.

 o setColumns
 public void setColumns(int v)
Sets the number of columns.

 o getAlignment
 public int getAlignment()
Gets the field's alignment.

See Also:
setAlignment
 o setAlignment
 public void setAlignment(int v)
Sets the position of the text:
BWTEnum.LEFT (default), CENTER, or RIGHT.

 o getMaximumLength
 public int getMaximumLength()
Gets the MaximumLength value.

See Also:
setMaximumLength
 o setMaximumLength
 public void setMaximumLength(int v)
Sets the maximum number of characters which may be entered by the user (default: BWTEnum.MAXINT). If the user attempts to enter more characters, the values will be ignored and the bell will be sounded. This value is ignored for values set programmatically.

 o getStringCase
 public int getStringCase()
Gets the StringCase value.

See Also:
setStringCase
 o setStringCase
 public void setStringCase(int v)
Sets the case of text entered by the user or set programmatically:
BWTEnum.CASE_AS_IS       No conversion (default)
BWTEnum.CASE_LOWER       Convert to lower case
BWTEnum.CASE_UPPER       Convert to upper case

 o beep
 public void beep()
Emits a beep.

 o getChanged
 public boolean getChanged()
Returns true if the user has changed the value since the last programmatic setting.

See Also:
setChanged
 o setChanged
 public void setChanged(boolean v)
Resets the Changed flag.

See Also:
setChanged
 o getMinimumSize
 public Dimension getMinimumSize(int columns)
Returns the minimum size needed for the specified number of columns.

 o getSelectionList
 public int[] getSelectionList()
Gets the current SelectionList.

See Also:
setSelectionList
 o setSelectionList
 public void setSelectionList(int list[])
Sets a list of values used for multi-click. As the mouse is clicked in rapid succession, each click selects the next type in the list. Valid BWTEnum values (in order of the default list):
 SELECT_POSITION     Selects the current pointer position
 SELECT_WORD         Selects the current word
 SELECT_LINE         Selects the current line
 SELECT_PARAGRAPH    Selects the current paragraph
 SELECT_ALL          Selects all the text
 
Default list: { BWTEnum.SELECT_POSITION, SELECT_WORD, SELECT_LINE, SELECT_ALL }

 o getSelectedBackground
 public Color getSelectedBackground()
Gets the SelectedBackground value.

See Also:
setSelectedBackground
 o setSelectedBackground
 public void setSelectedBackground(Color v)
Sets the background color of selected text (default: blue).

HTML param name/value: "SelectedBackground"/color

See Also:
toColor
 o getSelectedForeground
 public Color getSelectedForeground()
Gets the SelectedForeground value.

See Also:
setSelectedForeground
 o setSelectedForeground
 public void setSelectedForeground(Color v)
Sets the foreground color of selected text (default: background color).

HTML param name/value: "SelectedForeground"/color

See Also:
toColor
 o pointToPosition
 public int pointToPosition(int x,
                            int y)
Maps a physical position to the corresponding character position.

 o showPosition
 public void showPosition(int pos)
Scrolls the text if necessary to ensure that the position is visible.

Parameters:
pos - the number of characters from the beginning of the text buffer.
 o getCursorPosition
 public int getCursorPosition()
Gets the position of the cursor.

See Also:
setCursorPosition
 o setCursorPosition
 public void setCursorPosition(int pos)
Sets the position of the cursor.

 o setOverstrike
 public void setOverstrike(boolean v)
If false (default), characters typed by the user are inserted into the current text.

 o getOverstrike
 public boolean getOverstrike()
Gets the Overstrike value.

See Also:
setOverstrike
 o getLastPosition
 public int getLastPosition()
Gets the position of the last character in the text. This represents the position that text appended to the component would be placed after.

 o getShowCursorPosition
 public boolean getShowCursorPosition()
Gets the ShowCursorPosition value.

See Also:
setShowCursorPosition
 o setShowCursorPosition
 public void setShowCursorPosition(boolean v)
If set to true (default), the cursor position will be indicated with a vertical I-beam.

 o addTextListener
 public void addTextListener(JCTextListener l)
Adds the specified listener to receive text events.

See Also:
JCTextEvent
 o removeTextListener
 public void removeTextListener(JCTextListener l)
Removes the specified text listener so it no longer receives text events.

 o addTextCursorListener
 public void addTextCursorListener(JCTextCursorListener l)
Adds the specified JCTextCursorEvent listener to receive cursor movement events.

See Also:
JCTextCursorEvent
 o removeTextCursorListener
 public void removeTextCursorListener(JCTextCursorListener l)
Removes the specified listener so it no longer receives JCTextCursorEvents.

See Also:
addTextCursorListener
 o getShadowThickness
 public int getShadowThickness()
Gets the shadow's thickness.

HTML param name/value: "ShadowThickness"/int

See Also:
setShadowThickness
 o setShadowThickness
 public void setShadowThickness(int v)
Sets the shadow's thickness (default: 2)

 o getHighlightThickness
 public int getHighlightThickness()
Gets the thickness of the highlight rectangle.

See Also:
setHighlightThickness
 o setHighlightThickness
 public void setHighlightThickness(int v)
Sets the thickness of the rectangle drawn when the component has focus (default: 2).

HTML param name/value: "HighlightThickness"/int

See Also:
toInt
 o getHighlightColor
 public Color getHighlightColor()
Gets the color of the highlight rectangle.

See Also:
setHighlightColor
 o setHighlightColor
 public void setHighlightColor(Color v)
Sets the color of the rectangle drawn when the component has focus (default: black).

HTML param name/value: "HighlightColor"/Color

See Also:
toColor

All Packages  Class Hierarchy  This Package  Previous  Next  Index