Public Methods | |
| PixelEditor () | |
| Constructor. More... | |
| PixelEditor (int width, int height) | |
| Constructor. More... | |
| void | updatePixels (CanvasViewer viewer, CanvasObject obj, int x, int y) |
| void | refreshPixels () |
| void | doClear () |
The pixels of a CanvasHxImage can be inspected but not modified (at this moment ...).
The usage scenario is as follows: 1) the "user" (application) start a PixelEditor and calls updatePixels whenever a new location in a (new) image has to be displayed 2) when the user edits a pixel value in the table the pixel editor will update the CanvasImage and call _viewer.doRefresh
|
|
00045 {
00046 doInit();
00047 }
|
|
||||||||||||
|
00053 {
00054 _tvWidth = width;
00055 _tvHeight = height;
00056 doInit();
00057 }
|
|
||||||||||||||||||||
|
00061 {
00062 _viewer = viewer;
00063 _object = obj;
00064 if (obj instanceof CanvasImage) {
00065 _image = (CanvasImage) obj;
00066 if (_image instanceof CanvasHxImage)
00067 _isHxImage = true;
00068 else
00069 _isHxImage = false;
00070 updateScreen(x, y);
00071 return;
00072 }
00073 // received wrong data, so clear.
00074 doClear();
00075 }
|
|
|
00079 {
00080 updateScreen(_xCenter, _yCenter);
00081 }
|
|
|
00085 {
00086 _viewer = null;
00087 _object = null;
00088 _image = null;
00089 _xlabel.setText("x : ");
00090 _ylabel.setText("y : ");
00091 _tv.doClear();
00092 _pModel.fireTableDataChanged();
00093 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001