All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tropo.awt.TRSlider

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----tropo.awt.TRBufferedCanvas
                           |
                           +----tropo.awt.TRSlider

public class TRSlider
extends TRBufferedCanvas
Slider.


Variable Index

 o debug

Constructor Index

 o TRSlider()
Create w/ defaults.
 o TRSlider(int, int)
Start up a slider w/ the passed range - the current value will be the min.
 o TRSlider(int, int, int)
Create a slider w/ the passeed values.

Method Index

 o disable()
 o draw(Graphics)
 o drawBar(Graphics, int, int, int, int)
 o drawMover(Graphics, int, int, int, int)
 o enable()
 o getBarHeight()
 o getBarWidth()
 o getClosenessThreshold()
Get ..
 o getMaxValue()
Return the current max value.
 o getMinValue()
Return the current min value.
 o getMoverColor()
 o getMoverHeight()
 o getMoverWidth()
Get the width of the moving mover.
 o getOrientation()
 o getValue()
Return the current value.
 o gotFocus(Event, Object)
We now have focus.
 o hasFocus()
Do we have focus?
 o keyDown(Event, int)
The user has hit a key.
 o lostFocus(Event, Object)
We lost focus.
 o mouseDown(Event, int, int)
The mouse is down.
 o mouseDrag(Event, int, int)
The mouse is dragged.
 o mouseEnter(Event, int, int)
The mouse enters the component.
 o mouseExit(Event, int, int)
The mouse leaves the component.
 o mouseMove(Event, int, int)
The mouse moves.
 o mouseNearBar()
Is the mouse near the (fixed) bar?
 o mouseNearSlider()
Is the mouse near the (moving) slider?
 o pixel2Value(int)
Convert from pixel space to user space.
 o reallyDrawBar(Graphics, int, int, int, int)
 o setBarHeight(int)
 o setBarWidth(int)
 o setClosenessThreshold(int)
Set...
 o setMoverColor(Color)
 o setMoverHeight(int)
 o setMoverWidth(int)
Set the width of the moving mover.
 o setOrientation(TROrientation)
 o setSize(int, int)
Set the size we have to completely fit into..
 o setValue(int)
Set the current value.
 o toString()
 o value2Pixel(int)
Convert from a user value to a pixel.

Variables

 o debug
 public boolean debug

Constructors

 o TRSlider
 public TRSlider()
Create w/ defaults.

 o TRSlider
 public TRSlider(int min,
                 int max)
Start up a slider w/ the passed range - the current value will be the min.

 o TRSlider
 public TRSlider(int cur,
                 int min,
                 int max)
Create a slider w/ the passeed values.

Methods

 o setOrientation
 public void setOrientation(TROrientation or)
 o getOrientation
 public TROrientation getOrientation()
 o setMoverWidth
 public void setMoverWidth(int xmoverWidth)
Set the width of the moving mover.

 o getMoverWidth
 public int getMoverWidth()
Get the width of the moving mover.

 o setMoverHeight
 public void setMoverHeight(int xmoverHeight)
 o getMoverHeight
 public int getMoverHeight()
 o setBarWidth
 public void setBarWidth(int xbarWidth)
 o getBarWidth
 public int getBarWidth()
 o setBarHeight
 public void setBarHeight(int xbarHeight)
 o getBarHeight
 public int getBarHeight()
 o gotFocus
 public boolean gotFocus(Event evt,
                         Object what)
We now have focus.

Overrides:
gotFocus in class Component
 o lostFocus
 public boolean lostFocus(Event evt,
                          Object what)
We lost focus.

Overrides:
lostFocus in class Component
 o hasFocus
 public final boolean hasFocus()
Do we have focus?

 o setSize
 public void setSize(int w,
                     int h)
Set the size we have to completely fit into..

Overrides:
setSize in class TRBufferedCanvas
 o keyDown
 public boolean keyDown(Event e,
                        int c)
The user has hit a key.

Overrides:
keyDown in class Component
 o mouseMove
 public boolean mouseMove(Event e,
                          int x,
                          int y)
The mouse moves.

Overrides:
mouseMove in class Component
 o mouseNearBar
 public boolean mouseNearBar()
Is the mouse near the (fixed) bar?

 o mouseNearSlider
 public boolean mouseNearSlider()
Is the mouse near the (moving) slider?

 o mouseDrag
 public boolean mouseDrag(Event e,
                          int x,
                          int y)
The mouse is dragged.

Overrides:
mouseDrag in class Component
 o mouseDown
 public boolean mouseDown(Event e,
                          int x,
                          int y)
The mouse is down.

Overrides:
mouseDown in class Component
 o mouseEnter
 public boolean mouseEnter(Event me,
                           int x,
                           int y)
The mouse enters the component.

Overrides:
mouseEnter in class Component
 o mouseExit
 public boolean mouseExit(Event me,
                          int x,
                          int y)
The mouse leaves the component.

Overrides:
mouseExit in class Component
 o setClosenessThreshold
 public void setClosenessThreshold(int closeness)
Set...

 o getClosenessThreshold
 public int getClosenessThreshold()
Get ..

 o enable
 public void enable()
Overrides:
enable in class Component
 o disable
 public void disable()
Overrides:
disable in class Component
 o draw
 public final void draw(Graphics g)
Overrides:
draw in class TRBufferedCanvas
 o drawBar
 protected void drawBar(Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
 o reallyDrawBar
 protected void reallyDrawBar(Graphics g,
                              int x,
                              int y,
                              int w,
                              int h)
 o drawMover
 protected void drawMover(Graphics g,
                          int x,
                          int y,
                          int w,
                          int h)
 o setValue
 public void setValue(int vv)
Set the current value.

 o getValue
 public int getValue()
Return the current value.

 o getMinValue
 public int getMinValue()
Return the current min value.

 o getMaxValue
 public int getMaxValue()
Return the current max value.

 o pixel2Value
 public int pixel2Value(int x)
Convert from pixel space to user space.

Parameters:
xPixel - pixel, 0 is start of bar
 o value2Pixel
 public int value2Pixel(int value)
Convert from a user value to a pixel.

Parameters:
user - value, min->0, max->bar width
 o toString
 public String toString()
Overrides:
toString in class Component
 o setMoverColor
 public void setMoverColor(Color c)
 o getMoverColor
 public Color getMoverColor()

All Packages  Class Hierarchy  This Package  Previous  Next  Index