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

ViewerDialog Class Reference

Inheritance diagram for ViewerDialog::

BarMenuListener ButtonBarListener FuncDialogUser ZoomerUser List of all members.

Public Methods

 ViewerDialog (ViewerDialogUser u, int[] viewerIDs)
 ViewerDialog (ViewerDialogUser u, int[] viewerIDs, boolean modal, boolean resizable)
void pop ()
void addImage (CanvasImage im)
void doClear ()
int getViewerID ()
void setViewerID (int ID)
void setZoomValue (double zoomVal)
void barMenuItemSelected (BarMenuEvent e)
 Method invoked when a BarMenuEvent occurs. More...

void buttonPressed (ButtonBarEvent e)
void handleFuncDialogOK (String op, Object[] objs)
void handleFuncDialogCancel ()
void itemStateChanged (ItemEvent e)
void viewerSelected (ViewerEvent e)
void objectSelected (ViewerEvent e)
void viewerEntered (ViewerEvent e)
void viewerExited (ViewerEvent e)
void objectEntered (ViewerEvent e)
void objectProbed (ViewerEvent e)
void objectCreated (ViewerEvent e)
void objectDeleted (ViewerEvent e)
void objectMoved (ViewerEvent e)
void objectResized (ViewerEvent e)
void objectReshaped (ViewerEvent e)
void objectChangedVisually (ViewerEvent e)
void handleZoomed (double zoomVal)
 Implementation of ZoomerUser. More...


Constructor & Destructor Documentation

ViewerDialog::ViewerDialog ViewerDialogUser    u,
int    viewerIDs[]
[inline]
 

00039     {
00040         this(u, viewerIDs, false, true);
00041     }

ViewerDialog::ViewerDialog ViewerDialogUser    u,
int    viewerIDs[],
boolean    modal,
boolean    resizable
[inline]
 

00046     {
00047         //super(new Frame(), "ViewerManipulator", modal);
00048         doInit(u, viewerIDs, resizable);
00049     }


Member Function Documentation

void ViewerDialog::pop   [inline]
 

00056     {
00057         setVisible(true);
00058     }

void ViewerDialog::addImage CanvasImage    im [inline]
 

00062     {
00063         tv.addObject(im);
00064     }

void ViewerDialog::doClear   [inline]
 

00068     {
00069         tv.doClear();
00070     }

int ViewerDialog::getViewerID   [inline]
 

00074     {
00075         return viewerID;
00076     }

void ViewerDialog::setViewerID int    ID [inline]
 

00080     {
00081         choice.select(Integer.toString(ID));
00082         viewerID = ID;
00083     }

void ViewerDialog::setZoomValue double    zoomVal [inline]
 

00087     {
00088         zoomer.updateStatus(zoomVal);
00089     }

void ViewerDialog::barMenuItemSelected BarMenuEvent    e [inline]
 

Method invoked when a BarMenuEvent occurs.

Reimplemented from BarMenuListener.

00096     {
00097         String command = e.getCommand();
00098         if (command.equals(c_BACK_COLOR) || command.equals(c_DRAW_COLOR)) {
00099             try {
00100                 fd = new FuncDialog(this, command,
00101                          Class.forName("java.awt.Color"), false, false);
00102                 fd.pop();
00103             } catch (ClassNotFoundException cnfe) {
00104                 // do nothing...
00105             }
00106         }
00107     }

void ViewerDialog::buttonPressed ButtonBarEvent    e [inline]
 

Reimplemented from ButtonBarListener.

00114     {
00115         String label = e.getLabel();
00116         if (label.equals("Clear")) {
00117             if (viewerID > -1) {
00118                 doClear();
00119                 user.handleViewerDialogClear(viewerID);
00120             }
00121         }
00122     }

void ViewerDialog::handleFuncDialogOK String    op,
Object    objs[]
[inline]
 

Reimplemented from FuncDialogUser.

00129     {
00130         if (viewerID > -1) {
00131             if (op.equals("BackColor")) {
00132                 if (objs[0] instanceof Color) {
00133                     user.handleViewerDialogBackColor(viewerID, (Color)objs[0]);
00134                 }
00135             } else if (op.equals("DrawColor")) {
00136                 if (objs[0] instanceof Color) {
00137                     user.handleViewerDialogDrawColor(viewerID, (Color)objs[0]);
00138                 }
00139             }
00140             fd.dispose();
00141         }
00142     }

void ViewerDialog::handleFuncDialogCancel   [inline]
 

Reimplemented from FuncDialogUser.

00146     {
00147         fd.dispose();
00148     }

void ViewerDialog::itemStateChanged ItemEvent    e [inline]
 

00155     {
00156         if (e.getStateChange() == ItemEvent.SELECTED) {
00157             viewerID = getInteger((String)e.getItem()).intValue();
00158             if (viewerID > -1) {
00159                 user.handleViewerDialogSelected(viewerID);
00160             }
00161         }
00162     }

void ViewerDialog::viewerSelected ViewerEvent    e [inline]
 

00169     {
00170         double x_scale = e.getXPos() / (double)TV_WIDTH;
00171         double y_scale = e.getYPos() / (double)TV_HEIGHT;
00172         user.handleViewerDialogPointed(viewerID, x_scale, y_scale);
00173     }

void ViewerDialog::objectSelected ViewerEvent    e [inline]
 

00177     {
00178         double x_scale = e.getXPos() / (double)TV_WIDTH;
00179         double y_scale = e.getYPos() / (double)TV_HEIGHT;
00180         user.handleViewerDialogPointed(viewerID, x_scale, y_scale);
00181     }

void ViewerDialog::viewerEntered ViewerEvent    e [inline]
 

00184 { /* do nothing */ }

void ViewerDialog::viewerExited ViewerEvent    e [inline]
 

00185 { /* do nothing */ }

void ViewerDialog::objectEntered ViewerEvent    e [inline]
 

00186 { /* do nothing */ }

void ViewerDialog::objectProbed ViewerEvent    e [inline]
 

00187 { /* do nothing */ }

void ViewerDialog::objectCreated ViewerEvent    e [inline]
 

00188 { /* do nothing */ }

void ViewerDialog::objectDeleted ViewerEvent    e [inline]
 

00189 { /* do nothing */ }

void ViewerDialog::objectMoved ViewerEvent    e [inline]
 

00190 { /* do nothing */ }

void ViewerDialog::objectResized ViewerEvent    e [inline]
 

00191 { /* do nothing */ }

void ViewerDialog::objectReshaped ViewerEvent    e [inline]
 

00192 { /* do nothing */ }

void ViewerDialog::objectChangedVisually ViewerEvent    e [inline]
 

00193 { /* do nothing */ }

void ViewerDialog::handleZoomed double    zoomVal [inline]
 

Implementation of ZoomerUser.

Reimplemented from ZoomerUser.

00200     {
00201         if (viewerID > -1) {
00202             user.handleViewerDialogZoomed(viewerID, zoomVal);
00203         }
00204     }


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