|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Item
javax.microedition.lcdui.CustomItem
de.enough.polish.ui.FakeCustomItem
de.enough.polish.ui.FakeStringCustomItem
de.enough.polish.ui.FilteredChoiceGroup
public class FilteredChoiceGroup
Displays the currently selected item(s) and opens up a new FilteredList for selecting an element.
Copyright Enough Software 2007 - 2008
history
Jun 26, 2007 - rob creation
FilteredList| Field Summary | |
|---|---|
static int |
EXCLUSIVE
Only a single option can be selected |
static int |
IMPLICIT
Only a single option can be selected - it is selected automatically when pressing FIRE. |
static int |
MULTIPLE
Several values can be selected |
| Fields inherited from class de.enough.polish.ui.FakeStringCustomItem |
|---|
bitMapFont, bitMapFontViewer, clipText, font, text, textColor, textEffect, textHorizontalAdjustment, textLines, textVerticalAdjustment, useSingleLine, xOffset |
| Fields inherited from class javax.microedition.lcdui.CustomItem |
|---|
KEY_PRESS, KEY_RELEASE, KEY_REPEAT, NONE, POINTER_DRAG, POINTER_PRESS, POINTER_RELEASE, TRAVERSE_HORIZONTAL, TRAVERSE_VERTICAL |
| Fields inherited from interface javax.microedition.lcdui.Choice |
|---|
POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF, TEXT_WRAP_ON |
| Constructor Summary | |
|---|---|
FilteredChoiceGroup(java.lang.String label,
java.lang.String nullText,
int listType)
Creates a new FilteredChoiceGroup. |
|
FilteredChoiceGroup(java.lang.String label,
java.lang.String nullText,
int listType,
Style style)
Creates a new FilteredChoiceGroup. |
|
| Method Summary | |
|---|---|
int |
append(ChoiceItem item)
Appends an item to this group. |
int |
append(java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
|
int |
append(java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style itemStyle)
Appends an item to this group. |
void |
commandAction(javax.microedition.lcdui.Command cmd,
javax.microedition.lcdui.Displayable disp)
|
void |
delete(int elementNum)
|
void |
deleteAll()
|
java.lang.String |
getDelimiter()
Retrieves the delimiter for separating text entries of a MULTIPLE FilteredChoiceGroup |
int |
getFitPolicy()
|
javax.microedition.lcdui.Font |
getFont(int elementNum)
|
javax.microedition.lcdui.Image |
getImage(int elementNum)
|
int |
getSelectedFlags(boolean[] selectedArray_return)
|
int |
getSelectedIndex()
|
java.lang.String |
getString(int elementNum)
|
protected boolean |
handleKeyReleased(int keyCode,
int gameAction)
Handles the key-released event. |
void |
insert(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
|
void |
insert(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style elementStyle)
Inserts an element with an attached style definition |
boolean |
isSelected(int elementNum)
|
void |
resetFilter()
Resets the filter text to null. |
void |
set(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
|
void |
set(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style elementStyle)
Sets an item at the specified index |
void |
setDelimiter(java.lang.String delimiter)
Sets the delimiter for separating text entries of a MULTIPLE FilteredChoiceGroup - the default is ", " |
void |
setFitPolicy(int fitPolicy)
|
void |
setFont(int elementNum,
javax.microedition.lcdui.Font font)
|
void |
setSelectedFlags(boolean[] selectedArray)
|
void |
setSelectedIndex(int elementNum,
boolean selected)
|
void |
setStyle(Style style)
Sets the style of this item. |
void |
showFilteredList(javax.microedition.lcdui.Display display)
Shows the filtered list. |
int |
size()
|
| Methods inherited from class de.enough.polish.ui.FakeStringCustomItem |
|---|
animate, createCssSelector, defocus, getFont, getText, hideNotify, initContent, paintContent, releaseResources, setFont, setText, setText, showNotify, toString |
| Methods inherited from class javax.microedition.lcdui.CustomItem |
|---|
getGameAction, getInteractionModes, invalidate, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, sizeChanged, traverse, traverseOut |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EXCLUSIVE
public static final int MULTIPLE
public static final int IMPLICIT
| Constructor Detail |
|---|
public FilteredChoiceGroup(java.lang.String label,
java.lang.String nullText,
int listType)
label - the label of the groupnullText - the text that should be displayed when no item has been selectedlistType - the type of the list, e.g. Choice.MULTIPLE, Choice.EXCLUSIVE or Choice.IMPLICIT
public FilteredChoiceGroup(java.lang.String label,
java.lang.String nullText,
int listType,
Style style)
label - the label of the groupnullText - the text that should be displayed when no item has been selectedlistType - the type of the list, e.g. Choice.MULTIPLE, Choice.EXCLUSIVE or Choice.IMPLICITstyle - the style of this group| Method Detail |
|---|
public int append(java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
append in interface javax.microedition.lcdui.Choice
public int append(java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style itemStyle)
stringPart - the string part of the element to be addedimagePart - the image part of the element to be added, or null if there is no image partitemStyle - the style for the new list element.
java.lang.NullPointerException - if stringPart is nullpublic int append(ChoiceItem item)
item - the choice item to be added
java.lang.NullPointerException - if item is nullpublic void delete(int elementNum)
delete in interface javax.microedition.lcdui.Choicepublic void deleteAll()
deleteAll in interface javax.microedition.lcdui.Choicepublic int getFitPolicy()
getFitPolicy in interface javax.microedition.lcdui.Choicepublic javax.microedition.lcdui.Font getFont(int elementNum)
getFont in interface javax.microedition.lcdui.Choicepublic javax.microedition.lcdui.Image getImage(int elementNum)
getImage in interface javax.microedition.lcdui.Choicepublic int getSelectedFlags(boolean[] selectedArray_return)
getSelectedFlags in interface javax.microedition.lcdui.Choicepublic int getSelectedIndex()
getSelectedIndex in interface javax.microedition.lcdui.Choicepublic java.lang.String getString(int elementNum)
getString in interface javax.microedition.lcdui.Choice
public void insert(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
insert in interface javax.microedition.lcdui.Choice
public void insert(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style elementStyle)
elementNum - the index at which the element is addedstringPart - the textimagePart - the optional imageelementStyle - the associated stylepublic boolean isSelected(int elementNum)
isSelected in interface javax.microedition.lcdui.Choice
public void set(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart)
set in interface javax.microedition.lcdui.Choice
public void set(int elementNum,
java.lang.String stringPart,
javax.microedition.lcdui.Image imagePart,
Style elementStyle)
elementNum - the element indexstringPart - the textimagePart - the imageelementStyle - the associated stylepublic void setFitPolicy(int fitPolicy)
setFitPolicy in interface javax.microedition.lcdui.Choice
public void setFont(int elementNum,
javax.microedition.lcdui.Font font)
setFont in interface javax.microedition.lcdui.Choicepublic void setSelectedFlags(boolean[] selectedArray)
setSelectedFlags in interface javax.microedition.lcdui.Choice
public void setSelectedIndex(int elementNum,
boolean selected)
setSelectedIndex in interface javax.microedition.lcdui.Choicepublic int size()
size in interface javax.microedition.lcdui.Choice
protected boolean handleKeyReleased(int keyCode,
int gameAction)
FakeCustomItem
handleKeyReleased in class FakeCustomItemkeyCode - the code of the pressed key, e.g. Canvas.KEY_NUM2gameAction - the corresponding game-action, e.g. Canvas.UP
FakeCustomItem.handleKeyPressed(int, int)
public void commandAction(javax.microedition.lcdui.Command cmd,
javax.microedition.lcdui.Displayable disp)
commandAction in interface javax.microedition.lcdui.CommandListenerpublic void resetFilter()
public void showFilteredList(javax.microedition.lcdui.Display display)
display - the displaypublic void setStyle(Style style)
FakeCustomItem
setStyle in class FakeStringCustomItemstyle - the new style for this item.public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter - the delimiter to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||