|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.ItemView
de.enough.polish.ui.ContainerView
de.enough.polish.ui.containerviews.ExclusiveSingleLineView
public class ExclusiveSingleLineView
Shows only the currently selected item of an exclusive ChoiceGroup or an exclusive List.
Apply this view by specifying "view-type: exclusive-single-line;" in your polish.css file.
Copyright (c) Enough Software 2005 - 2008
history
08-Apr-2005 - rob creation
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.ContainerView |
|---|
allowCycling, allowsAutoTraversal, allowsDirectSelectionByPointerEvent, appearanceMode, columnsSetting, columnsWidths, EQUAL_WIDTH_COLUMNS, focusedIndex, focusedItem, focusFirstElement, isExpandItems, isHorizontal, isSequentialTraversal, isVertical, leftXOffset, NO_COLUMNS, NORMAL_WIDTH_COLUMNS, numberOfColumns, numberOfRows, parentContainer, restartAnimation, rightXOffset, rowsHeights, STATIC_WIDTH_COLUMNS, topYOffset, yOffset |
| Fields inherited from class de.enough.polish.ui.ItemView |
|---|
contentHeight, contentWidth, isFocused, isLayoutCenter, isLayoutRight, layout, paddingHorizontal, paddingVertical, parentItem |
| Constructor Summary | |
|---|---|
ExclusiveSingleLineView()
Creates a new view |
|
| Method Summary | |
|---|---|
protected void |
defocus(Style originalStyle)
Notifies this view that the parent container is not focused anymore. |
void |
focus(Style focusstyle,
int direction)
Sets the focus to this container view. |
protected Item |
getNextItem(int keyCode,
int gameAction)
Interpretes the given user-input and retrieves the nexte item which should be focused. |
boolean |
handlePointerPressed(int x,
int y)
Handles pointer pressed events. |
protected void |
initContent(Item parentItm,
int firstLineWidth,
int lineWidth)
Initialises this item. |
protected boolean |
isValid(Item parent,
Style style)
Implementation that are valid only for specific item classes can override this method so that they cannot be accidently attached to unsupported classes. |
protected void |
paintContent(Item parent,
int x,
int y,
int leftBorder,
int rightBorder,
javax.microedition.lcdui.Graphics g)
Paints the content of this container view. |
protected void |
setStyle(Style style)
Sets the style for this view. |
| Methods inherited from class de.enough.polish.ui.ContainerView |
|---|
focusItem, focusItem, focusItem, getItemRelativeY, getNextFocusableItem, getParentRelativeY, getScreen, handleKeyPressed, isInBottomRow, isLayoutExpand, paintContent, paintItem, scroll, shiftFocus, showNotify |
| Methods inherited from class de.enough.polish.ui.ItemView |
|---|
addFullRepaintRegion, animate, animate, handleKeyReleased, handlePointerReleased, hideNotify, initContentByParent, notifyItemPressedEnd, notifyItemPressedStart, paintBackground, paintBorder, paintContentByParent, releaseResources, removeItemBackground, removeItemBorder, removeParentBackground, removeParentBorder, removeViewFromParent, requestInit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExclusiveSingleLineView()
| Method Detail |
|---|
protected void initContent(Item parentItm,
int firstLineWidth,
int lineWidth)
ContainerView
initContent in class ContainerViewparentItm - the Container which uses this view, use parent.getItems() for retrieving all items.firstLineWidth - the maximum width of the first linelineWidth - the maximum width of any following linesItemView.contentWidth,
ItemView.contentHeightprotected void setStyle(Style style)
ContainerView
setStyle in class ContainerViewstyle - the style
protected void paintContent(Item parent,
int x,
int y,
int leftBorder,
int rightBorder,
javax.microedition.lcdui.Graphics g)
ContainerView
paintContent in class ContainerViewparent - the parent itemx - the left start positiony - the upper start positionleftBorder - the left border, nothing must be painted left of this positionrightBorder - the right border, nothing must be painted right of this positiong - the Graphics on which this item should be painted.ContainerView.paintContent(Container, Item[], int, int, int, int, int, int, int, int, Graphics)
protected Item getNextItem(int keyCode,
int gameAction)
ContainerView
getNextItem in class ContainerViewkeyCode - the code of the keyPressed-eventsgameAction - the associated game-action to the given keyCode
public boolean handlePointerPressed(int x,
int y)
handlePointerPressed in class ItemViewx - the x position of the eventy - the y position of the event
protected void defocus(Style originalStyle)
ItemView
defocus in class ItemVieworiginalStyle - the previous used style, may be null.
public void focus(Style focusstyle,
int direction)
ItemView
focus in class ItemViewfocusstyle - the appropriate style.direction - the direction from the which the focus is gained,
either Canvas.UP, Canvas.DOWN, Canvas.LEFT, Canvas.RIGHT or 0.
When 0 is given, the direction is unknown.1
protected boolean isValid(Item parent,
Style style)
ItemView
isValid in class ContainerViewparent - the parent itemstyle - the style
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||