|
BenQ Mobile |
|||||||||
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.Spacer
A blank, non-interactive item that has a settable minimum size. The minimum width is useful for allocating flexible amounts of space between Items within the same row of a Form. The minimum height is useful for enforcing a particular minimum height of a row.
Since a Spacer's primary purpose is to position other items, it is restricted to be non-interactive, and the application is not allowed to add Commands to a Spacer. Since the presence of a label on an Item may affect layout in device-specific ways, the label of a Spacer is restricted to always be null, and the application is not allowed to change it.
Field Summary |
Fields inherited from class javax.microedition.lcdui.Item |
BUTTON, HYPERLINK, 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, PLAIN |
Constructor Summary | |
Spacer(int minWidth,
int minHeight)
Creates a new Spacer with the given minimum size. |
Method Summary | |
void |
addCommand(Command cmd)
Spacers are restricted from having Commands, so this method will always throw IllegalStateException whenever it is called. |
void |
setDefaultCommand(Command cmd)
Spacers are restricted from having Commands, so this method will always throw IllegalStateException whenever it is called. |
void |
setLabel(java.lang.String label)
Spacers are restricted to having null labels, so this method will always throw IllegalStateException whenever it is called. |
void |
setMinimumSize(int width,
int height)
Sets the minimum size for this spacer. |
Methods inherited from class javax.microedition.lcdui.Item |
getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setItemCommandListener, setLayout, setPreferredSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Spacer(int minWidth, int minHeight)
minWidth
- the minimum width in pixelsminHeight
- the minimum height in pixelsMethod Detail |
public void setMinimumSize(int width, int height)
width
- The minimum widthheight
- The minimum heightpublic void addCommand(Command cmd)
IllegalStateException
whenever it is called.
addCommand
in class Item
cmd
- the Command
java.lang.IllegalStateException
- alwayspublic void setDefaultCommand(Command cmd)
IllegalStateException
whenever it is called.
setDefaultCommand
in class Item
cmd
- the Command
java.lang.IllegalStateException
- alwayspublic void setLabel(java.lang.String label)
IllegalStateException
whenever it is called.
setLabel
in class Item
label
- the label string
java.lang.IllegalStateException
- alwaysItem.getLabel()
|
BenQ Mobile |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner. All Rights Reserved. BenQ Corp. is a trademark licensee of Siemens AG. |
For further information about Mobility Toolkit (MTK) visit our Developer Portal. |