|
|||||||||
| Home >> All >> jcurses >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jcurses.widgets
Class PopUpList

java.lang.Objectjcurses.widgets.Widget
jcurses.widgets.PopUpList
- public class PopUpList
- extends Widget
This class implements a popup list. Such list has always one of the items selected and gives the possibility to change this selection ( througth an popup menu that is shown, if the user typed 'enter')
| Field Summary | |
private static jcurses.system.InputChar |
__changeValueChar
|
private static jcurses.system.CharColor |
__focusedPopUpDefaultColors
|
private static jcurses.system.CharColor |
__popUpDefaultColors
|
private jcurses.system.CharColor |
_focusedPopUpColors
|
(package private) java.util.Vector |
_items
|
private jcurses.event.ValueChangedListenerManager |
_listenerManager
|
private int |
_selectedIndex
|
| Fields inherited from class jcurses.widgets.Widget |
_parent, _window |
| Constructor Summary | |
PopUpList()
|
|
| Method Summary | |
void |
add(int pos,
java.lang.String item)
Adds an item at the specified position |
void |
add(java.lang.String item)
Adds an item |
void |
addListener(jcurses.event.ValueChangedListener listener)
Adds a listener to register selected value changes |
void |
clear()
Clears the item list |
protected void |
doPaint()
This method paints the widget. |
protected void |
doRepaint()
This method repaints the widget. |
protected void |
focus()
The method is called bei setFocus to tell widget, thas it has get focus. |
jcurses.system.CharColor |
getDefaultColors()
|
jcurses.system.CharColor |
getFocusedPopUpColors()
|
private jcurses.system.CharColor |
getFocusedPopUpDefaultColors()
|
private int |
getMaxLength()
|
protected jcurses.util.Rectangle |
getPreferredSize()
This method gives the widget container the infomation about the preferred size of this widget. |
int |
getSelectedIndex()
Returns the currently selected index |
java.lang.String |
getSelectedItem()
Returns the currently selected item |
private java.lang.String |
getText()
|
protected boolean |
handleInput(jcurses.system.InputChar ch)
The method is called by framework to let the widget handle an input char. |
protected boolean |
isFocusable()
The method declares, whether the widget can handle input ( get focus ), that is, whether this is an input widget. |
void |
remove(int pos)
Removes the item at the specified position |
void |
remove(java.lang.String item)
Removes the first ocuurence of the specified item |
void |
removeListener(jcurses.event.ValueChangedListener listener)
Removes a listener |
void |
setFocusedPopUpColors(jcurses.system.CharColor colors)
Sets colors used to paint the widget, if it has focus |
protected void |
unfocus()
The method is called bei setFocus to tell widget, thas it has lost focus. |
| Methods inherited from class jcurses.widgets.Widget |
getAbsoluteX, getAbsoluteY, getColors, getFocus, getParent, getRectangle, getShortCutsList, getSize, getVisible, getWindow, getX, getY, hasFocus, isVisible, paint, repaint, setColors, setFocus, setParent, setSize, setVisible, setWindow, setX, setY |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_selectedIndex
private int _selectedIndex
_items
java.util.Vector _items
_listenerManager
private jcurses.event.ValueChangedListenerManager _listenerManager
__popUpDefaultColors
private static jcurses.system.CharColor __popUpDefaultColors
__focusedPopUpDefaultColors
private static jcurses.system.CharColor __focusedPopUpDefaultColors
_focusedPopUpColors
private jcurses.system.CharColor _focusedPopUpColors
__changeValueChar
private static jcurses.system.InputChar __changeValueChar
| Constructor Detail |
PopUpList
public PopUpList()
| Method Detail |
getDefaultColors
public jcurses.system.CharColor getDefaultColors()
- Overrides:
getDefaultColorsin classWidget
getFocusedPopUpDefaultColors
private jcurses.system.CharColor getFocusedPopUpDefaultColors()
getFocusedPopUpColors
public jcurses.system.CharColor getFocusedPopUpColors()
setFocusedPopUpColors
public void setFocusedPopUpColors(jcurses.system.CharColor colors)
- Sets colors used to paint the widget, if it has focus
add
public void add(java.lang.String item)
- Adds an item
add
public void add(int pos,
java.lang.String item)
- Adds an item at the specified position
remove
public void remove(java.lang.String item)
- Removes the first ocuurence of the specified item
remove
public void remove(int pos)
- Removes the item at the specified position
clear
public void clear()
- Clears the item list
getSelectedIndex
public int getSelectedIndex()
- Returns the currently selected index
getSelectedItem
public java.lang.String getSelectedItem()
- Returns the currently selected item
getPreferredSize
protected jcurses.util.Rectangle getPreferredSize()
- Description copied from class:
Widget - This method gives the widget container the infomation about the
preferred size of this widget. Must be implemented by derived classes.
- Specified by:
getPreferredSizein classWidget
getMaxLength
private int getMaxLength()
getText
private java.lang.String getText()
doPaint
protected void doPaint()
- Description copied from class:
Widget - This method paints the widget. Will be called by
paint(), only if the widget is visible. Must be implemented be derived classes.
isFocusable
protected boolean isFocusable()
- Description copied from class:
Widget - The method declares, whether the widget can handle input ( get focus ), that is,
whether this is an input widget.
- Overrides:
isFocusablein classWidget
doRepaint
protected void doRepaint()
- Description copied from class:
Widget - This method repaints the widget. Will be called by
paint(), only if the widget is visible. Must be implemented be derived classes.
handleInput
protected boolean handleInput(jcurses.system.InputChar ch)
- Description copied from class:
Widget - The method is called by framework to let the widget handle an input char.
Schould be overrided be derived classes, if these can handle input.
- Overrides:
handleInputin classWidget
focus
protected void focus()
- Description copied from class:
Widget - The method is called bei
setFocusto tell widget, thas it has get focus. This method schold be overrided bei derived class to react getting focus, for examlple to repaint widget gettig focus.
unfocus
protected void unfocus()
- Description copied from class:
Widget - The method is called bei
setFocusto tell widget, thas it has lost focus. This method schold be overrided bei derived class to react losing focus, for examlple to repaint widget losing focus.
addListener
public void addListener(jcurses.event.ValueChangedListener listener)
- Adds a listener to register selected value changes
removeListener
public void removeListener(jcurses.event.ValueChangedListener listener)
- Removes a listener
|
|||||||||
| Home >> All >> jcurses >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC