TPTP 4.5.0 Platform Project
Public API Specification

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

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

public class ZoomIndicatorsCollection
extends java.lang.Object

A collection of ZoomIndicators for a particular slider. The collection is able to invoke the paint call on all ZoomIndicators for a particular slider.


Constructor Summary
ZoomIndicatorsCollection(ZoomSlider slider)
          ZoomIndicatorsCollection constructor
 
Method Summary
 void add(ZoomIndicator indicator)
          Add a ZoomIndicator to this collection.
 void calculatePositions()
          Recalculate the positions of the indicators in this ZoomSlider.
 void clear()
          Clear the ZoomIndicatorCollection
 void dispose()
          Dispose of the resources used by the ZoomIndicators in this collection
 java.util.Vector getZoomIndicators()
          Get all ZoomIndicators in this collection
 void paint(org.eclipse.swt.graphics.GC g, org.eclipse.swt.graphics.Image backBuffer)
          Paint all indicators onto the ZoomSlider GC
 void remove(ZoomIndicator indicator)
          Remove a ZoomIndicator from this collection
 void setXORColors()
          Set the XOR colors for each ZoomIndicator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomIndicatorsCollection

public ZoomIndicatorsCollection(ZoomSlider slider)
ZoomIndicatorsCollection constructor

Parameters:
slider - the ZoomSlider that the indicators are set on
Method Detail

add

public void add(ZoomIndicator indicator)
Add a ZoomIndicator to this collection. Duplicate ZoomIndicators will not be added.

Parameters:
indicator - the ZoomIndicator to add to this collection

remove

public void remove(ZoomIndicator indicator)
Remove a ZoomIndicator from this collection

Parameters:
indicator - the ZoomIndicator to remove from the collection

calculatePositions

public void calculatePositions()
Recalculate the positions of the indicators in this ZoomSlider. Should be called if the indicator widths or number of indicators change.


paint

public void paint(org.eclipse.swt.graphics.GC g,
                  org.eclipse.swt.graphics.Image backBuffer)
Paint all indicators onto the ZoomSlider GC

Parameters:
g - the GC to paint on
backBuffer - the background image

getZoomIndicators

public java.util.Vector getZoomIndicators()
Get all ZoomIndicators in this collection

Returns:
a Vector of ZoomIndicators

setXORColors

public void setXORColors()
Set the XOR colors for each ZoomIndicator.

See Also:
ZoomIndicator.setXORColor()

dispose

public void dispose()
Dispose of the resources used by the ZoomIndicators in this collection


clear

public void clear()
Clear the ZoomIndicatorCollection


TPTP 4.5.0 Platform Project
Public API Specification