org.placelab.util.swt
Class GlyphReticle

java.lang.Object
  extended byorg.placelab.util.swt.Glyph
      extended byorg.placelab.util.swt.GlyphReticle

public class GlyphReticle
extends Glyph

Implements a cross-hair with an optional circle showing confidence of estimate.


Field Summary
 
Fields inherited from class org.placelab.util.swt.Glyph
ANCHOR_C, ANCHOR_E, ANCHOR_N, ANCHOR_NE, ANCHOR_NW, ANCHOR_S, ANCHOR_SE, ANCHOR_SW, ANCHOR_W, DISPOSED, IGNORE_TRANSPARENCY, MOUSE_EVENTS, needsTransformRedraw, NONE, transform, transformedImage, transparency, VISIBLE, zoom
 
Constructor Summary
GlyphReticle(GlyphComposite parent, int style)
           
GlyphReticle(GlyphHolder holder, int style)
           
 
Method Summary
 void dispose()
           
protected  org.eclipse.swt.graphics.Rectangle getBoundsImpl()
           
 org.eclipse.swt.graphics.Point getCenter()
           
 boolean getDrawConfidence()
           
 int getRadius()
           
protected  void paintImpl(org.eclipse.swt.events.PaintEvent e, GlyphGC gc)
          Implement this if you don't want to worry about AffineTransforms.
protected  boolean pointInsideImpl(int x, int y)
          Return if the point is inside your glyph without the AffineTransform applied
 void set(int x, int y, int radius)
           
 void set(org.eclipse.swt.graphics.Point location, int radius)
           
 void setDrawConfidence(boolean b)
           
 void setForeground(org.eclipse.swt.graphics.Color c)
           
 void setRadius(int r)
           
 void setWidth(int w)
           
 void setZoom(double z)
           
 
Methods inherited from class org.placelab.util.swt.Glyph
addListener, addMouseListener, addPaintListener, areMouseEventsEnabled, enableMouseEvents, enter, getBounds, getCloseEnough, getFlag, getHolder, getLocation, getMaskColor, getNeedsTransformRedraw, getOriginalLocation, getParent, getTransform, getTransparency, getZoom, handleMouseEvent, isDisposed, isVisible, leave, moveAbove, moveBelow, notifyListeners, paint, pickGlyphAt, pointInside, pointInside, redraw, removeListener, resetFlag, setCloseEnough, setCursor, setFlag, setLocation, setNeedsTransformRedraw, setTransform, setTransparency, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlyphReticle

public GlyphReticle(GlyphComposite parent,
                    int style)

GlyphReticle

public GlyphReticle(GlyphHolder holder,
                    int style)
Method Detail

set

public void set(int x,
                int y,
                int radius)

setRadius

public void setRadius(int r)

setDrawConfidence

public void setDrawConfidence(boolean b)

getDrawConfidence

public boolean getDrawConfidence()

set

public void set(org.eclipse.swt.graphics.Point location,
                int radius)

setForeground

public void setForeground(org.eclipse.swt.graphics.Color c)

setWidth

public void setWidth(int w)

getCenter

public org.eclipse.swt.graphics.Point getCenter()

getRadius

public int getRadius()

dispose

public void dispose()
Overrides:
dispose in class Glyph

paintImpl

protected void paintImpl(org.eclipse.swt.events.PaintEvent e,
                         GlyphGC gc)
Description copied from class: Glyph
Implement this if you don't want to worry about AffineTransforms. Your graphics will be rasterized and have an AffineTransform applied to them

Overrides:
paintImpl in class Glyph

getBoundsImpl

protected org.eclipse.swt.graphics.Rectangle getBoundsImpl()
Specified by:
getBoundsImpl in class Glyph
Returns:
your bounds without having the AffineTransform applied to them

pointInsideImpl

protected boolean pointInsideImpl(int x,
                                  int y)
Description copied from class: Glyph
Return if the point is inside your glyph without the AffineTransform applied

Specified by:
pointInsideImpl in class Glyph

setZoom

public void setZoom(double z)
Overrides:
setZoom in class Glyph