com.mot.lnf
Interface GaugeLNF


public interface GaugeLNF

Methods needed to customize look and feel of a Gauge


Method Summary
 int getMinimumHeight(javax.microedition.lcdui.Gauge gg)
          Get the minimum height of this component
 int getMinimumWidth(javax.microedition.lcdui.Gauge gg)
          Get the minimum width of this component
 int getPreferredHeight(javax.microedition.lcdui.Gauge gg, int width)
          Get the preferred height of this component
 int getPreferredWidth(javax.microedition.lcdui.Gauge gg, int height)
          Get the preferred width of this component
 int getUpdatedValue(int x, int y, javax.microedition.lcdui.Gauge gg, boolean isRelease)
          Figure out what the new Gauge value is when a pointer action occurs.
 void paint(javax.microedition.lcdui.Graphics g, javax.microedition.lcdui.Gauge gg, int width, int height, java.util.TimerTask tt, boolean hasFocus)
          Method to be used for drawing a Gauge.
 java.util.TimerTask startAnimation(javax.microedition.lcdui.Gauge gg, java.util.TimerTask tt)
          Start an animation for a Gauge
 void stopAnimation(javax.microedition.lcdui.Gauge gg, java.util.TimerTask tt)
          Stop animation for a Gauge.
 java.util.TimerTask updateAnimation(javax.microedition.lcdui.Gauge gg, java.util.TimerTask tt)
          Update an animation for a Gauge
 

Method Detail

paint

public void paint(javax.microedition.lcdui.Graphics g,
                  javax.microedition.lcdui.Gauge gg,
                  int width,
                  int height,
                  java.util.TimerTask tt,
                  boolean hasFocus)
Method to be used for drawing a Gauge.
Parameters:
g - Graphics object to use for drawing
gg - Gauge to draw
width - Assigned width of the Gauge, in pixels
height - Assigned height of the Gauge, in pixels
tt - TimerTask used for animation
hasFocus - true if the Gauge has cursor focus

getMinimumHeight

public int getMinimumHeight(javax.microedition.lcdui.Gauge gg)
Get the minimum height of this component
Parameters:
gg - Gauge to obtain size information about
Returns:
minimum height, in pixels

getMinimumWidth

public int getMinimumWidth(javax.microedition.lcdui.Gauge gg)
Get the minimum width of this component
Parameters:
gg - Gauge to obtain size information about
Returns:
minimum width, in pixels

getPreferredHeight

public int getPreferredHeight(javax.microedition.lcdui.Gauge gg,
                              int width)
Get the preferred height of this component
Parameters:
gg - Gauge to obtain size information about
width - the tentative content width in pixels, or -1 if a tentative width has not been computed
Returns:
preferred height, in pixels

getPreferredWidth

public int getPreferredWidth(javax.microedition.lcdui.Gauge gg,
                             int height)
Get the preferred width of this component
Parameters:
gg - Gauge to obtain size information about
height - the tentative content height in pixels, or -1 if a tentative height has not been computed
Returns:
preferred width, in pixels

getUpdatedValue

public int getUpdatedValue(int x,
                           int y,
                           javax.microedition.lcdui.Gauge gg,
                           boolean isRelease)
Figure out what the new Gauge value is when a pointer action occurs.
Parameters:
x - The x position of the pointer action
y - The y position of the pointer action
gg - Gauge which was pressed
isRelease - true if the event was a pointer release, in this case the value must be updated
Returns:
the new Gauge value

updateAnimation

public java.util.TimerTask updateAnimation(javax.microedition.lcdui.Gauge gg,
                                           java.util.TimerTask tt)
Update an animation for a Gauge
Parameters:
gg - The gauge being animated
tt - The timer task that is being used (null if none)
Returns:
The timer task that is being used (null if none)

startAnimation

public java.util.TimerTask startAnimation(javax.microedition.lcdui.Gauge gg,
                                          java.util.TimerTask tt)
Start an animation for a Gauge
Parameters:
gg - The gauge to animate
tt - The timer task that is being used (null if none)
Returns:
The timer task that is being used (null if none)

stopAnimation

public void stopAnimation(javax.microedition.lcdui.Gauge gg,
                          java.util.TimerTask tt)
Stop animation for a Gauge.
Parameters:
gg - The gauge to stop animating
tt - The timer task that is being used (null if none)
Returns:
The timer task that is being used (null if none)