de.enough.polish.ui
Class TableItem

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.TableItem

public class TableItem
extends FakeContainerCustomItem

Allows to manage items in a dynamic tabular layout

Copyright Enough Software 2008

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
protected  int[] columnWidths
           
protected  int completeWidth
           
protected  javax.microedition.lcdui.Font font
           
protected  int fontColor
           
static int LINE_STYLE_DOTTED
          dotted style for lines between cells
static int LINE_STYLE_INVISIBLE
          no lines between cells
static int LINE_STYLE_SOLID
          default style for lines between cells
protected  int lineColor
           
protected  int lineStroke
           
protected  int[] rowHeights
           
protected  Background selectedBackground
           
protected  Background selectedColumnBackground
           
protected  Background selectedRowBackground
           
static int SELECTION_MODE_CELL
          Selection mode for a table in which any cell can be selected, even empty ones.
static int SELECTION_MODE_COLUMN
          Selection mode for a table in which columns can be selected.
static int SELECTION_MODE_INTERACTIVE
          Selection mode for a table in which cells/columns/rows with interactive items (like TextField) can be selected.
static int SELECTION_MODE_NONE
          Selection mode for a table in which no cells can be selected.
static int SELECTION_MODE_NONEMPTY
          Selection mode for a table in which cells/colummns/rows with content can be selected.
static int SELECTION_MODE_ROW
          Selection mode for a table in which rows can be selected.
protected  int selectionMode
           
protected  TableData tableData
           
protected  int targetXOffset
           
protected  int xOffset
           
 
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
TableItem()
          Creates a new TableItem with an empty table data.
TableItem(int columns, int rows)
          Creates a new TableItem with the specified dimensions
TableItem(int columns, int rows, Style style)
          Creates a new TableItem with the specified dimensions
TableItem(Style style)
          Creates a new TableItem with an empty table data.
TableItem(TableData tableData)
          Creates a new TableItem with an empty table data.
TableItem(TableData tableData, Style style)
          Creates a new TableItem with an empty table data.
 
Method Summary
 void add(int col, int row, Item item)
          Adds the given item to the specified table element.
 void add(Item item)
          Container methods
 int addColumn()
          Adds a new column to this table.
 int addRow()
          Adds a new row to this table.
 void animate(long currentTime, ClippingRegion repaintRegion)
          Animates this item.
protected  java.lang.String createCssSelector()
          Retrieves the CSS selector for this item.
 void defocus(Style originalStyle)
          Removes the focus from this item.
protected  Style focus(Style newStyle, int direction)
          Focuses this item.
 Item get(int index)
          Returns the item at the specified position of this container.
 java.lang.Object get(int column, int row)
          Sets the value of the given table position.
 int getNumberOfColumns()
          Retrieves the number of columns
 int getNumberOfRows()
          Retrieves the number of rows
 Background getSelectedBackground()
           
 java.lang.Object getSelectedCell()
          Retrieves the data within the currently selected cell.
 int getSelectedColumn()
          Retrieves the index of the currently selected column
 Background getSelectedColumnBackground()
           
 int getSelectedRow()
          Retrieves the index of the currently selected row
 Background getSelectedRowBackground()
           
 int getSelectionMode()
          Retrieves the selection mode
protected  boolean handleKeyPressed(int keyCode, int gameAction)
          Handles the key-pressed event.
 int indexOf(Item item)
          Retrieves the index of the specified item.
protected  void initContent(int firstLineWidth, int lineWidth)
          Initialises this item.
 void insertColumn(int index)
          Inserts a column before the specified index.
 void insertRow(int index)
          Inserts a row before the specified index.
 void moveToNextColumn()
          Moves the internal column index to the next column.
 void moveToNextRow()
          Moves the internal row index to the next row.
protected  void paintBackground(int x, int y, int width, int height, javax.microedition.lcdui.Graphics g)
          Paints the background of this item.
protected  void paintContent(int x, int y, int leftBorder, int rightBorder, javax.microedition.lcdui.Graphics g)
          Paints the content of this item.
 Item remove(int index)
          Removes the item at the specified position of this container.
 void removeColumn(int index)
          Removes the specified column
 void removeRow(int index)
          Removes the specified row
 void set(int column, int row, java.lang.Object value)
          Sets the value of the given table position.
 void set(int column, int row, java.lang.Object value, Style itemStyle)
          Sets the value of the given table position.
 Item set(int index, Item item, Style itemStyle)
          Replaces the item at the specified position in this list with the given item.
 void setCellContainerStyle(Style containerStyle)
          Sets the style for cases when several items are added to a cell.
 void setDimension(int columns, int rows)
          Specifies a new dimension for this table
 void setLineStyle(int lineStroke, int lineColor)
          Sets the stroke style and color of the lines between cells.
 void setSelectedBackground(Background selectedBackground)
           
 void setSelectedCell(int col, int row)
           
 void setSelectedCell(int col, int row, int direction)
           
 void setSelectedColumnBackground(Background selectedBackgroundVertical)
           
 void setSelectedRowBackground(Background selectedBackgroundHorizontal)
           
 void setSelectionMode(int selectionMode)
          Sets the selection mode.
 void setStyle(Style style)
          Sets the style of this item.
 void setTableData(TableData tableData)
          Sets the table data for this item
 int size()
          Retrieves the number of items stored in this container.
 
Methods inherited from class de.enough.polish.ui.FakeContainerCustomItem
add, add, add, add, add, add, changeChildStyles, changeChildStyles, clear, focus, focus, focusClosestItem, focusClosestItem, focusClosestItemAbove, getFocusedIndex, getFocusedItem, getFocusedStyle, getItemAt, getItems, getNumberOfInteractiveItems, getPosition, getRelativeScrollHeight, getRelativeScrollYOffset, getScrollHeight, getScrollYOffset, handleCommand, handleKeyReleased, handleKeyRepeated, handleNavigate, handlePointerPressed, handlePointerReleased, handlePointerScrollReleased, hideNotify, paintBackgroundAndBorder, parseIndexUrl, releaseResources, remove, requestDefocus, requestFullInit, scroll, scroll, set, setItemsList, setScrollHeight, setScrollYOffset, setScrollYOffset, setStyle, showCommands, showNotify, 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, 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
 

Field Detail

SELECTION_MODE_NONE

public static final int SELECTION_MODE_NONE
Selection mode for a table in which no cells can be selected.

See Also:
Constant Field Values

SELECTION_MODE_CELL

public static final int SELECTION_MODE_CELL
Selection mode for a table in which any cell can be selected, even empty ones.

See Also:
Constant Field Values

SELECTION_MODE_NONEMPTY

public static final int SELECTION_MODE_NONEMPTY
Selection mode for a table in which cells/colummns/rows with content can be selected.

See Also:
Constant Field Values

SELECTION_MODE_INTERACTIVE

public static final int SELECTION_MODE_INTERACTIVE
Selection mode for a table in which cells/columns/rows with interactive items (like TextField) can be selected.

See Also:
Constant Field Values

SELECTION_MODE_ROW

public static final int SELECTION_MODE_ROW
Selection mode for a table in which rows can be selected.

See Also:
Constant Field Values

SELECTION_MODE_COLUMN

public static final int SELECTION_MODE_COLUMN
Selection mode for a table in which columns can be selected.

See Also:
Constant Field Values

LINE_STYLE_SOLID

public static int LINE_STYLE_SOLID
default style for lines between cells


LINE_STYLE_DOTTED

public static int LINE_STYLE_DOTTED
dotted style for lines between cells


LINE_STYLE_INVISIBLE

public static int LINE_STYLE_INVISIBLE
no lines between cells


tableData

protected TableData tableData

font

protected javax.microedition.lcdui.Font font

fontColor

protected int fontColor

rowHeights

protected int[] rowHeights

columnWidths

protected int[] columnWidths

lineStroke

protected int lineStroke

lineColor

protected int lineColor

completeWidth

protected int completeWidth

xOffset

protected int xOffset

targetXOffset

protected int targetXOffset

selectionMode

protected int selectionMode

selectedBackground

protected Background selectedBackground

selectedRowBackground

protected Background selectedRowBackground

selectedColumnBackground

protected Background selectedColumnBackground
Constructor Detail

TableItem

public TableItem()
Creates a new TableItem with an empty table data.


TableItem

public TableItem(Style style)
Creates a new TableItem with an empty table data.

Parameters:
style - style of this item

TableItem

public TableItem(int columns,
                 int rows)
Creates a new TableItem with the specified dimensions

Parameters:
columns - the number of columns
rows - the number of rows

TableItem

public TableItem(int columns,
                 int rows,
                 Style style)
Creates a new TableItem with the specified dimensions

Parameters:
columns - the number of columns
rows - the number of rows
style - the style of this item

TableItem

public TableItem(TableData tableData)
Creates a new TableItem with an empty table data.

Parameters:
tableData - the data to be displayed in this table

TableItem

public TableItem(TableData tableData,
                 Style style)
Creates a new TableItem with an empty table data.

Parameters:
tableData - the data to be displayed in this table
style - style of this item
Method Detail

setTableData

public void setTableData(TableData tableData)
Sets the table data for this item

Parameters:
tableData - the new table data

setStyle

public void setStyle(Style style)
Description copied from class: FakeCustomItem
Sets the style of this item.

Overrides:
setStyle in class FakeContainerCustomItem
Parameters:
style - the new style for this item.

setLineStyle

public void setLineStyle(int lineStroke,
                         int lineColor)
Sets the stroke style and color of the lines between cells.

Parameters:
lineStroke - the line stroke style
lineColor - the color for lines
See Also:
LINE_STYLE_SOLID, LINE_STYLE_DOTTED, LINE_STYLE_INVISIBLE

initContent

protected void initContent(int firstLineWidth,
                           int lineWidth)
Description copied from class: FakeCustomItem
Initialises this item. The implementation needs to calculate and set the contentWidth and contentHeight fields. The implementation should take the fields preferredWidth and preferredHeight into account.

Overrides:
initContent in class FakeContainerCustomItem
Parameters:
firstLineWidth - the maximum width of the first line
lineWidth - the maximum width of any following lines
See Also:
FakeCustomItem.contentWidth, FakeCustomItem.contentHeight, FakeCustomItem.preferredWidth, FakeCustomItem.preferredHeight

paintContent

protected void paintContent(int x,
                            int y,
                            int leftBorder,
                            int rightBorder,
                            javax.microedition.lcdui.Graphics g)
Description copied from class: FakeCustomItem
Paints the content of this item. The background has already been painted and the border will be added after this method returns.

Overrides:
paintContent in class FakeContainerCustomItem
Parameters:
x - the left start position
y - the upper start position
leftBorder - the left border, nothing must be painted left of this position
rightBorder - the right border, nothing must be painted right of this position
g - the Graphics on which this item should be painted.

paintBackground

protected void paintBackground(int x,
                               int y,
                               int width,
                               int height,
                               javax.microedition.lcdui.Graphics g)
Description copied from class: FakeCustomItem
Paints the background of this item.

Overrides:
paintBackground in class FakeCustomItem
Parameters:
x - the horizontal start position
y - the vertical start position
width - the width
height - the height
g - graphics context

animate

public void animate(long currentTime,
                    ClippingRegion repaintRegion)
Description copied from class: FakeCustomItem
Animates this item. Subclasses can override this method to create animations. The default implementation animates the background and the item view if present.

Overrides:
animate in class FakeContainerCustomItem
Parameters:
currentTime - the current time in milliseconds
repaintRegion - the repaint area that needs to be updated when this item is animated
See Also:
#addRelativeRegion(ClippingRegion, int, int, int, int)

handleKeyPressed

protected boolean handleKeyPressed(int keyCode,
                                   int gameAction)
Description copied from class: FakeCustomItem
Handles the key-pressed event. Please note, that implementation should first try to handle the given key-code, before the game-action is processed. The default implementation just handles the FIRE game-action when a default-command and an item-command-listener have been registered.

Overrides:
handleKeyPressed in class FakeContainerCustomItem
Parameters:
keyCode - the code of the pressed key, e.g. Canvas.KEY_NUM2
gameAction - the corresponding game-action, e.g. Canvas.UP
Returns:
true when the key has been handled / recognized

setSelectedCell

public void setSelectedCell(int col,
                            int row)
Parameters:
col - the column
row - the row

setSelectedCell

public void setSelectedCell(int col,
                            int row,
                            int direction)
Parameters:
col - the column
row - the row
direction - the direction

setDimension

public void setDimension(int columns,
                         int rows)
Specifies a new dimension for this table

Parameters:
columns - the number of columns
rows - the number of rows

getNumberOfColumns

public int getNumberOfColumns()
Retrieves the number of columns

Returns:
the number of columns, -1 when no table data is used

getNumberOfRows

public int getNumberOfRows()
Retrieves the number of rows

Returns:
the number of rows, -1 when no table data is used

addColumn

public int addColumn()
Adds a new column to this table.

Returns:
the index of the created column, the first/most left one has the index 0.

moveToNextColumn

public void moveToNextColumn()
Moves the internal column index to the next column. If necessary a new column will be created. The internal column index is used for add()

See Also:
add(Item)

moveToNextRow

public void moveToNextRow()
Moves the internal row index to the next row. If necessary a new row will be created. The internal row index is used for add()

See Also:
add(Item)

insertColumn

public void insertColumn(int index)
Inserts a column before the specified index.

Parameters:
index - the index, use 0 for adding a column in the front, use getNumberOfColumns() for appending the column at the end
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid

removeColumn

public void removeColumn(int index)
Removes the specified column

Parameters:
index - the index. 0 is the first column
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid

addRow

public int addRow()
Adds a new row to this table.

Returns:
the index of the created row, the first/top one has the index 0.

insertRow

public void insertRow(int index)
Inserts a row before the specified index.

Parameters:
index - the index, use 0 for adding a row in the top, use getNumberOfRows() for appending the column at the bottom
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid

removeRow

public void removeRow(int index)
Removes the specified row

Parameters:
index - the index. 0 is the first row
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid

set

public void set(int column,
                int row,
                java.lang.Object value)
Sets the value of the given table position.

Parameters:
column - the horizontal position
row - the vertical position
value - the value, use null to delete a previous set value
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the column or row is invalid
See Also:
get(int, int)

set

public void set(int column,
                int row,
                java.lang.Object value,
                Style itemStyle)
Sets the value of the given table position.

Parameters:
column - the horizontal position
row - the vertical position
value - the value, use null to delete a previous set value
itemStyle - the style of the added value item, if the value is not an Item it will be converted to a StringItem
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the column or row is invalid
See Also:
get(int, int)

get

public java.lang.Object get(int column,
                            int row)
Sets the value of the given table position.

Parameters:
column - the horizontal position
row - the vertical position
Returns:
the value previously stored at the given position
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the column or row is invalid
See Also:
set(int, int, Object)

getSelectedCell

public java.lang.Object getSelectedCell()
Retrieves the data within the currently selected cell.

Returns:
the data of the selected cell, null if none is selected or this table has not a cell or column_and_row selection mode
See Also:
setSelectionMode(int)

getSelectedRow

public int getSelectedRow()
Retrieves the index of the currently selected row

Returns:
the index of the currently selected row, 0 is the first row

getSelectedColumn

public int getSelectedColumn()
Retrieves the index of the currently selected column

Returns:
the index of the currently selected column, 0 is the first column

createCssSelector

protected java.lang.String createCssSelector()
Description copied from class: FakeCustomItem
Retrieves the CSS selector for this item. The CSS selector is used for the dynamic assignment of styles - that is the styles are assigned by the usage of the item and not by a predefined style-name. With the #style preprocessing command styles are set fix, this method yields in a faster GUI and is recommended. When in a style-sheet dynamic styles are used, e.g. "Form>p", than the selector of the item is needed.
This abstract method needs only be implemented, when dynamic styles are used: #ifdef polish.useDynamicStyles
The returned selector needs to be in lower case.

Overrides:
createCssSelector in class FakeContainerCustomItem
Returns:
the appropriate CSS selector for this item. The selector needs to be in lower case.

getSelectionMode

public int getSelectionMode()
Retrieves the selection mode

Returns:
the current selection mode
See Also:
SELECTION_MODE_NONE, SELECTION_MODE_CELL, SELECTION_MODE_NONEMPTY, SELECTION_MODE_INTERACTIVE, SELECTION_MODE_ROW, SELECTION_MODE_COLUMN

setSelectionMode

public void setSelectionMode(int selectionMode)
Sets the selection mode. You can combine several settings with the OR operator. If you want to select a column and a row at the same time but only want the user to select interactive cells (cells that have interactive items) call setSelectionMode( TableItem.SELECTION_MODE_ROW | TableItem.SELECTION_MODE_COLUMN | TableItem.SELECTION_MODE_INTERACTIVE ). If you want that individual cells are focused using either the 'focused-style' or the 'stylename:hover' CSS styles, you need to use the SELECTION_MODE_CELL as well: setSelectionMode( Table.SELECTION_MODE_CELL | TableItem.SELECTION_MODE_ROW | TableItem.SELECTION_MODE_COLUMN | TableItem.SELECTION_MODE_INTERACTIVE ).

Parameters:
selectionMode - the desired selection mode
See Also:
SELECTION_MODE_NONE, SELECTION_MODE_CELL, SELECTION_MODE_NONEMPTY, SELECTION_MODE_INTERACTIVE, SELECTION_MODE_ROW, SELECTION_MODE_COLUMN

getSelectedBackground

public Background getSelectedBackground()
Returns:
the selectedBackground

setSelectedBackground

public void setSelectedBackground(Background selectedBackground)
Parameters:
selectedBackground - the selectedBackground to set

getSelectedRowBackground

public Background getSelectedRowBackground()
Returns:
the selectedBackgroundHorizontal

setSelectedRowBackground

public void setSelectedRowBackground(Background selectedBackgroundHorizontal)
Parameters:
selectedBackgroundHorizontal - the selectedBackgroundHorizontal to set

getSelectedColumnBackground

public Background getSelectedColumnBackground()
Returns:
the selectedBackgroundVertical

setSelectedColumnBackground

public void setSelectedColumnBackground(Background selectedBackgroundVertical)
Parameters:
selectedBackgroundVertical - the selectedBackgroundVertical to set

defocus

public void defocus(Style originalStyle)
Description copied from class: FakeCustomItem
Removes the focus from this item.

Overrides:
defocus in class FakeContainerCustomItem
Parameters:
originalStyle - the original style which will be restored.

focus

protected Style focus(Style newStyle,
                      int direction)
Description copied from class: FakeCustomItem
Focuses this item.

Overrides:
focus in class FakeContainerCustomItem
Parameters:
newStyle - the style which is used to indicate the focused state
direction - the direction from which this item is focused, either Canvas.UP, Canvas.DOWN, Canvas.LEFT, Canvas.RIGHT or 0. When 0 is given, the direction is unknown.
Returns:
the current style of this item

setCellContainerStyle

public void setCellContainerStyle(Style containerStyle)
Sets the style for cases when several items are added to a cell.

Parameters:
containerStyle - the style for containers that are automatically generated when several items are added into a cell

add

public void add(int col,
                int row,
                Item item)
Adds the given item to the specified table element. The table element itself will be changed into a container, if necessary

Parameters:
col - the column index
row - the row index
item - the item

add

public void add(Item item)
Container methods

Overrides:
add in class FakeContainerCustomItem
Parameters:
item - the item which should be added.

size

public int size()
Description copied from class: FakeContainerCustomItem
Retrieves the number of items stored in this container.

Overrides:
size in class FakeContainerCustomItem
Returns:
The number of items stored in this container.

get

public Item get(int index)
Description copied from class: FakeContainerCustomItem
Returns the item at the specified position of this container.

Overrides:
get in class FakeContainerCustomItem
Parameters:
index - the position of the desired item.
Returns:
the item stored at the given position

indexOf

public int indexOf(Item item)
Description copied from class: FakeContainerCustomItem
Retrieves the index of the specified item.

Overrides:
indexOf in class FakeContainerCustomItem
Parameters:
item - the item
Returns:
the index of the item; -1 when the item is not part of this container

remove

public Item remove(int index)
Description copied from class: FakeContainerCustomItem
Removes the item at the specified position of this container.

Overrides:
remove in class FakeContainerCustomItem
Parameters:
index - the position of the desired item.
Returns:
the item stored at the given position

set

public Item set(int index,
                Item item,
                Style itemStyle)
Description copied from class: FakeContainerCustomItem
Replaces the item at the specified position in this list with the given item.

Overrides:
set in class FakeContainerCustomItem
Parameters:
index - the position of the element, the first element has the index 0.
item - the item which should be set
itemStyle - the new style for the item
Returns:
the replaced item