de.enough.polish.ui
Class ListItem

java.lang.Object
  extended by javax.microedition.lcdui.Item
      extended by javax.microedition.lcdui.CustomItem
          extended by de.enough.polish.ui.FakeCustomItem
              extended by de.enough.polish.ui.FakeContainerCustomItem
                  extended by de.enough.polish.ui.ListItem

public class ListItem
extends FakeContainerCustomItem

Provides a list of items that can be used within a Form.

The list item behaves like a normal J2ME Polish container, so you can specify view-types, columns, colspans, etc.

Copyright (c) Enough Software 2005 - 2008

 history
        16-Feb-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.FakeContainerCustomItem
allowCycling, autoFocusEnabled, autoFocusIndex, availableHeight, containerView, enableScrolling, focusedIndex, focusedItem, focusedStyleFirst, focusedStyleLast, isExpandItems, itemsList, itemStyle, lastPointerPressY, plainStyle, SCROLL_DEFAULT, SCROLL_SMOOTH, scrollSmooth, targetYOffset, yOffset
 
Fields inherited from class de.enough.polish.ui.FakeCustomItem
_bbField, _bbFieldAdded, appearanceMode, background, backgroundHeight, backgroundWidth, backgroundYOffset, border, borderWidth, BUTTON, colSpan, commands, contentHeight, contentWidth, contentX, contentY, cssSelector, defaultCommand, focusedStyle, HORIZONTAL, HYPERLINK, includeLabel, INTERACTIVE, internalHeight, internalWidth, internalX, internalY, isFocused, isInitialized, isInvisible, isLayoutCenter, isLayoutExpand, isLayoutRight, isPressed, isShown, isStyleInitialised, itemCommandListener, itemHeight, itemWidth, label, labelStyle, layout, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, marginBottom, marginLeft, marginRight, marginTop, maximumHeight, maximumWidth, minimumHeight, minimumWidth, NO_POSITION_SET, paddingBottom, paddingHorizontal, paddingLeft, paddingRight, paddingTop, paddingVertical, parent, PLAIN, preferredHeight, preferredWidth, preserveViewType, relativeX, relativeY, rowSpan, screen, style, TRANSPARENT, VERTICAL, view
 
Fields inherited from class javax.microedition.lcdui.CustomItem
KEY_PRESS, KEY_RELEASE, KEY_REPEAT, NONE, POINTER_DRAG, POINTER_PRESS, POINTER_RELEASE, TRAVERSE_HORIZONTAL, TRAVERSE_VERTICAL
 
Constructor Summary
ListItem(java.lang.String label)
          Creates a new list item.
ListItem(java.lang.String label, Style style)
          Creates a new list item.
 
Method Summary
 void append(javax.microedition.lcdui.Item item)
          Adds the specified item to this list.
 void append(Item item)
          Adds the specified item to this list.
 void insert(int position, javax.microedition.lcdui.Item item)
          Inserts the specified item into this list.
 void insert(int position, Item item)
          Inserts the specified item into this list.
 void insert(int position, Item item, Style itemStyle)
          Inserts the specified item into this list and provides it with a style.
 boolean remove(javax.microedition.lcdui.Item item)
          Removes the specified item from this list.
 void removeAll()
          Clears this list.
 javax.microedition.lcdui.Item removeItem(int index)
          Removes the specified item from this list.
 
Methods inherited from class de.enough.polish.ui.FakeContainerCustomItem
add, add, add, add, add, add, add, animate, changeChildStyles, changeChildStyles, clear, createCssSelector, defocus, focus, focus, focus, focusClosestItem, focusClosestItem, focusClosestItemAbove, get, getFocusedIndex, getFocusedItem, getFocusedStyle, getItemAt, getItems, getNumberOfInteractiveItems, getPosition, getRelativeScrollHeight, getRelativeScrollYOffset, getScrollHeight, getScrollYOffset, handleCommand, handleKeyPressed, handleKeyReleased, handleKeyRepeated, handleNavigate, handlePointerPressed, handlePointerReleased, handlePointerScrollReleased, hideNotify, indexOf, initContent, paintBackgroundAndBorder, paintContent, parseIndexUrl, releaseResources, remove, remove, requestDefocus, requestFullInit, scroll, scroll, set, set, setItemsList, setScrollHeight, setScrollYOffset, setScrollYOffset, setStyle, setStyle, showCommands, showNotify, size, toString
 
Methods inherited from class de.enough.polish.ui.FakeCustomItem
addCommand, addCommand, addCommands, addRelativeToBackgroundRegion, addRelativeToContentRegion, animate, containsCommand, getAbsoluteX, getAbsoluteY, getAppearanceMode, getAttribute, getAttributes, getBackgroundHeight, getBackgroundWidth, getBackgroundX, getBackgroundY, getContentHeight, getContentWidth, getContentX, getContentY, getDefaultCommand, getFocusedStyle, getItemCommandListener, getItemHeight, getItemStateListener, getItemWidth, getLabel, getLabelItem, getLayout, getMinContentHeight, getMinContentWidth, getMinimumHeight, getMinimumWidth, getParent, getPrefContentHeight, getPrefContentWidth, getPreferredHeight, getPreferredWidth, getScreen, getStyle, init, initStyle, isInContentArea, isInItemArea, isVisible, notifyItemPressedEnd, notifyItemPressedStart, notifyStateChanged, paint, paint, paintBackground, paintBorder, removeCommand, repaintFully, requestInit, setAppearanceMode, setAttribute, setDefaultCommand, setItemCommandListener, setItemCommandListener, setItemStateListener, setLabel, setLayout, setPreferredSize, setVisible, show
 
Methods inherited from class javax.microedition.lcdui.CustomItem
getGameAction, getInteractionModes, invalidate, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, sizeChanged, traverse, traverseOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListItem

public ListItem(java.lang.String label)
Creates a new list item.

Parameters:
label - the label of this item

ListItem

public ListItem(java.lang.String label,
                Style style)
Creates a new list item.

Parameters:
label - the label of this item
style - the style
Method Detail

append

public void append(javax.microedition.lcdui.Item item)
Adds the specified item to this list.

Parameters:
item - the item that should be added

insert

public void insert(int position,
                   javax.microedition.lcdui.Item item)
Inserts the specified item into this list.

Parameters:
position - the position into which the item should be inserted
item - the item that should be added

remove

public boolean remove(javax.microedition.lcdui.Item item)
Removes the specified item from this list.

Parameters:
item - the item that should be removed
Returns:
true when the item was contained in this list.

removeItem

public javax.microedition.lcdui.Item removeItem(int index)
Removes the specified item from this list.

Parameters:
index - the index of the item that should be removed
Returns:
the item that has been at the specified index

append

public void append(Item item)
Adds the specified item to this list.

Parameters:
item - the item that should be added

insert

public void insert(int position,
                   Item item)
Inserts the specified item into this list.

Parameters:
position - the position into which the item should be inserted
item - the item that should be added

insert

public void insert(int position,
                   Item item,
                   Style itemStyle)
Inserts the specified item into this list and provides it with a style.

Parameters:
position - the position into which the item should be inserted
item - the item that should be added
itemStyle - the style

removeAll

public void removeAll()
Clears this list.