|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.terra.TerraMeterSkin
public class TerraMeterSkin
Meter skin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.MeterListener |
---|
MeterListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Constructor Summary | |
---|---|
TerraMeterSkin()
|
Method Summary | |
---|---|
int |
getBaseline(int width,
int height)
Returns the baseline for a given width and height. |
Color |
getColor()
|
Font |
getFont()
|
Color |
getGridColor()
|
float |
getGridFrequency()
|
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. |
Color |
getTextColor()
|
Color |
getTextFillColor()
|
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, skins are focusable. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
void |
orientationChanged(Meter meter)
Listener for meter orientation changes. |
void |
paint(Graphics2D graphics)
Paints the visual. |
void |
percentageChanged(Meter meter,
double previousPercentage)
Listener for meter percentage changes. |
void |
setColor(Color color)
|
void |
setColor(String color)
|
void |
setFont(Dictionary<String,?> font)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setGridColor(Color gridColor)
|
void |
setGridColor(String gridColor)
|
void |
setGridFrequency(float gridFrequency)
|
void |
setGridFrequency(Number gridFrequency)
|
void |
setTextColor(Color color)
|
void |
setTextColor(String color)
|
void |
setTextFillColor(Color color)
|
void |
setTextFillColor(String color)
|
void |
textChanged(Meter meter,
String previousText)
Listener for meter text changes. |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, isOpaque, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TerraMeterSkin()
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 boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
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 int getBaseline(int width, int height)
ConstrainedVisual
getBaseline
in interface ConstrainedVisual
getBaseline
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
public void paint(Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public Color getGridColor()
public void setGridColor(Color gridColor)
public final void setGridColor(String gridColor)
public Color getTextColor()
public void setTextColor(Color color)
public final void setTextColor(String color)
public Color getTextFillColor()
public void setTextFillColor(Color color)
public final void setTextFillColor(String color)
public float getGridFrequency()
public void setGridFrequency(float gridFrequency)
public final void setGridFrequency(Number gridFrequency)
public Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public final void setFont(Dictionary<String,?> font)
public void percentageChanged(Meter meter, double previousPercentage)
percentageChanged
in interface MeterListener
meter
- The source of the event.previousPercentage
- The previous percentage value.public void textChanged(Meter meter, String previousText)
textChanged
in interface MeterListener
meter
- The source of the event.previousText
- The previous text value.public void orientationChanged(Meter meter)
orientationChanged
in interface MeterListener
meter
- The source of the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |