|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
de.enough.polish.ui.Screen
de.enough.polish.ui.Form
de.enough.polish.ui.TabbedForm
public class TabbedForm
Separates a form into several tabs.
Copyright (c) Enough Software 2005 - 2008
history
23-Jan-2005 - rob creation
| Field Summary |
|---|
| Fields inherited from class javax.microedition.lcdui.Canvas |
|---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
| Constructor Summary | |
|---|---|
TabbedForm(java.lang.String title,
java.lang.String[] tabNames,
javax.microedition.lcdui.Image[] tabImages)
Creates a new tabbed form without a style. |
|
TabbedForm(java.lang.String title,
java.lang.String[] tabNames,
javax.microedition.lcdui.Image[] tabImages,
Style style)
Creates a new tabbed form. |
|
| Method Summary | |
|---|---|
void |
addNewTab(int index,
java.lang.String tabName,
javax.microedition.lcdui.Image tabImage)
Adds a new tab with a container to the TabbedForm. |
void |
addNewTab(int index,
java.lang.String tabName,
javax.microedition.lcdui.Image tabImage,
Style tabStyle)
Adds a new tab with a container to the TabbedForm. |
int |
addNewTab(java.lang.String tabName,
javax.microedition.lcdui.Image tabImage)
Adds a new tab with a container to the TabbedForm. |
int |
addNewTab(java.lang.String tabName,
javax.microedition.lcdui.Image tabImage,
Style tabStyle)
Adds a new tab with a container to the TabbedForm. |
void |
append(int tabIndex,
javax.microedition.lcdui.Item item)
Adds the item to this form. |
int |
append(int tabIndex,
Item item)
Adds the item to this form. |
int |
append(int tabIndex,
Item item,
Style itemStyle)
Adds the item to this form. |
int |
append(Item item,
Style itemStyle)
Adds the item to the first tab of this form. |
protected java.lang.String |
createCssSelector()
Retrieves the CSS selector for this screen. |
void |
delete(int tabIndex,
int itemIndex)
Deletes the item from this form. |
void |
delete(int tabIndex,
javax.microedition.lcdui.Item item)
Deletes the item from this form. |
void |
delete(int tabIndex,
Item item)
Deletes the item from this form. |
void |
deleteAll(int tabIndex)
Deletes the all items from the specified tab. |
void |
focus(Item item)
Focuses the specified item. |
javax.microedition.lcdui.Item |
get(int tabIndex,
int itemNum)
Gets the item at given position within the specified tab. |
int |
getActiveTab()
Retrieves the index of the currently active tab. |
Item |
getCurrentItem()
Retrieves the currently focused item. |
int |
getSelectedTab()
Deprecated. |
int |
getTabCount()
Retrieves the number of tabs in this TabbedForm. |
Item |
getTabItem(int tabIndex)
Retrieves the item that renders the tab |
protected boolean |
handleKeyPressed(int keyCode,
int gameAction)
Handles the key-pressed event. |
void |
insert(int tabIndex,
int itemNum,
javax.microedition.lcdui.Item item)
Inserts an item into this form just prior to the item specified on the specified tab. |
void |
insert(int tabIndex,
int itemNum,
Item item)
Inserts an item into this form just prior to the item specified on the specified tab. |
void |
insert(int tabIndex,
int itemNum,
javax.microedition.lcdui.Item item,
Style itemStyle)
Inserts an item into this form just prior to the item specified on the specified tab. |
void |
insert(int tabIndex,
int itemNum,
Item item,
Style itemStyle)
Inserts an item into this form just prior to the item specified on the specified tab. |
void |
notifyTabbedChangeCompleted(int oldTabIndex,
int newTabIndex)
Notifies the TabbedFormListener that a tab change is completed. |
boolean |
notifyTabbedChangeRequested(int oldTabIndex,
int newTabIndex)
Notifies the TabbedFormListener that a tab change was requested. |
void |
removeTab(int index)
Removes a tab and its container from the TabbedForm. |
void |
set(int tabIndex,
int itemIndex,
javax.microedition.lcdui.Item item)
Changes the item of a tab. |
void |
set(int tabIndex,
int itemIndex,
Item item)
Changes the item of a tab. |
void |
set(int itemIndex,
Item item)
Changes the item of the first tab. |
void |
setActiveTab(int tabIndex)
Focuses the specified tab. |
void |
setActiveTab(int tabIndex,
boolean focusTabBar)
Focuses the specified tab. |
void |
setStyle(Style style)
Sets the style of this screen. |
void |
setTabbedFormListener(TabbedFormListener listener)
Sets the TabbedFormListener to be notified when tab changes happen. |
void |
setTabImage(int tabIndex,
javax.microedition.lcdui.Image image)
Sets the image for the specified tab. |
void |
setTabItem(int tabIndex,
Item item)
Sets the item that renders the specified tab |
void |
setTabItem(int tabIndex,
javax.microedition.lcdui.Item item)
Sets the item that renders the specified tab |
void |
setText(int tabIndex,
java.lang.String text)
Sets the text for the specified tab. |
int |
size(int tabIndex)
Retrieves the number of elements within the specified tab. |
void |
sizeChanged(int width,
int height)
|
| Methods inherited from class de.enough.polish.ui.Form |
|---|
append, append, append, append, append, append, delete, deleteAll, get, insert, insert, set, size |
| Methods inherited from class javax.microedition.lcdui.Canvas |
|---|
getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints |
| Methods inherited from class javax.microedition.lcdui.Displayable |
|---|
getHeight, getTicker, getWidth, setTicker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TabbedForm(java.lang.String title,
java.lang.String[] tabNames,
javax.microedition.lcdui.Image[] tabImages)
title - the title of the form.tabNames - the names of the tabstabImages - the images of the tabs, can be null
public TabbedForm(java.lang.String title,
java.lang.String[] tabNames,
javax.microedition.lcdui.Image[] tabImages,
Style style)
title - the title of the form.tabNames - the names of the tabstabImages - the images of the tabs, can be nullstyle - the style of this tabbed form.
java.lang.NullPointerException - if tabNames is null| Method Detail |
|---|
public void append(int tabIndex,
javax.microedition.lcdui.Item item)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.item - the item which should be added.
public void set(int tabIndex,
int itemIndex,
javax.microedition.lcdui.Item item)
tabIndex - the index of the tab,
the first tab has the index 0.itemIndex - the index of the item in the tabitem - the item which should be added.
public void delete(int tabIndex,
javax.microedition.lcdui.Item item)
tabIndex - the index of the tab from which the item should be removed,
the first tab has the index 0.item - the item which should be removed.
public int append(Item item,
Style itemStyle)
append in class Formitem - the item which should be added.itemStyle - the style for that item
public int append(int tabIndex,
Item item)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.item - the item which should be added.
public int append(int tabIndex,
Item item,
Style itemStyle)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.item - the item which should be added.itemStyle - the style for that item
public void insert(int tabIndex,
int itemNum,
javax.microedition.lcdui.Item item)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.itemNum - the index where insertion is to occuritem - the item to be inserted
public void insert(int tabIndex,
int itemNum,
Item item)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.itemNum - the index where insertion is to occuritem - the item to be inserted
public void insert(int tabIndex,
int itemNum,
javax.microedition.lcdui.Item item,
Style itemStyle)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.itemNum - the index where insertion is to occuritem - the item to be inserteditemStyle - the style of the item
public void insert(int tabIndex,
int itemNum,
Item item,
Style itemStyle)
tabIndex - the index of the tab to which the item should be added,
the first tab has the index 0.itemNum - the index where insertion is to occuritem - the item to be inserteditemStyle - the style of the item
public void set(int itemIndex,
Item item)
set in class FormitemIndex - the index of the item in the tabitem - the item which should be added.
public void set(int tabIndex,
int itemIndex,
Item item)
tabIndex - the index of the tab,
the first tab has the index 0.itemIndex - the index of the item in the tabitem - the item which should be added.
public javax.microedition.lcdui.Item get(int tabIndex,
int itemNum)
TabbedForm are left unchanged.
The itemNum parameter must be
within the range [0..size()-1], inclusive.
tabIndex - the index of the tab,
the first tab has the index 0.itemNum - the index of item
java.lang.IndexOutOfBoundsException - - if itemNum is invalid
public void delete(int tabIndex,
Item item)
tabIndex - the index of the tab from which the item should be removed,
the first tab has the index 0.item - the item which should be removed.
public void delete(int tabIndex,
int itemIndex)
tabIndex - the index of the tab from which the item should be removed,
the first tab has the index 0.itemIndex - the index of the item which should be removed.public void deleteAll(int tabIndex)
tabIndex - the index of the tab from which all items should be removed,
the first tab has the index 0.public int size(int tabIndex)
tabIndex - the tab, the first tab has the index 0
public int getTabCount()
TabbedForm.
public void setActiveTab(int tabIndex)
tabIndex - the index of the tab, the first tab has the index 0.
public void setActiveTab(int tabIndex,
boolean focusTabBar)
tabIndex - the index of the tab, the first tab has the index 0.focusTabBar - true when the tabbar should be focused - this only has an effect when polish.TabbedForm.allowTabSelection is set to true
public void setTabImage(int tabIndex,
javax.microedition.lcdui.Image image)
tabIndex - the index of the tabimage - the image
public void setText(int tabIndex,
java.lang.String text)
tabIndex - the index of the tabtext - the textprotected java.lang.String createCssSelector()
Screen
createCssSelector in class Form
protected boolean handleKeyPressed(int keyCode,
int gameAction)
Screen
handleKeyPressed in class ScreenkeyCode - the code of the pressed key, e.g. Canvas.KEY_NUM2gameAction - the corresponding game-action, e.g. Canvas.UP
public void focus(Item item)
Screen
focus in class Screenitem - the item which is already shown on this screen.public int getSelectedTab()
getActiveTab()public int getActiveTab()
public boolean notifyTabbedChangeRequested(int oldTabIndex,
int newTabIndex)
TabbedFormListener that a tab change was requested. Then
TabbedFormListener can now allow or disallow the tab change.
oldTabIndex - the index of the old tabnewTabIndex - the index of the new tab
true if a tab change is okay, false otherwise
public void notifyTabbedChangeCompleted(int oldTabIndex,
int newTabIndex)
TabbedFormListener that a tab change is completed.
oldTabIndex - the index of the old tabnewTabIndex - the index of the new tabpublic void setTabbedFormListener(TabbedFormListener listener)
TabbedFormListener to be notified when tab changes happen.
listener - the listener that is notified whenever the user selects another tab,public Item getCurrentItem()
Screen
getCurrentItem in class Screen
public void sizeChanged(int width,
int height)
sizeChanged in interface AccessibleCanvassizeChanged in class Screenpublic void setStyle(Style style)
Screen
setStyle in class Screenstyle - the style
public int addNewTab(java.lang.String tabName,
javax.microedition.lcdui.Image tabImage)
tabName - The name of the new tabtabImage - The optional image
public int addNewTab(java.lang.String tabName,
javax.microedition.lcdui.Image tabImage,
Style tabStyle)
tabName - The name of the new tabtabImage - The optional imagetabStyle - The initial style of the tab
public void addNewTab(int index,
java.lang.String tabName,
javax.microedition.lcdui.Image tabImage)
index - the index at which the tab should be added. 0 adds the tab at the beginning.tabName - The name of the new tabtabImage - The optional image
public void addNewTab(int index,
java.lang.String tabName,
javax.microedition.lcdui.Image tabImage,
Style tabStyle)
tabName - The name of the new tabtabImage - The optional imagetabStyle - The initial style of the tabpublic void removeTab(int index)
index - The tab at the index to removepublic Item getTabItem(int tabIndex)
tabIndex - the tab position
public void setTabItem(int tabIndex,
Item item)
tabIndex - the tab positionitem - the tab item
public void setTabItem(int tabIndex,
javax.microedition.lcdui.Item item)
tabIndex - the tab positionitem - the tab item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||