Ejemplo n.º 1
0
 /**
  * Basic component method - draw the picture The code is not fault-tolerant at all.
  *
  * @param g the AWT graphic object
  */
 public void paint(Graphics g) {
   try {
     port.setPortGraphics(g);
     setCursor(processing);
     pict.execute(port);
     setCursor(idle);
   } catch (Exception e) {
     e.printStackTrace();
     System.exit(0);
   }
 } // paint
Ejemplo n.º 2
0
 /**
  * Finds if some text is situated in some point Checks if the point fills within the box of some
  * Quickdraw text. If this is the case, said text is returned.
  *
  * @param p the point choosen
  * @result the string associated to this point
  */
 public String getText(Point p) {
   return port.getLinkManager().getText(p);
 } // getText