Public Methods | |
| ViewerEvent (Object sourceCanvas, Object viewer, CanvasObject cObj, int objID, double x, double y) | |
| Construct viewer event with given parameters. More... | |
| Object | getViewer () |
| Get the canvas viewer where the event occured. More... | |
| int | getCanvasType () |
| Get the canvas type where the event occured. More... | |
| String | getCanvasTypeName () |
| Get the name of canvas type where the event occured. More... | |
| void | setCanvasType (int t) |
| Set the type of the canvas where the event occured. More... | |
| CanvasObject | getCanvasObject () |
| Get the CanvasObject that is the subject of the event. More... | |
| int | getObjectID () |
| Get the ID of the object that is the subject to the event. More... | |
| double | getXPos () |
| Get the x coordinate of the point where the event occured in the Image Coordinate System. More... | |
| double | getYPos () |
| Get the y coordinate of the point where the event occured in the Image Coordinate System. More... | |
| int | getXPosPcs () |
| Get the x coordinate of the point where the event occured in the pixel coordinate system, i.e. More... | |
| int | getYPosPcs () |
| Get the y coordinate of the point where the event occured in the pixel coordinate system, i.e. More... | |
| int | getPoint () |
| Get the point of the figure where the event occured. More... | |
| void | setPoint (int p) |
| Set the point of the figure where the event occured. More... | |
| String | getProp () |
| Get the name of the visual property that changed. More... | |
| void | setProp (String p) |
| Set the name of the visual property that changed. More... | |
Static Public Attributes | |
| final int | VISUALIZER = 1 |
| The visualizer canvas. More... | |
| final int | EDITOR = 2 |
| The editor canvas. More... | |
|
||||||||||||||||||||||||||||
|
Construct viewer event with given parameters.
00036 {
00037 super(sourceCanvas);
00038 _viewer = viewer;
00039 _canvasObj = cObj;
00040 _objID = objID;
00041 _xPos = x;
00042 _yPos = y;
00043 }
|
|
|
Get the canvas viewer where the event occured. The object is an instance of CanvasViewer.
00050 {
00051 return _viewer;
00052 }
|
|
|
Get the canvas type where the event occured.
00058 {
00059 return _canvasType;
00060 }
|
|
|
Get the name of canvas type where the event occured.
00066 {
00067 switch (_canvasType) {
00068 case VISUALIZER: return new String("Visualizer");
00069 case EDITOR: return new String("Editor");
00070 }
00071 return new String("Unknown");
00072 }
|
|
|
Set the type of the canvas where the event occured.
00078 {
00079 _canvasType = t;
00080 }
|
|
|
Get the CanvasObject that is the subject of the event. Keep only for the visualization object as the editor may change the object reference.
00088 {
00089 return _canvasObj;
00090 }
|
|
|
Get the ID of the object that is the subject to the event. TODO: The ID is invalid (== -1) if the subject is a visualization.
00097 {
00098 return _objID;
00099 }
|
|
|
Get the x coordinate of the point where the event occured in the Image Coordinate System.
00106 {
00107 return _xPos;
00108 }
|
|
|
Get the y coordinate of the point where the event occured in the Image Coordinate System.
00115 {
00116 return _yPos;
00117 }
|
|
|
Get the x coordinate of the point where the event occured in the pixel coordinate system, i.e. the integer coordinates of the pixel.
00124 {
00125 return Converter.ICStoPCS(_xPos);
00126 }
|
|
|
Get the y coordinate of the point where the event occured in the pixel coordinate system, i.e. the integer coordinates of the pixel.
00133 {
00134 return Converter.ICStoPCS(_yPos);
00135 }
|
|
|
Get the point of the figure where the event occured.
00141 {
00142 return _point;
00143 }
|
|
|
Set the point of the figure where the event occured.
00149 {
00150 _point = p;
00151 }
|
|
|
Get the name of the visual property that changed.
00157 {
00158 return _prop;
00159 }
|
|
|
Set the name of the visual property that changed.
00165 {
00166 _prop = p;
00167 }
|
|
|
The visualizer canvas.
|
|
|
The editor canvas.
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001