|
||||||||||
| 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.TabbedContainerView
public class TabbedContainerView
Displays embedded all items in different tabs.
usage:
.myList {
view-type: tabbed;
tabbedview-icon: url( tab.png );
tabbedview-icon-hover: url( tabHover.png );
tabbedview-tabbar-position: bottom;
tabbedview-tabbar-style: .myListTabs;
tabbedview-tab-style: .myListTab;
}
.myListTabs {
view-type: horizontal;
layout: center;
}
.myListTab {
}
.myListTab:hover {
background-color: red;
}
Copyright Enough Software 2010
| Field Summary | |
|---|---|
static int |
POSITION_BOTTOM
Positions the tabs below the items. |
static int |
POSITION_TOP
Positions the tabs above the items. |
| Fields inherited from class de.enough.polish.ui.ItemView |
|---|
availableHeight, availableWidth, contentHeight, contentWidth, isFocused, isLayoutCenter, isLayoutRight, layout, paddingHorizontal, paddingVertical, parentItem |
| Constructor Summary | |
|---|---|
TabbedContainerView()
Creates a new tabbed view-type |
|
| Method Summary | |
|---|---|
void |
animate(long currentTime,
ClippingRegion repaintRegion)
Animates this item. |
protected Item |
getNextItem(int keyCode,
int gameAction)
Interprets the given user-input and retrieves the next item which should be focused. |
boolean |
handlePointerDragged(int x,
int y,
ClippingRegion repaintRegion)
Handles the event when a pointer has been dragged to the specified position. |
boolean |
handlePointerPressed(int x,
int y)
Handles pointer pressed events. |
boolean |
handlePointerReleased(int x,
int y)
Handles the event when a pointer has been released at the specified position. |
boolean |
handlePointerTouchDown(int x,
int y)
Handles a touch down/press event. |
boolean |
handlePointerTouchUp(int x,
int y)
Handles a touch up/release event. |
protected void |
initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
Initializes this container view. |
void |
onFocusChanged(Container parent,
Item focItem,
int focIndex)
Notifies about that the focus has been changed. |
protected void |
onScreenSizeChanged(int screenWidth,
int screenHeight)
Notifies this item about a new screen size. |
protected void |
paintContent(Container container,
Item[] myItems,
int x,
int y,
int leftBorder,
int rightBorder,
int clipX,
int clipY,
int clipWidth,
int clipHeight,
Graphics g)
Paints the content of this container view. |
protected void |
setStyle(Style style)
Sets the style for this view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int POSITION_TOP
public static final int POSITION_BOTTOM
| Constructor Detail |
|---|
public TabbedContainerView()
| Method Detail |
|---|
protected void initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
ContainerView
initContent in class ContainerViewparentContainerItem - the Container which uses this view, use parent.getItems() for retrieving all items.firstLineWidth - the maximum width of the first lineavailWidth - the maximum width of any following linesavailHeight - the maximum height of the viewItemView.contentWidth,
ItemView.contentHeight
protected void paintContent(Container container,
Item[] myItems,
int x,
int y,
int leftBorder,
int rightBorder,
int clipX,
int clipY,
int clipWidth,
int clipHeight,
Graphics g)
ContainerView
paintContent in class ContainerViewcontainer - the parent containermyItems - the items that should be paintedx - 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 positionclipX - absolute horizontal clipping startclipY - absolute verical clipping startclipWidth - clipping widthclipHeight - clipping heightg - the Graphics on which this item should be painted.protected void setStyle(Style style)
ContainerView
setStyle in class ContainerViewstyle - the style
public boolean handlePointerPressed(int x,
int y)
ItemView//#if polish.hasPointerEvents
handlePointerPressed in class ContainerViewx - the x position of the event relative to the item's horizontal left edgey - the y position of the event relative to the item's vertical top edge
public boolean handlePointerReleased(int x,
int y)
ItemView//#if polish.hasPointerEvents
handlePointerReleased in class ContainerViewx - the x position of the event relative to the item's horizontal left edgey - the y position of the event relative to the item's vertical top edge
public boolean handlePointerDragged(int x,
int y,
ClippingRegion repaintRegion)
ItemView//#if polish.hasPointerEvents
handlePointerDragged in class ContainerViewx - the x position of the event relative to the item's horizontal left edgey - the y position of the event relative to the item's vertical top edgerepaintRegion - the repaint region into which the repaint area is marked when the event is handled
ItemView.handlePointerDragged(int, int),
Item.addRepaintArea(ClippingRegion)
public boolean handlePointerTouchDown(int x,
int y)
ItemView
handlePointerTouchDown in class ContainerViewx - the horizontal pixel position of the touch event relative to the parent item's left positiony - the vertical pixel position of the touch event relative to the parent item's top position
public boolean handlePointerTouchUp(int x,
int y)
ItemView
handlePointerTouchUp in class ContainerViewx - the horizontal pixel position of the touch event relative to the parent item's left positiony - the vertical pixel position of the touch event relative to the parent item's top position
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 void animate(long currentTime,
ClippingRegion repaintRegion)
ItemView
animate in class ContainerViewcurrentTime - the current time in millisecondsrepaintRegion - the repaint area that needs to be updated when this item is animatedItem.getAbsoluteX(),
Item.getAbsoluteY()
public void onFocusChanged(Container parent,
Item focItem,
int focIndex)
FocusListener
onFocusChanged in interface FocusListenerparent - the parent containerfocItem - the item that has received the focus, may be nullfocIndex - the new focused index, may be -1.
protected void onScreenSizeChanged(int screenWidth,
int screenHeight)
ItemView
onScreenSizeChanged in class ItemViewscreenWidth - the screen widthscreenHeight - the screen height
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||