|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.lwuit.Component
com.sun.dtv.ui.MatteEnabledComponent
com.sun.dtv.ui.ViewOnlyComponent
This class represents any type of non-interactive component in the system and provides them with a pluggable look and feel.
MatteEnabled
Fields inherited from class com.sun.lwuit.Component |
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Fields inherited from interface com.sun.dtv.ui.Animated |
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
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 |
isOpaque()
Obtain information whether the whole area of the component is fully opaque, i.e. all pixels are painted in an opaque color. |
void |
paint(Graphics g)
Method to paint the component. |
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. |
protected 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 class com.sun.dtv.ui.MatteEnabledComponent |
getMatte, isDoubleBuffered, processEvent, setMatte |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int HORIZONTAL_ALIGN_LEFT
setHorizontalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be left aligned.
public static final int HORIZONTAL_ALIGN_CENTER
setHorizontalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be centered horizontally.
public static final int HORIZONTAL_ALIGN_RIGHT
setHorizontalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be right aligned.
public static final int HORIZONTAL_ALIGN_JUSTIFIED
setHorizontalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be justified horizontally.
public static final int VERTICAL_ALIGN_TOP
setVerticalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be top aligned.
public static final int VERTICAL_ALIGN_CENTER
setVerticalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be centered vertically.
public static final int VERTICAL_ALIGN_BOTTOM
setVerticalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be bottom aligned.
public static final int VERTICAL_ALIGN_JUSTIFIED
setVerticalAlignment
method of ViewOnlyComponent
.
It indicates that all content will be justified vertically.
public static final int SCALE_NO
setScalingMode
method of
ViewOnlyComponent
. It indicates that nothing of the
content will be scaled to fit the component.
public 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.
public 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.
Constructor Detail |
public ViewOnlyComponent()
Method Detail |
public void paint(Graphics g)
paint
in interface Animated
paint
in class Component
g
- the graphics context to use for painting.public 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.
IllegalArgumentException
- if the state parameter does not
represent a stategetTextContent(int)
public 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.
IllegalArgumentException
- if the state parameter does not
represent a stategetGraphicContent(int)
public 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.
IllegalArgumentException
- if the state parameter does not
represent a stategetAnimateContent(int)
public String getTextContent(int state) throws IllegalArgumentException
state
- The state for which content is to be retrieved.
IllegalArgumentException
- if the state parameter does not
represent a statesetTextContent(java.lang.String, int)
public Image getGraphicContent(int state) throws IllegalArgumentException
state
- The state for which content is to be retrieved.
IllegalArgumentException
- if the state parameter does not
represent a statesetGraphicContent(com.sun.lwuit.Image, int)
public Image[] getAnimateContent(int state) throws IllegalArgumentException
state
- The state for which content is to be retrieved.
IllegalArgumentException
- if the state parameter does not
represent a statesetAnimateContent(com.sun.lwuit.Image[], int)
protected void setInteractionState(int state) throws IllegalArgumentException
state
- the interaction state for this component.
IllegalArgumentException
- if the state parameter does not
represent a stategetInteractionState()
public int getInteractionState()
setInteractionState(int)
public void setTextLayoutManager(TextLayoutManager manager)
manager
- the TextLayoutManager
getTextLayoutManager()
public TextLayoutManager getTextLayoutManager()
TextLayoutManager
setTextLayoutManager(com.sun.dtv.ui.TextLayoutManager)
public boolean isOpaque()
isOpaque
in class MatteEnabledComponent
public 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()
public 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()
public int getHorizontalAlignment()
HORIZONTAL_ALIGN_LEFT
,
HORIZONTAL_ALIGN_CENTER
,
HORIZONTAL_ALIGN_RIGHT
or
HORIZONTAL_ALIGN_JUSTIFIED
.setHorizontalAlignment(int)
public int getVerticalAlignment()
VERTICAL_ALIGN_TOP
,
VERTICAL_ALIGN_CENTER
,
VERTICAL_ALIGN_BOTTOM
or
VERTICAL_ALIGN_JUSTIFIED
.setVerticalAlignment(int)
public void setScalingMode(int scaling)
scaling
- the scaling mode, one of
SCALE_NO
,
SCALE_NO_ASPECT_PROOF
or
SCALE_ASPECT_PROOF
.getScalingMode()
public int getScalingMode()
SCALE_NO
,
SCALE_NO_ASPECT_PROOF
or
SCALE_ASPECT_PROOF
.setScalingMode(int)
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |