dialogs
Class EyesTracer

java.lang.Object
  extended by dialogs.EyesTracer

public class EyesTracer
extends java.lang.Object

Instances of this class allow the user to trace a path for the eyes shape using a new dialog


Constructor Summary
EyesTracer(org.eclipse.swt.widgets.Shell parent, SubImage subImage, java.lang.String eyeLeftImagePath, java.lang.String eyeRightImagePath)
          Constructs a new instance of this class given its parent and the eyes image.
 
Method Summary
 java.awt.geom.GeneralPath[] open()
          Makes the dialog visible and brings it to the front of the display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EyesTracer

public EyesTracer(org.eclipse.swt.widgets.Shell parent,
                  SubImage subImage,
                  java.lang.String eyeLeftImagePath,
                  java.lang.String eyeRightImagePath)
Constructs a new instance of this class given its parent and the eyes image.

Parameters:
parent - a shell which will be the parent of the new instance
subImage - the image that contains the eyes
eyeLeftImagePath - the path to the left image file
eyeRightImagePath - the path to the right image file
Throws:
java.lang.IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException -
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
Method Detail

open

public java.awt.geom.GeneralPath[] open()
Makes the dialog visible and brings it to the front of the display.

Returns:
an array of two GeneralPath, one for the left eye and one for the right eye or null if the dialog was canceled or an error occurred
Throws:
org.eclipse.swt.SWTException -
  • ERROR_WIDGET_DISPOSED - if the dialog has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the dialog