|
||||||||||
| 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.Midp2ContainerView
public class Midp2ContainerView
Aligns elements according to the MIDP 2.0 layout directives of the items.
Usage:
.myForm {
view-type: midp2;
}
Copyright Enough Software 2008
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.ItemView |
|---|
availableHeight, availableWidth, contentHeight, contentWidth, isFocused, isLayoutCenter, isLayoutRight, layout, paddingHorizontal, paddingVertical, parentItem |
| Constructor Summary | |
|---|---|
Midp2ContainerView()
Creates a new view type |
|
| Method Summary | |
|---|---|
protected void |
addLineBreak(Item[] items,
int currentRowStartIndex,
int currentRowEndIndex,
int currentRowWidth,
int currentRowHeight,
int availWidth)
Adds a linebreak to the current list of items. |
int |
getContentHeight()
Retrieves the content height |
int |
getContentWidth()
Retrieves the content width |
void |
initContent(Item[] items,
int firstLineWidth,
int availWidth,
int availHeight)
Initiates this view for the specified items |
protected void |
initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
Initializes this container view. |
boolean |
isVerticalLayout()
Checks if this ContainerView arranges its child items vertically. |
void |
paintContent(Item[] items,
int x,
int y,
int leftBorder,
int rightBorder,
Graphics g)
Paints the content of this MIDP2 view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Midp2ContainerView()
| 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
public void initContent(Item[] items,
int firstLineWidth,
int availWidth,
int availHeight)
items - the itemsfirstLineWidth - available width for the first lineavailWidth - available width for the viewavailHeight - available height for the view
protected void addLineBreak(Item[] items,
int currentRowStartIndex,
int currentRowEndIndex,
int currentRowWidth,
int currentRowHeight,
int availWidth)
public void paintContent(Item[] items,
int x,
int y,
int leftBorder,
int rightBorder,
Graphics g)
items - the nested itemsx - y - leftBorder - rightBorder - g - public int getContentHeight()
getContentHeight in class ContainerViewpublic int getContentWidth()
getContentWidth in class ContainerViewpublic boolean isVerticalLayout()
ContainerView
isVerticalLayout in class ContainerView
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||