| java.lang.Object javax.microedition.lcdui.Item javax.microedition.lcdui.Spacer
Spacer | public class Spacer extends Item (Code) | | 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. The application can set
the minimum width or height to any non-negative value. The implementation
may enforce implementation-defined maximum values for the minimum width and
height.
The unlocked preferred width of a Spacer is the same as its
current minimum width. Its unlocked preferred height is the same as its
current minimum height.
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.
|
Constructor Summary | |
public | Spacer(int minWidth, int minHeight) Creates a new Spacer with the given minimum
size. |
Method Summary | |
public void | addCommand(Command cmd) Spacers are restricted from having
Commands , so this method will always
throw IllegalStateException whenever it is called. | public void | setDefaultCommand(Command cmd) Spacers are restricted from having Commands ,
so this method will always
throw IllegalStateException whenever it is called. | public void | setLabel(String label) Spacers are restricted to having
null labels, so this method will
always throw
IllegalStateException whenever it is called. | public void | setMinimumSize(int minWidth, int minHeight) Sets the minimum size for this spacer. |
height | int height(Code) | | The preferred (and minimum) height of this Spacer
|
spacerLF | SpacerLF spacerLF(Code) | | Spacer Look & Feel associated with this Spacer
|
width | int width(Code) | | The preferred (and minimum) width of this Spacer
|
Spacer | public Spacer(int minWidth, int minHeight)(Code) | | Creates a new Spacer with the given minimum
size. The Spacer's label
is null .
The minimum size must be zero or greater.
If minWidth is greater than the
implementation-defined maximum width, the maximum
width will be used instead.
If minHeight is greater than the
implementation-defined maximum height, the maximum
height will be used instead.
Parameters: minWidth - the minimum width in pixels Parameters: minHeight - the minimum height in pixels throws: IllegalArgumentException - if either minWidth or minHeight is less than zero |
addCommand | public void addCommand(Command cmd)(Code) | | Spacers are restricted from having
Commands , so this method will always
throw IllegalStateException whenever it is called.
Parameters: cmd - the Command throws: IllegalStateException - always |
setDefaultCommand | public void setDefaultCommand(Command cmd)(Code) | | Spacers are restricted from having Commands ,
so this method will always
throw IllegalStateException whenever it is called.
Parameters: cmd - the Command throws: IllegalStateException - always |
setLabel | public void setLabel(String label)(Code) | | Spacers are restricted to having
null labels, so this method will
always throw
IllegalStateException whenever it is called.
Parameters: label - the label string throws: IllegalStateException - always |
setMinimumSize | public void setMinimumSize(int minWidth, int minHeight)(Code) | | Sets the minimum size for this spacer. The
Form will not
be allowed to make the item smaller than this size.
The minimum size must be zero or greater.
If minWidth is greater than the
implementation-defined maximum width, the maximum
width will be used instead.
If minHeight is greater than the
implementation-defined maximum height, the maximum
height will be used instead.
Parameters: minWidth - the minimum width in pixels Parameters: minHeight - the minimum height in pixels throws: IllegalArgumentException - if either minWidth or minHeight is less than zero |
|
|