|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.skin.ComponentSkin
pivot.wtk.skin.ImageViewSkin
public class ImageViewSkin
Image view skin.
TODO Add rotation style.
TODO If horizontal or vertical alignment is specified, but not both, scale aspect-correct in that dimension.
Field Summary |
---|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
ImageViewSkin()
|
Method Summary | |
---|---|
java.awt.Color |
getBackgroundColor()
|
HorizontalAlignment |
getHorizontalAlignment()
|
float |
getOpacity()
|
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
VerticalAlignment |
getVerticalAlignment()
|
void |
imageChanged(ImageView imageView,
Image previousImage)
Called when an image view's image has changed. |
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, components are focusable. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
void |
paint(java.awt.Graphics2D graphics)
Paints the visual. |
void |
setBackgroundColor(java.awt.Color backgroundColor)
|
void |
setBackgroundColor(java.lang.String backgroundColor)
|
void |
setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
|
void |
setHorizontalAlignment(java.lang.String horizontalAlignment)
|
void |
setOpacity(float opacity)
|
void |
setOpacity(java.lang.Number opacity)
|
void |
setVerticalAlignment(java.lang.String verticalAlignment)
|
void |
setVerticalAlignment(VerticalAlignment verticalAlignment)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeColor, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageViewSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ComponentSkin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ComponentSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
width
- The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
getPreferredSize
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
public void paint(java.awt.Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color backgroundColor)
public final void setBackgroundColor(java.lang.String backgroundColor)
public float getOpacity()
public void setOpacity(float opacity)
public final void setOpacity(java.lang.Number opacity)
public HorizontalAlignment getHorizontalAlignment()
public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
public final void setHorizontalAlignment(java.lang.String horizontalAlignment)
public VerticalAlignment getVerticalAlignment()
public void setVerticalAlignment(VerticalAlignment verticalAlignment)
public final void setVerticalAlignment(java.lang.String verticalAlignment)
public void imageChanged(ImageView imageView, Image previousImage)
ImageViewListener
imageChanged
in interface ImageViewListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |