de.enough.polish.ui.containerviews
Class VerticalFixedContainerView
java.lang.Object
de.enough.polish.ui.ItemView
de.enough.polish.ui.ContainerView
de.enough.polish.ui.containerviews.VerticalFixedContainerView
- All Implemented Interfaces:
- Serializable
public class VerticalFixedContainerView
- extends ContainerView
Keeps the currently focused item in a fixed position (either top, center or bottom) within a list of elements.
Use this view with the "verticalfixed" view-type:
.myList {
layout: center;
view-type: verticalfixed;
verticalfixedview-align: center; (allowed values: top, center, bottom )
}
Copyright Enough Software 2007 - 2009
history
Jul 10, 2007 - rob creation
- Author:
- Robert Virkus, j2mepolish@enough.de
| Fields inherited from class de.enough.polish.ui.ContainerView |
allowCycling, allowsAutoTraversal, allowsDirectSelectionByPointerEvent, appearanceMode, columnsSetting, columnsWidths, EQUAL_WIDTH_COLUMNS, focusedIndex, focusedItem, focusFirstElement, isAlignHeights, isExpandItems, isHorizontal, isPointerPressedHandled, 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 |
availableHeight, availableWidth, contentHeight, contentWidth, isFocused, isLayoutCenter, isLayoutRight, layout, paddingHorizontal, paddingVertical, parentItem |
|
Constructor Summary |
VerticalFixedContainerView()
Creates a vertical container view with the focused item always centered
in the middle of the screen. |
|
Method Summary |
protected void |
initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
Initializes this container view. |
| Methods inherited from class de.enough.polish.ui.ContainerView |
addFullRepaintRegion, animate, destroy, focusItem, focusItem, focusItem, getItemRelativeY, getNextFocusableItem, getNextItem, getParentRelativeY, getScreen, getScrollTargetXOffset, getScrollXOffset, handleKeyPressed, handlePointerDragged, handlePointerPressed, handlePointerReleased, handlePointerTouchDown, handlePointerTouchUp, isInBottomRow, isLayoutExpand, isValid, isVirtualContainer, paintContent, paintContent, paintItem, releaseResources, scroll, setScrollXOffset, setScrollXOffset, setStyle, shiftFocus, showNotify, startScroll |
| Methods inherited from class de.enough.polish.ui.ItemView |
adjustToContentArea, animate, defocus, focus, handleKeyReleased, hideNotify, init, initContentByParent, notifyItemPressedEnd, notifyItemPressedEnd, notifyItemPressedStart, notifyItemPressedStart, paintBackground, paintBorder, paintContentByParent, removeItemBackground, removeItemBorder, removeParentBackground, removeParentBorder, removeViewFromParent, requestInit, setStyle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VerticalFixedContainerView
public VerticalFixedContainerView()
- Creates a vertical container view with the focused item always centered
in the middle of the screen.
initContent
protected void initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
- Description copied from class:
ContainerView
- Initializes this container view.
The implementation needs to calculate and set the contentWidth and
contentHeight fields.
The style of the focused item has already been set.
When the contentWidth will be larger than the specified availWidth, the container view allows to scroll horizontally automatically using pointer events.
- Overrides:
initContent in class ContainerView
- Parameters:
parentContainerItem - 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 view- See Also:
ItemView.contentWidth,
ItemView.contentHeight