|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ViewOnlyComponent
This interface represents any type of non-interactive component in the system and provides them with a pluggable look and feel.
| Field Summary | |
|---|---|
static int |
HORIZONTAL_ALIGN_CENTER
Constant to be used with the setHorizontalAlignment method of ViewOnlyComponent. |
static int |
HORIZONTAL_ALIGN_JUSTIFIED
Constant to be used with the setHorizontalAlignment method of ViewOnlyComponent. |
static int |
HORIZONTAL_ALIGN_LEFT
Constant to be used with the setHorizontalAlignment method of ViewOnlyComponent. |
static int |
HORIZONTAL_ALIGN_RIGHT
Constant to be used with the setHorizontalAlignment method of ViewOnlyComponent. |
static int |
SCALE_ASPECT_PROOF
Constant to be used with the setScalingMode method of
ViewOnlyComponent. |
static int |
SCALE_NO
Constant to be used with the setScalingMode method of
ViewOnlyComponent. |
static int |
SCALE_NO_ASPECT_PROOF
Constant to be used with the setScalingMode method of
ViewOnlyComponent. |
static int |
STATE_DISABLED
Constant to be used with several methods of ViewOnlyComponent requiring a state parameter. |
static int |
STATE_ENABLED
Constant to be used with several methods of ViewOnlyComponent requiring a state parameter. |
static int |
VERTICAL_ALIGN_BOTTOM
Constant to be used with the setVerticalAlignment method of ViewOnlyComponent. |
static int |
VERTICAL_ALIGN_CENTER
Constant to be used with the setVerticalAlignment method of ViewOnlyComponent. |
static int |
VERTICAL_ALIGN_JUSTIFIED
Constant to be used with the setVerticalAlignment method of ViewOnlyComponent. |
static int |
VERTICAL_ALIGN_TOP
Constant to be used with the setVerticalAlignment method of ViewOnlyComponent. |
| Method Summary | |
|---|---|
Image[] |
getAnimateContent(int state)
Returns the animated content for this component, depending on the current state. |
Image |
getGraphicContent(int state)
Returns the graphical content for this component, depending on the current state. |
int |
getHorizontalAlignment()
Retrieve the horizontal alignment for any state-based content in this component. |
int |
getInteractionState()
Return the current interaction state of the component. |
int |
getScalingMode()
Retrieve the scaling mode for this component. |
String |
getTextContent(int state)
Returns the text content for this component, depending on the current state. |
TextLayoutManager |
getTextLayoutManager()
Gets the text layout manager that is currently in use for text layout in this component. |
int |
getVerticalAlignment()
Retrieve the vertical alignment for any state-based content in this component. |
boolean |
isDoubleBuffered()
Returns true if double buffering is available and activated. |
boolean |
isOpaque()
Returns true if the whole area of the Component (as returned by the com.sun.dtv.lwuit.Component#getBounds method, is opaque. |
void |
paint(Graphics g)
Method to paint the component. |
void |
processEvent(AWTEvent event)
Handle the specified AWTEvent. |
void |
setAnimateContent(Image[] images,
int state)
Assigns an array of graphical content to be used for animation to this component which is state-dependent. |
void |
setGraphicContent(Image image,
int state)
Assigns graphical content to this component which is state-dependent. |
void |
setHorizontalAlignment(int alignment)
Set the horizontal alignment for any state-based content in this component. |
void |
setInteractionState(int state)
Set the current state of the component with respect to interaction. |
void |
setScalingMode(int scaling)
Set the scaling mode for this component. |
void |
setTextContent(String text,
int state)
Assigns text content to this component which is state-dependent. |
void |
setTextLayoutManager(TextLayoutManager manager)
Sets the text layout manager that should be used for text layout in this component. |
void |
setVerticalAlignment(int alignment)
Set the vertical alignment for any state-based content in this component. |
| Methods inherited from interface com.sun.dtv.ui.MatteEnabled |
|---|
getMatte, setMatte |
| Field Detail |
|---|
static final int HORIZONTAL_ALIGN_LEFT
setHorizontalAlignment method of ViewOnlyComponent.
It indicates that all content will be left aligned.
static final int HORIZONTAL_ALIGN_CENTER
setHorizontalAlignment method of ViewOnlyComponent.
It indicates that all content will be centered horizontally.
static final int HORIZONTAL_ALIGN_RIGHT
setHorizontalAlignment method of ViewOnlyComponent.
It indicates that all content will be right aligned.
static final int HORIZONTAL_ALIGN_JUSTIFIED
setHorizontalAlignment method of ViewOnlyComponent.
It indicates that all content will be justified horizontally.
static final int VERTICAL_ALIGN_TOP
setVerticalAlignment method of ViewOnlyComponent.
It indicates that all content will be top aligned.
static final int VERTICAL_ALIGN_CENTER
setVerticalAlignment method of ViewOnlyComponent.
It indicates that all content will be centered vertically.
static final int VERTICAL_ALIGN_BOTTOM
setVerticalAlignment method of ViewOnlyComponent.
It indicates that all content will be bottom aligned.
static final int VERTICAL_ALIGN_JUSTIFIED
setVerticalAlignment method of ViewOnlyComponent.
It indicates that all content will be justified vertically.
static final int SCALE_NO
setScalingMode method of
ViewOnlyComponent. It indicates that nothing of the
content will be scaled to fit the component.
static final int SCALE_ASPECT_PROOF
setScalingMode method of
ViewOnlyComponent. It indicates that all content will
be scaled in a way preserving the aspect ratio.
static final int SCALE_NO_ASPECT_PROOF
setScalingMode method of
ViewOnlyComponent. It indicates that all content will
be scaled in a way not necessarily preserving the aspect ratio.
static final int STATE_ENABLED
ViewOnlyComponent requiring a state parameter.
It indicates that the operation performed in the related method
is done with respect to the enabled state of the component.
static final int STATE_DISABLED
ViewOnlyComponent requiring a state parameter.
It indicates that the operation performed in the related method
is done with respect to the disabled state of the component.
| Method Detail |
|---|
void paint(Graphics g)
g - the graphics context to use for painting.
void setTextContent(String text,
int state)
throws IllegalArgumentException
text - the text content, or null (removes text content which had
been assigned before)state - the state of the component for which this content should be
displayed, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a stategetTextContent(int)
void setGraphicContent(Image image,
int state)
throws IllegalArgumentException
image - the graphical content, or null (removes graphical content
which had been assigned before)state - the state of the component for which this content should be
displayed, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a stategetGraphicContent(int)
void setAnimateContent(Image[] images,
int state)
throws IllegalArgumentException
images - the graphical content array, or null (removes any graphical
content which had been assigned before)state - the state of the component for which this content should be
displayed, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a stategetAnimateContent(int)
String getTextContent(int state)
throws IllegalArgumentException
state - the state of the component for which this content is to
be retrieved, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a statesetTextContent(java.lang.String, int)
Image getGraphicContent(int state)
throws IllegalArgumentException
state - the state of the component for which this content is to
be retrieved, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a statesetGraphicContent(com.sun.dtv.lwuit.Image, int)
Image[] getAnimateContent(int state)
throws IllegalArgumentException
state - the state of the component for which this content is to
be retrieved, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a statesetAnimateContent(com.sun.dtv.lwuit.Image[], int)
void setInteractionState(int state)
throws IllegalArgumentException
state - the interaction state for this content, one of STATE_ENABLED or STATE_DISABLED
IllegalArgumentException - if the state parameter does not
represent a stategetInteractionState()int getInteractionState()
setInteractionState(int)void setTextLayoutManager(TextLayoutManager manager)
manager - the TextLayoutManagergetTextLayoutManager()TextLayoutManager getTextLayoutManager()
TextLayoutManagersetTextLayoutManager(com.sun.dtv.ui.TextLayoutManager)void setHorizontalAlignment(int alignment)
alignment - the horizontal alignment mode, one of
HORIZONTAL_ALIGN_LEFT,
HORIZONTAL_ALIGN_CENTER,
HORIZONTAL_ALIGN_RIGHT or
HORIZONTAL_ALIGN_JUSTIFIED.getHorizontalAlignment()void setVerticalAlignment(int alignment)
alignment - the vertical alignment mode, one of
VERTICAL_ALIGN_TOP,
VERTICAL_ALIGN_CENTER,
VERTICAL_ALIGN_BOTTOM or
VERTICAL_ALIGN_JUSTIFIED.getVerticalAlignment()int getHorizontalAlignment()
HORIZONTAL_ALIGN_LEFT,
HORIZONTAL_ALIGN_CENTER,
HORIZONTAL_ALIGN_RIGHT or
HORIZONTAL_ALIGN_JUSTIFIED.setHorizontalAlignment(int)int getVerticalAlignment()
VERTICAL_ALIGN_TOP,
VERTICAL_ALIGN_CENTER,
VERTICAL_ALIGN_BOTTOM or
VERTICAL_ALIGN_JUSTIFIED.setVerticalAlignment(int)void setScalingMode(int scaling)
scaling - the scaling mode, one of
SCALE_NO,
SCALE_NO_ASPECT_PROOF or
SCALE_ASPECT_PROOF.getScalingMode()int getScalingMode()
SCALE_NO,
SCALE_NO_ASPECT_PROOF or
SCALE_ASPECT_PROOF.setScalingMode(int)boolean isDoubleBuffered()
true if double buffering is available and activated,
and false otherwiseboolean isOpaque()
com.sun.dtv.lwuit.Component#getBounds method, is opaque.
true if all the pixels within the area
defined by the com.sun.dtv.lwuit.Component#getBounds method
are opaque, i.e. all pixels are painted in an opaque color,
false otherwise.void processEvent(AWTEvent event)
event - a java.awt.AWTEvent to handle.
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||