TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.widgets.zoomslider
Class ZoomIndicator

java.lang.Object
  extended by org.eclipse.hyades.ui.widgets.zoomslider.ZoomIndicator

public class ZoomIndicator
extends java.lang.Object

A ZoomIndicator paints a bounded, coloured line on a slider to represent a value. The ZoomIndicator paints between the basevalue and value of the indicator. Typically, the baseindicator represents a value that does not change, whereas the value represents the variable value that the indicator is displaying.


Constructor Summary
ZoomIndicator(ZoomSlider slider)
          Create a ZoomIndicator for this slider, with default initial value and color
ZoomIndicator(ZoomSlider slider, org.eclipse.swt.graphics.Color color)
          Create a ZoomIndicator for this slider with default color
ZoomIndicator(ZoomSlider slider, double value)
          Create a ZoomIndicator for this slider with default color
ZoomIndicator(ZoomSlider slider, double value, org.eclipse.swt.graphics.Color color)
          Create a ZoomIndicator for this slider
 
Method Summary
 void dispose()
          Dispose of ZoomIndicator resources
 org.eclipse.swt.graphics.Color getColor()
          Get the color of this indicator
 double getValue()
          Get the indicators value
 ZoomSlider getZoomSlider()
          Get the ZoomSlider this indicator is assigned to
 void paint(org.eclipse.swt.graphics.GC g, org.eclipse.swt.graphics.Image backBuffer, int pos, int w)
          Paint this ZoomIndicator on the ZoomSlider GC
 void setBaseValue(double value)
          Set the base value of this indicator.
 void setColor(org.eclipse.swt.graphics.Color color)
          Set the color of this indicator
 void setValue(double value)
          Set this indicators value
 void setXORColor()
          Set the XOR color of this indicator
 void setZoomSlider(ZoomSlider slider)
          Set the ZoomSlider this indicator is assigned to
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomIndicator

public ZoomIndicator(ZoomSlider slider)
Create a ZoomIndicator for this slider, with default initial value and color

Parameters:
slider - the ZoomSlider for this indicator

ZoomIndicator

public ZoomIndicator(ZoomSlider slider,
                     double value)
Create a ZoomIndicator for this slider with default color

Parameters:
slider - the ZoomSlider for this indicator
value - the initial indicator value

ZoomIndicator

public ZoomIndicator(ZoomSlider slider,
                     org.eclipse.swt.graphics.Color color)
Create a ZoomIndicator for this slider with default color

Parameters:
slider - the ZoomSlider for this indicator
color - the initial color of this indicator

ZoomIndicator

public ZoomIndicator(ZoomSlider slider,
                     double value,
                     org.eclipse.swt.graphics.Color color)
Create a ZoomIndicator for this slider

Parameters:
slider - the ZoomSlider for this indicator
color - the initial color of this indicator
value - the initial indicator value
Method Detail

setZoomSlider

public void setZoomSlider(ZoomSlider slider)
Set the ZoomSlider this indicator is assigned to

Parameters:
slider - the ZoomSlider

getZoomSlider

public ZoomSlider getZoomSlider()
Get the ZoomSlider this indicator is assigned to

Returns:
the ZoomSlider

setBaseValue

public void setBaseValue(double value)
Set the base value of this indicator. The base indicator provides the second bound of the indicator, but is typically static.

Parameters:
value -

setValue

public void setValue(double value)
Set this indicators value

Parameters:
value - the indicators value

getValue

public double getValue()
Get the indicators value

Returns:
the value

setColor

public void setColor(org.eclipse.swt.graphics.Color color)
Set the color of this indicator

Parameters:
color - the new Color of this indicator

getColor

public org.eclipse.swt.graphics.Color getColor()
Get the color of this indicator

Returns:
the Color of this indicator

paint

public void paint(org.eclipse.swt.graphics.GC g,
                  org.eclipse.swt.graphics.Image backBuffer,
                  int pos,
                  int w)
Paint this ZoomIndicator on the ZoomSlider GC

Parameters:
g - the GC on which to paint
backBuffer - the background Image of this slider
pos - the position to draw this indicator (if there are multiple indicators)
w - the width of this ZoomIndicator

setXORColor

public void setXORColor()
Set the XOR color of this indicator


dispose

public void dispose()
Dispose of ZoomIndicator resources


TPTP 4.5.0 Platform Project
Public API Specification