|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kalmeo.kuix.widget.Widget
org.kalmeo.kuix.widget.Picture
public class Picture
This class represents a picture.
For further informations, visit the Kuix widgets reference page.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget |
|---|
Widget.BindInstruction |
| Field Summary |
|---|
| Fields inherited from class org.kalmeo.kuix.widget.Widget |
|---|
bindInstructions, DEFAULT_ALIGN, DEFAULT_BACKGROUND_ALIGN, DEFAULT_BACKGROUND_REPEAT, DEFAULT_BORDER, DEFAULT_GAP, DEFAULT_MARGIN, DEFAULT_MIN_SIZE, DEFAULT_PADDING, DEFAULT_SPAN, DEFAULT_WEIGHT, next, parent, previous |
| Constructor Summary | |
|---|---|
Picture()
Construct a Picture |
|
| Method Summary | |
|---|---|
Widget |
add(Widget widget)
Add a Widget to this as child |
protected void |
doLayout()
Layout the widget if its layout is defined. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the specified attribute |
protected java.lang.Object |
getDefaultStylePropertyValue(java.lang.String name)
Returns the de default style property value for name
property, or null. |
Image |
getImage()
|
Layout |
getLayout()
|
Metrics |
getPreferredSize(int preferredWidth)
Returns the prefered size of this Widget |
boolean |
isObjectAttribute(java.lang.String name)
Check if the given attribute require an Object value. |
protected void |
paintChildrenImpl(Graphics g)
Invoke the paintImpl method on widget's children. |
boolean |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value to the specified attribute representing by
the name |
void |
setFrameDuration(int frameDuration)
Set the duration of a frame for animation. |
void |
setFrameHeight(int frameHeight)
Set the height of a slice in source image for animation. |
void |
setFrameSequence(int[] frameSequence)
Set the sequence of a frame index for animation. |
void |
setFrameWidth(int frameWidth)
Set the width of a slice in source image for animation. |
Picture |
setImage(Image image)
Define the image data. |
boolean |
setObjectAttribute(java.lang.String name,
java.lang.Object value)
Set the Object value to the specified attribute
representing by the name. |
Picture |
setSource(java.lang.String source)
Define the image source. |
void |
setTransform(int transform)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Picture()
Picture
| Method Detail |
|---|
public Layout getLayout()
getLayout in class Widget
public boolean setAttribute(java.lang.String name,
java.lang.String value)
Widgetvalue to the specified attribute representing by
the name
setAttribute in class Widgettrue if the attribute exists
public boolean setObjectAttribute(java.lang.String name,
java.lang.Object value)
Widgetvalue to the specified attribute
representing by the name.
setObjectAttribute in class Widgetpublic boolean isObjectAttribute(java.lang.String name)
Widget
isObjectAttribute in class Widgettrue if the given attribute require an Object
valuepublic java.lang.Object getAttribute(java.lang.String name)
Widget
getAttribute in class Widgetpublic Picture setSource(java.lang.String source)
Picture Useful in this case :
Picture picture = new Picture().setSource("img.png");
source - the name of the resource containing the image data in one
of the supported image formats
Picturepublic Image getImage()
Image instance.public Picture setImage(Image image)
Image object instance.
image - the Image instance to use in this Picture.
Picturepublic void setTransform(int transform)
transform - public void setFrameWidth(int frameWidth)
frameWidth - public void setFrameHeight(int frameHeight)
frameHeight - public void setFrameSequence(int[] frameSequence)
frameSequence - public void setFrameDuration(int frameDuration)
frameDuration - public Metrics getPreferredSize(int preferredWidth)
WidgetWidget
getPreferredSize in class WidgetWidgetprotected java.lang.Object getDefaultStylePropertyValue(java.lang.String name)
Widgetname
property, or null.
getDefaultStylePropertyValue in class Widgetname
propertypublic Widget add(Widget widget)
WidgetWidget to this as child
add in class Widgetwidget - The Widget to add
Widgetprotected void doLayout()
Widget
doLayout in class Widgetprotected void paintChildrenImpl(Graphics g)
WidgetpaintImpl method on widget's children.
paintChildrenImpl in class Widget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||