Methods Summary |
---|
public void | addCommand(Command cmd)Spacers are restricted from having
Commands , so this method will always
throw IllegalStateException whenever it is called.
throw new IllegalStateException();
|
int | callMinimumHeight()Get the minimum height of this Item
return height;
|
int | callMinimumWidth()Get the minimum width of this Item
return width;
|
void | callPaint(Graphics g, int w, int h)Paint the content of this Item
/*
* There's no reason to erase anything because Form will erase
* any dirty region for us
*
g.setColor(Display.ERASE_COLOR);
g.fillRect(g.getClipX(), g.getClipY(),
g.getClipWidth(), g.getClipHeight());
g.setColor(Display.FG_COLOR);
*/
|
int | callPreferredHeight(int w)Get the preferred height of this Item
return height;
|
int | callPreferredWidth(int h)Get the preferred width of this Item
return width;
|
public void | setDefaultCommand(Command cmd)Spacers are restricted from having Commands ,
so this method will always
throw IllegalStateException whenever it is called.
throw new IllegalStateException();
|
public void | setLabel(java.lang.String label)Spacers are restricted to having
null labels, so this method will
always throw
IllegalStateException whenever it is called.
throw new IllegalStateException();
|
public void | setMinimumSize(int minWidth, int minHeight)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.
updateSizes(minWidth, minHeight);
|
boolean | shouldSkipTraverse()Determine if this Item should not be traversed to
return true;
|
private void | updateSizes(int minW, int minH)Update the width and height values of this spacer, guaranteeing
the new values are positive. This method will also invalidate the
containing Form.
if (minW < 0 || minH < 0) {
throw new IllegalArgumentException();
}
synchronized (Display.LCDUILock) {
width = minW;
height = minH;
invalidate();
}
|