|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j4me.ui.components.Component
org.j4me.ui.components.HorizontalRule
public class HorizontalRule
A horizontal rule component. It is a line across the screen used to demarkate sections of a form.
Field Summary |
---|
Fields inherited from class org.j4me.ui.components.Component |
---|
container, HIGHLIGHTED_BORDER_WIDTH |
Constructor Summary | |
---|---|
HorizontalRule()
Constructs a horizontal rule component. |
Method Summary | |
---|---|
int |
getHeight()
Returns how many pixels high the horizontal rule is. |
protected int[] |
getPreferredComponentSize(Theme theme,
int viewportWidth,
int viewportHeight)
Returns the size of the horizontal rule. |
double |
getWidthOfScreen()
Gets how far across the screen the line extends. |
protected void |
paintComponent(javax.microedition.lcdui.Graphics g,
Theme theme,
int width,
int height,
boolean selected)
Paints the horizontal rule. |
void |
setHeight(int pixels)
Sets the height of the horizontal line rule in pixels. |
void |
setWidthOfScreen(double percentageOfScreen)
Sets how far across the screen the line extends. |
Methods inherited from class org.j4me.ui.components.Component |
---|
acceptsInput, getHorizontalAlignment, getPreferredSize, getScreen, getWidth, getX, getY, hideNotify, invalidate, isShown, keyPressed, keyReleased, keyRepeated, paint, paintRect, pointerDragged, pointerPressed, pointerReleased, repaint, setHorizontalAlignment, showNotify, visible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HorizontalRule()
Method Detail |
---|
public void setWidthOfScreen(double percentageOfScreen)
percentageOfScreen
- is the length of the line relative
to the width of the screen. It must be between 0.00 and 1.00.public double getWidthOfScreen()
public void setHeight(int pixels)
pixels
- is how many pixels high the horizontal line will be.
It must be at least 1.public int getHeight()
getHeight
in class Component
protected void paintComponent(javax.microedition.lcdui.Graphics g, Theme theme, int width, int height, boolean selected)
paintComponent
in class Component
g
- is the Graphics
object to be used for rendering the item.theme
- is the application's theme. Use it to get fonts and colors.width
- is the width, in pixels, to paint the component.height
- is the height, in pixels, to paint the component.selected
- is true
when this components is currently selected
and false
when it is not.Component.paintComponent(javax.microedition.lcdui.Graphics, org.j4me.ui.Theme, int, int, boolean)
protected int[] getPreferredComponentSize(Theme theme, int viewportWidth, int viewportHeight)
getPreferredComponentSize
in class Component
theme
- is the application's Theme
.viewportWidth
- is the width of the viewable area, in pixels,
the component can use.viewportHeight
- is the height of the viewable area, in pixels,
the component can use.
Component.getPreferredComponentSize(org.j4me.ui.Theme, int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |