de.enough.polish.ui
Class IconCustomItem

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.FakeStringCustomItem
                  extended by de.enough.polish.ui.FakeIconCustomItem
                      extended by de.enough.polish.ui.IconCustomItem
All Implemented Interfaces:
ImageConsumer

public final class IconCustomItem
extends FakeIconCustomItem

Allows to use an image along with text within one icon.

Warning: the item will be transformed into a J2ME Polish internal item in the preprocessing phase. This does not limit any of the features, but the construct if (item instanceof CustomItem) will always return false if it is an IconCustomItem. Use if (item instanceof IconCustomItem) instead.
This is why this class is final, no subclassing is suported.

Author:
robertvirkus

Field Summary
 
Fields inherited from class de.enough.polish.ui.FakeIconCustomItem
isTextVisible
 
Fields inherited from class de.enough.polish.ui.FakeStringCustomItem
bitMapFont, bitMapFontViewer, clipText, font, text, textColor, textEffect, textHorizontalAdjustment, textLines, textVerticalAdjustment, useSingleLine, xOffset
 
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
IconCustomItem(java.lang.String text, javax.microedition.lcdui.Image image)
          Creates a new icon.
IconCustomItem(java.lang.String text, javax.microedition.lcdui.Image image, Style style)
          Creates a new icon.
IconCustomItem(java.lang.String label, java.lang.String text, javax.microedition.lcdui.Image image)
          Creates a new icon.
IconCustomItem(java.lang.String label, java.lang.String text, javax.microedition.lcdui.Image image, Style style)
          Creates a new icon.
 
Method Summary
 
Methods inherited from class de.enough.polish.ui.FakeIconCustomItem
animate, createCssSelector, defocus, getImage, initContent, isTextVisible, paintContent, releaseResources, setImage, setImage, setImage, setImage, setImageAlign, setStyle, setTextVisible, toString
 
Methods inherited from class de.enough.polish.ui.FakeStringCustomItem
animate, getFont, getText, hideNotify, setFont, setText, setText, showNotify
 
Methods inherited from class de.enough.polish.ui.FakeCustomItem
addCommand, addCommand, addCommands, addRelativeToBackgroundRegion, addRelativeToContentRegion, containsCommand, focus, getAbsoluteX, getAbsoluteY, getAppearanceMode, getAttribute, getAttributes, getBackgroundHeight, getBackgroundWidth, getBackgroundX, getBackgroundY, getContentHeight, getContentWidth, getContentX, getContentY, getDefaultCommand, getFocusedStyle, getItemAt, getItemCommandListener, getItemHeight, getItemStateListener, getItemWidth, getLabel, getLabelItem, getLayout, getMinContentHeight, getMinContentWidth, getMinimumHeight, getMinimumWidth, getParent, getPrefContentHeight, getPrefContentWidth, getPreferredHeight, getPreferredWidth, getScreen, getStyle, handleCommand, handleKeyPressed, handleKeyReleased, handleKeyRepeated, handlePointerPressed, handlePointerReleased, init, initStyle, isInContentArea, isInItemArea, isVisible, notifyItemPressedEnd, notifyItemPressedStart, notifyStateChanged, paint, paint, paintBackground, paintBackgroundAndBorder, paintBorder, removeCommand, repaintFully, requestInit, setAppearanceMode, setAttribute, setDefaultCommand, setItemCommandListener, setItemCommandListener, setItemStateListener, setLabel, setLayout, setPreferredSize, setVisible, show, showCommands
 
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

IconCustomItem

public IconCustomItem(java.lang.String text,
                      javax.microedition.lcdui.Image image)
Creates a new icon.

Parameters:
text - the text of this item
image - the image of this item, null when no image should be displayed

IconCustomItem

public IconCustomItem(java.lang.String text,
                      javax.microedition.lcdui.Image image,
                      Style style)
Creates a new icon.

Parameters:
text - the text of this item
image - the image of this item, null when no image should be displayed
style - the style of this item

IconCustomItem

public IconCustomItem(java.lang.String label,
                      java.lang.String text,
                      javax.microedition.lcdui.Image image)
Creates a new icon.

Parameters:
label - the label of this item
text - the text of this item
image - the image of this item, null when no image should be displayed

IconCustomItem

public IconCustomItem(java.lang.String label,
                      java.lang.String text,
                      javax.microedition.lcdui.Image image,
                      Style style)
Creates a new icon.

Parameters:
label - the label of this item
text - the text of this item
image - the image of this item, null when no image should be displayed
style - the style of this item