|
||||||||||
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.terra.TerraMeterSkin
public class TerraMeterSkin
Meter skin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Field Summary |
---|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraMeterSkin()
|
Method Summary | |
---|---|
Color |
getColor()
|
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. |
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(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 |
setGridColor(Color gridColor)
|
void |
setGridColor(String gridColor)
|
void |
setGridFrequency(float gridFrequency)
|
void |
setGridFrequency(Number gridFrequency)
|
void |
textChanged(Meter meter,
String previousText)
Listener for meter text changes. |
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getWidth, invalidateComponent, isOpaque, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, 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 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 void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ComponentSkin
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 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 float getGridFrequency()
public void setGridFrequency(float gridFrequency)
public final void setGridFrequency(Number gridFrequency)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |