    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

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
WrapAroundSearch | setWrapAroundSearch

Events

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
JCTextEvent | addTextListener | Posted when the value changes JCTextCursorEvent | addTextCursorListener | Posted when the cursor is moved

##

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

##

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

##

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

  HTML param name/value: "ShadowThickness"/int

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

  HTML param name/value: "HighlightColor"/Color

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

  HTML param name/value: "HighlightThickness"/int

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

  HTML param name/value: "SelectedBackground"/color

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

  HTML param name/value: "SelectedForeground"/color

setSelectionEnd(int)
  Sets the selected text's end position.
setSelectionList(int[])
  Sets a list of values used for multi-click.
setSelectionStart(int)
  Sets the selected text's start position.
setShadowThickness(int)
  Sets the shadow's thickness (default: 2)
setShowCursorPosition(boolean)
  If set to true (default), the cursor position will be indicated with a vertical I-beam.
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

setStyle(int)
  Sets the style, which specifies whether the list is always displayed and whether the text field is editable.
setText(String)
  Sets the text field's value to the specified string.

  HTML param name/value: "Text"/string

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.
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

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

##

COMBOBOX_SIMPLE

     public static final int COMBOBOX_SIMPLE

COMBOBOX_DROPDOWN

     public static final int COMBOBOX_DROPDOWN

COMBOBOX_DROPDOWN_LIST

     public static final int COMBOBOX_DROPDOWN_LIST

list_poppedup

     protected boolean list_poppedup

  Set to true when non-COMBOBOX_SIMPLE list is displayed.

itemListeners

     protected JCVector itemListeners

  List of JCItemEvent listeners

actionListeners

     protected JCVector actionListeners

  List of JCActionEvent listeners

listeners

     protected JCVector listeners

  List of JCComboBoxEvent listeners

BEGIN

     protected static final int BEGIN

END

     protected static final int END

##

JCComboBox

     public JCComboBox()

  Creates an empty ComboBox. No parameters are read from an HTML file.

JCComboBox

     public JCComboBox(JCVector items)

  Creates an empty ComboBox with the specified list items.

JCComboBox

     public JCComboBox(String items[],
                       String name)

  Creates a comboBox with the specified items and name. No parameters are read from an HTML file.

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

##

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

getTextField

     public JCTextField getTextField()

  Gets the component to be used as the data entry field.

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

getList

     public JCList getList()

  Gets the list component.

getButton

     public JCArrowButton getButton()

  Gets the button component.

setText

     public synchronized void setText(String s)

  Sets the text field's value to the specified string.

  HTML param name/value: "Text"/string

getText

     public synchronized String getText()

  Gets the value of the text.

  See Also:
    setText

setItems

     public void setItems(String items[])

  Sets the list's values as a list of Strings.

getItems

     public synchronized String[] getItems()

  Gets the list's values as a list of Strings.

  See Also:
    setItems

getStyle

     public int getStyle()

  Gets the Style value.

  See Also:
    setStyle

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

getItemCount

     public int getItemCount()

  Returns the number of items in the list.

  See Also:
    getItem

getItem

     public Object getItem(int index)

  Returns the item at the specified index in the list.

  See Also:
    getItemCount

add

     public void add(String item)

  Adds an item to the list.

  Throws: NullPointerException
    If the item's value is null.

remove

     public void remove(String item)

  Removes the first occurrence of an item from the list.

  Throws: IllegalArgumentException
    If the item doesn't exist

removeAll

     public void removeAll()

  Removes all items from the list.

  Overrides:
    removeAll in class Container
  See Also:
    remove

getSelectedItem

     public String getSelectedItem()

  Returns a String representation of the current choice.

  See Also:
    getSelectedIndex

getSelectedIndex

     public int getSelectedIndex()

  Returns the index of the currently selected item.

  See Also:
    getSelectedItem

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

select

     public synchronized void select(Object item)

  Selects the specified item.

  See Also:
    getSelectedItem, getSelectedIndex

getSelectedObjects

     public Object[] getSelectedObjects()

  Returns an array (length 1) containing the currently selected item.

  See Also:
    JCItemSelectable, getSelectedIndex

getSelectedIndexes

     public synchronized int[] getSelectedIndexes()

  Returns an array (length 1) containing the currently selected item.

  See Also:
    JCItemSelectable

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

getWrapAroundSearch

     public boolean getWrapAroundSearch()

  Gets the WrapAroundSearch value.

  See Also:
    setWrapAroundSearch

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.

addComboBoxListener

     public void addComboBoxListener(JCComboBoxListener l)

  Adds the specified JCComboBoxEvent listener to receive events.

  See Also:
    JCComboBoxEvent

removeComboBoxListener

     public void removeComboBoxListener(JCComboBoxListener l)

  Removes the specified listener so it no longer receives JCComboBoxEvents.

  See Also:
    addComboBoxListener

addActionListener

     public void addActionListener(JCActionListener l)

  Adds the specified action listener to receive JCTextField action events.

  See Also:
    JCActionEvent

removeActionListener

     public void removeActionListener(JCActionListener l)

  Removes the specified action listener so it no longer receives action events.

  See Also:
    addActionListener

addItemListener

     public void addItemListener(JCItemListener l)

  Adds the specified item listener to receive item selection events.

  See Also:
    JCItemEvent, JCItemListener

removeItemListener

     public void removeItemListener(JCItemListener l)

  Removes the specified item listener so it no longer receives item events.

preferredWidth

     protected int preferredWidth()

  Gets the subclass' preferred width (default: 100).

  Overrides:
    preferredWidth in class JCContainer

preferredHeight

     protected int preferredHeight()

  Gets the subclass' preferred height (default: 100).

  Overrides:
    preferredHeight in class JCContainer

addNotify

     public void addNotify()

  Creates the Panel's peer.

  Overrides:
    addNotify in class JCContainer

layout

     public void layout()

  Overrides:
    layout in class Container

showListAction

     public void showListAction(JCActionEvent ev)

  Displays the list if it is not visible. A JCComboBoxEvent is first posted.

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

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

itemStateChanged

     public void itemStateChanged(JCItemEvent ev)

  JCItemListener method - no-op

getNextAutoSearchIndex

     protected int getNextAutoSearchIndex(Event ev,
                                          int key)

getPrevAutoSearchIndex

     protected int getPrevAutoSearchIndex(Event ev,
                                          int key)

keyDown

     public boolean keyDown(Event ev,
                            int key)

  Overrides:
    keyDown in class Component

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

listItemSelectBegin

     public void listItemSelectBegin(JCListEvent ev)

  JCListListener method - no-op

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

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

paintInterior

     public void paintInterior(Graphics gc)

  Draws the shadows and title.

  Overrides:
    paintInterior in class JCContainer

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

removeKeyListener

     public void removeKeyListener(KeyListener l)

  Remove focus listener to the TextComponent

  Overrides:
    removeKeyListener in class Component
  See Also:
    addKeyListener

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

removeFocusListener

     public void removeFocusListener(FocusListener l)

  Remove focus listener to the TextComponent

  Overrides:
    removeFocusListener in class Component
  See Also:
    addFocusListener

getSelectedText

     public String getSelectedText()

  Returns the selected text contained in this component.

  See Also:
    setText

isEditable

     public boolean isEditable()

  Returns the boolean indicating whether this component is editable or not.

  See Also:
    setEditable

getEditable

     public boolean getEditable()

  Returns the boolean indicating whether this component is editable or not.

  See Also:
    setEditable

setEditable

     public void setEditable(boolean t)

  Determines whether this component is editable.

  See Also:
    isEditable

getSelectionStart

     public int getSelectionStart()

  Returns the selected text's start position.

getSelectionEnd

     public int getSelectionEnd()

  Returns the selected text's end position.

setSelectionStart

     public void setSelectionStart(int pos)

  Sets the selected text's start position.

setSelectionEnd

     public void setSelectionEnd(int pos)

  Sets the selected text's end position.

select

     public void select(int start,
                        int end)

  Selects the text found between the specified start and end locations.

selectAll

     public void selectAll()

  Selects all the text in the component.

