Horus Doc || Java GUI Reference || Doxygen's quick Index  

PixelEditor Class Reference

An editor for inspection and modification of individual pixel values of a CanvasJavaImage. More...

List of all members.

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 ()


Detailed Description

An editor for inspection and modification of individual pixel values of a CanvasJavaImage.

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


Constructor & Destructor Documentation

PixelEditor::PixelEditor   [inline]
 

Constructor.

00045 {
00046     doInit();
00047 }

PixelEditor::PixelEditor int    width,
int    height
[inline]
 

Constructor.

00053 {
00054     _tvWidth = width;
00055     _tvHeight = height;
00056     doInit();
00057 }


Member Function Documentation

void PixelEditor::updatePixels CanvasViewer    viewer,
CanvasObject    obj,
int    x,
int    y
[inline]
 

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 }

void PixelEditor::refreshPixels   [inline]
 

00079 {
00080     updateScreen(_xCenter, _yCenter);
00081 }

void PixelEditor::doClear   [inline]
 

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 }


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 15:11:24 2003 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001