Package org.apache.pivot.wtk.skin.terra
Class TerraMeterSkin
- java.lang.Object
- 
- org.apache.pivot.wtk.skin.ComponentSkin
- 
- org.apache.pivot.wtk.skin.terra.TerraMeterSkin
 
 
- 
- All Implemented Interfaces:
- ComponentKeyListener,- ComponentListener,- ComponentMouseButtonListener,- ComponentMouseListener,- ComponentMouseWheelListener,- ComponentStateListener,- ComponentTooltipListener,- ConstrainedVisual,- MeterListener,- Skin,- Visual
 
 public class TerraMeterSkin extends ComponentSkin implements MeterListener Meter skin.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListenerComponentKeyListener.Adapter, ComponentKeyListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListenerComponentListener.Adapter, ComponentListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListenerComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListenerComponentMouseListener.Adapter, ComponentMouseListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListenerComponentMouseWheelListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListenerComponentStateListener.Adapter, ComponentStateListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListenerComponentTooltipListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.MeterListenerMeterListener.Adapter, MeterListener.Listeners
 
- 
 - 
Constructor SummaryConstructors Constructor Description TerraMeterSkin()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBaseline(int width, int height)Should be implemented in every subclass.java.awt.ColorgetColor()java.awt.FontgetFont()java.awt.ColorgetGridColor()floatgetGridFrequency()intgetPreferredHeight(int width)Returns the visual's preferred height given the provided width constraint.DimensionsgetPreferredSize()Returns the visual's unconstrained preferred size.intgetPreferredWidth(int height)Returns the visual's preferred width given the provided height constraint.java.awt.ColorgetTextColor()java.awt.ColorgetTextFillColor()voidinstall(Component component)Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.booleanisFocusable()By default, skins are focusable.voidlayout()If the component on which the skin is installed is a container, lays out the container's children.voidorientationChanged(Meter meter)Listener for meter orientation changes.voidpaint(java.awt.Graphics2D graphics)Paints the visual.voidpercentageChanged(Meter meter, double previousPercentage)Listener for meter percentage changes.voidsetColor(int color)voidsetColor(java.awt.Color color)voidsetColor(java.lang.String color)voidsetFont(java.awt.Font font)voidsetFont(java.lang.String font)voidsetFont(Dictionary<java.lang.String,?> font)voidsetGridColor(int gridColor)voidsetGridColor(java.awt.Color gridColor)voidsetGridColor(java.lang.String gridColor)voidsetGridFrequency(float gridFrequency)voidsetGridFrequency(java.lang.Number gridFrequency)voidsetTextColor(int color)voidsetTextColor(java.awt.Color color)voidsetTextColor(java.lang.String color)voidsetTextFillColor(int color)voidsetTextFillColor(java.awt.Color color)voidsetTextFillColor(java.lang.String color)voidtextChanged(Meter meter, java.lang.String previousText)Listener for meter text changes.- 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkincolorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, fontFromObject, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, isOpaque, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisualsetSize
 
- 
 
- 
- 
- 
Method Detail- 
installpublic void install(Component component) Description copied from class:ComponentSkinMust be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
- installin interface- Skin
- Overrides:
- installin class- ComponentSkin
- Parameters:
- component- The component to which the skin is being attached.
 
 - 
isFocusablepublic boolean isFocusable() Description copied from class:ComponentSkinBy default, skins are focusable.- Specified by:
- isFocusablein interface- Skin
- Overrides:
- isFocusablein class- ComponentSkin
- Returns:
- trueif this skin is focusable;- false, otherwise.
 
 - 
getPreferredWidthpublic int getPreferredWidth(int height) Description copied from interface:ConstrainedVisualReturns the visual's preferred width given the provided height constraint.- Specified by:
- getPreferredWidthin interface- ConstrainedVisual
- Parameters:
- height- The height by which to constrain the preferred width, or- -1for no constraint.
- Returns:
- The preferred width given the height constraint.
 
 - 
getPreferredHeightpublic int getPreferredHeight(int width) Description copied from interface:ConstrainedVisualReturns the visual's preferred height given the provided width constraint.- Specified by:
- getPreferredHeightin interface- ConstrainedVisual
- Parameters:
- width- The width by which to constrain the preferred height, or- -1for no constraint.
- Returns:
- The preferred height given the width constraint.
 
 - 
getPreferredSizepublic Dimensions getPreferredSize() Description copied from interface:ConstrainedVisualReturns the visual's unconstrained preferred size.- Specified by:
- getPreferredSizein interface- ConstrainedVisual
- Overrides:
- getPreferredSizein class- ComponentSkin
- Returns:
- The preferred size (width and height) of this component.
 Depending on the component this can be a static value or derived (as for a container) from its subcomponents, etc. The default implementation simply calls ConstrainedVisual.getPreferredWidth(int)andConstrainedVisual.getPreferredHeight(int).
 
 - 
getBaselinepublic int getBaseline(int width, int height)Description copied from class:ComponentSkinShould be implemented in every subclass.The default implementation here simply returns -1 (no baseline). - Specified by:
- getBaselinein interface- ConstrainedVisual
- Overrides:
- getBaselinein class- ComponentSkin
- Parameters:
- width- Constrained width to compute the baseline for.
- height- Constrained height to compute the baseline for.
- Returns:
- The baseline relative to the origin of this visual, or -1if this visual does not have a baseline.
 
 - 
layoutpublic void layout() Description copied from interface:SkinIf the component on which the skin is installed is a container, lays out the container's children.
 - 
paintpublic void paint(java.awt.Graphics2D graphics) Description copied from interface:VisualPaints the visual.
 - 
getColorpublic java.awt.Color getColor() 
 - 
setColorpublic void setColor(java.awt.Color color) 
 - 
setColorpublic final void setColor(java.lang.String color) 
 - 
setColorpublic final void setColor(int color) 
 - 
getGridColorpublic java.awt.Color getGridColor() 
 - 
setGridColorpublic void setGridColor(java.awt.Color gridColor) 
 - 
setGridColorpublic final void setGridColor(java.lang.String gridColor) 
 - 
setGridColorpublic final void setGridColor(int gridColor) 
 - 
getTextColorpublic java.awt.Color getTextColor() 
 - 
setTextColorpublic void setTextColor(java.awt.Color color) 
 - 
setTextColorpublic final void setTextColor(java.lang.String color) 
 - 
setTextColorpublic final void setTextColor(int color) 
 - 
getTextFillColorpublic java.awt.Color getTextFillColor() 
 - 
setTextFillColorpublic void setTextFillColor(java.awt.Color color) 
 - 
setTextFillColorpublic final void setTextFillColor(java.lang.String color) 
 - 
setTextFillColorpublic final void setTextFillColor(int color) 
 - 
getGridFrequencypublic float getGridFrequency() 
 - 
setGridFrequencypublic void setGridFrequency(float gridFrequency) 
 - 
setGridFrequencypublic final void setGridFrequency(java.lang.Number gridFrequency) 
 - 
getFontpublic java.awt.Font getFont() 
 - 
setFontpublic void setFont(java.awt.Font font) 
 - 
setFontpublic final void setFont(java.lang.String font) 
 - 
setFontpublic final void setFont(Dictionary<java.lang.String,?> font) 
 - 
percentageChangedpublic void percentageChanged(Meter meter, double previousPercentage) Listener for meter percentage changes.- Specified by:
- percentageChangedin interface- MeterListener
- Parameters:
- meter- The source of the event.
- previousPercentage- The previous percentage value.
 
 - 
textChangedpublic void textChanged(Meter meter, java.lang.String previousText) Listener for meter text changes.- Specified by:
- textChangedin interface- MeterListener
- Parameters:
- meter- The source of the event.
- previousText- The previous text value.
 
 - 
orientationChangedpublic void orientationChanged(Meter meter) Listener for meter orientation changes.- Specified by:
- orientationChangedin interface- MeterListener
- Parameters:
- meter- The source of the event.
 
 
- 
 
-