|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Item
javax.microedition.lcdui.CustomItem
de.enough.polish.ui.FakeCustomItem
de.enough.polish.ui.PictureBrowserItem
public class PictureBrowserItem
The Picure Browser paints 5 in one row by scaling down the four outer ones and having a suitable large image in the middle.
| Field Summary |
|---|
| 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 | |
|---|---|
PictureBrowserItem(java.lang.String label,
javax.microedition.lcdui.Image[] thumbnails,
java.lang.String[] urls,
int scaleFactor)
Creates a new, PictureBrowserItem. |
|
PictureBrowserItem(java.lang.String label,
javax.microedition.lcdui.Image[] thumbnails,
java.lang.String[] urls,
int scaleFactor,
Style style)
Creates a new, PictureBrowserItem. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
createCssSelector()
Retrieves the CSS selector for this item. |
int |
getNumberOfThumbnails()
Retrieves the number of stored thumbnails |
int |
getSelectedThumbIndex()
Returns the Array Position of the Selected Thumb. |
java.lang.String |
getUrl(int index)
returns the url as an String. |
protected boolean |
handleKeyPressed(int keyCode,
int gameAction)
Changes the Selected Image if interaction: Canvas.RIGHT Canvas.LEFT. |
protected void |
initContent(int firstLineWidth,
int lineWidth)
Initialises this item. |
protected void |
paintContent(int x,
int y,
int leftBorder,
int rightBorder,
javax.microedition.lcdui.Graphics g)
Paints the content of this item. |
void |
setSelectedThumbIndex(int index)
Changes the Selected Thumb with the given int i, and scale the old Selected back to a normal Thumb. |
void |
setStyle(Style style)
Sets the Font. |
| 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 |
|---|
public PictureBrowserItem(java.lang.String label,
javax.microedition.lcdui.Image[] thumbnails,
java.lang.String[] urls,
int scaleFactor)
PictureBrowserItem.
label - the labelthumbnails - the images for the menuurls - the urls for the target imagescaleFactor - the skale factor for the thumbs that are displayed on the side of the item.
Note that the first given thumb is used for the calculation of the sizes for all images.
The complete width off the item are 4*firstimage.getWidth()*scaleFactor/100 + 2*padding-horizontal
public PictureBrowserItem(java.lang.String label,
javax.microedition.lcdui.Image[] thumbnails,
java.lang.String[] urls,
int scaleFactor,
Style style)
PictureBrowserItem.
label - the labelthumbnails - the images for the menuurls - the urls for the target imagescaleFactor - the skale factor for the thumbs that are displayed on the side of the item.
Note that the first given thumb is used for the calculation of the sizes for all images.
The complete width off the item are 4*firstimage.getWidth()*scaleFactor/100 + 2*padding-horizontalstyle - the design settings| Method Detail |
|---|
public int getNumberOfThumbnails()
public void setSelectedThumbIndex(int index)
index - next Selected Thumb
protected void paintContent(int x,
int y,
int leftBorder,
int rightBorder,
javax.microedition.lcdui.Graphics g)
FakeCustomItem
paintContent in class FakeCustomItemx - the left start positiony - the upper start positionleftBorder - the left border, nothing must be painted left of this positionrightBorder - the right border, nothing must be painted right of this positiong - the Graphics on which this item should be painted.public void setStyle(Style style)
setStyle in class FakeCustomItemstyle - - the Font to be painted
protected boolean handleKeyPressed(int keyCode,
int gameAction)
handleKeyPressed in class FakeCustomItemkeyCode - gameAction -
true if handled, false otherwisepublic int getSelectedThumbIndex()
public java.lang.String getUrl(int index)
index - - the index where the url is Placed in the String Array urls
protected java.lang.String createCssSelector()
FakeCustomItem
createCssSelector in class FakeCustomItem
protected void initContent(int firstLineWidth,
int lineWidth)
FakeCustomItem
initContent in class FakeCustomItemfirstLineWidth - the maximum width of the first linelineWidth - the maximum width of any following linesFakeCustomItem.contentWidth,
FakeCustomItem.contentHeight,
FakeCustomItem.preferredWidth,
FakeCustomItem.preferredHeight
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||