insert

     public void insert(String str,
                        int pos)

  Inserts text at the specified position.

  See Also:
    setText, replaceRange

append

     public void append(String str)

  Appends text to the end.

  See Also:
    insert

replaceRange

     public void replaceRange(String str,
                              int start,
                              int end)

  Replaces text between two positions with the specified text.

getColumns

     public int getColumns()

  Returns the number of columns.

setColumns

     public void setColumns(int v)

  Sets the number of columns.

getAlignment

     public int getAlignment()

  Gets the field's alignment.

  See Also:
    setAlignment

setAlignment

     public void setAlignment(int v)

  Sets the position of the text:
  BWTEnum.LEFT (default), CENTER, or RIGHT.

getMaximumLength

     public int getMaximumLength()

  Gets the MaximumLength value.

  See Also:
    setMaximumLength

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.

getStringCase

     public int getStringCase()

  Gets the StringCase value.

  See Also:
    setStringCase

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

beep

     public void beep()

  Emits a beep.

getChanged

     public boolean getChanged()

  Returns true if the user has changed the value since the last programmatic setting.

  See Also:
    setChanged

setChanged

     public void setChanged(boolean v)

  Resets the Changed flag.

  See Also:
    setChanged

getMinimumSize

     public Dimension getMinimumSize(int columns)

  Returns the minimum size needed for the specified number of columns.

getSelectionList

     public int[] getSelectionList()

  Gets the current SelectionList.

  See Also:
    setSelectionList

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 }

getSelectedBackground

     public Color getSelectedBackground()

  Gets the SelectedBackground value.

  See Also:
    setSelectedBackground

setSelectedBackground

     public void setSelectedBackground(Color v)

  Sets the background color of selected text (default: blue).

  HTML param name/value: "SelectedBackground"/color

  See Also:
    toColor

getSelectedForeground

     public Color getSelectedForeground()

  Gets the SelectedForeground value.

  See Also:
    setSelectedForeground

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

pointToPosition

     public int pointToPosition(int x,
                                int y)

  Maps a physical position to the corresponding character position.

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.

getCursorPosition

     public int getCursorPosition()

  Gets the position of the cursor.

  See Also:
    setCursorPosition

setCursorPosition

     public void setCursorPosition(int pos)

  Sets the position of the cursor.

setOverstrike

     public void setOverstrike(boolean v)

  If false (default), characters typed by the user are inserted into the current text.

getOverstrike

     public boolean getOverstrike()

  Gets the Overstrike value.

  See Also:
    setOverstrike

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.

getShowCursorPosition

     public boolean getShowCursorPosition()

  Gets the ShowCursorPosition value.

  See Also:
    setShowCursorPosition

setShowCursorPosition

     public void setShowCursorPosition(boolean v)

  If set to true (default), the cursor position will be indicated with a vertical I-beam.

addTextListener

     public void addTextListener(JCTextListener l)

  Adds the specified listener to receive text events.

  See Also:
    JCTextEvent

removeTextListener

     public void removeTextListener(JCTextListener l)

  Removes the specified text listener so it no longer receives text events.

addTextCursorListener

     public void addTextCursorListener(JCTextCursorListener l)

  Adds the specified JCTextCursorEvent listener to receive cursor movement events.

  See Also:
    JCTextCursorEvent

removeTextCursorListener

     public void removeTextCursorListener(JCTextCursorListener l)

  Removes the specified listener so it no longer receives JCTextCursorEvents.

  See Also:
    addTextCursorListener

getShadowThickness

     public int getShadowThickness()

  Gets the shadow's thickness.

  HTML param name/value: "ShadowThickness"/int

  See Also:
    setShadowThickness

setShadowThickness

     public void setShadowThickness(int v)

  Sets the shadow's thickness (default: 2)

getHighlightThickness

     public int getHighlightThickness()

  Gets the thickness of the highlight rectangle.

  See Also:
    setHighlightThickness

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

getHighlightColor

     public Color getHighlightColor()

  Gets the color of the highlight rectangle.

  See Also:
    setHighlightColor

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