Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## app
Class DrawSimpleShapes

    java.lang.Object
      |
      +--app.DrawSimpleShapes

All Implemented Interfaces:
  java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class DrawSimpleShapes
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

An application to draw simplae shapes interactively.

Version:
  1.0 12 july 1999
Author:
  Lawrence Rodrigues

Field Summary
`protected java.awt.Shape` | `currentShape`
`protected java.awt.Point` | `diff`
`protected SimpleGraphicsCanvas2D` | `grCanvas`
`protected boolean` | `mousePressed`
`protected java.awt.Shape` | `prevShape`
`protected boolean` | `scrollOn`
`protected java.awt.Point` | `shapeAnchor`
`protected int` | `shapeType`

Constructor Summary
`DrawSimpleShapes(SimpleGraphicsCanvas2D c)`

Method Summary
`void` | `draw(int x, int y)`
`static void` | `main(java.lang.String[] args)`
`void` | `mouseClicked(java.awt.event.MouseEvent e)`
`void` | `mouseDragged(java.awt.event.MouseEvent e)`
`void` | `mouseEntered(java.awt.event.MouseEvent e)`
`void` | `mouseExited(java.awt.event.MouseEvent e)`
`void` | `mouseMoved(java.awt.event.MouseEvent e)`
`void` | `mousePressed(java.awt.event.MouseEvent e)`
`void` | `mouseReleased(java.awt.event.MouseEvent e)`
`protected void` | `popupMenu(javax.swing.JComponent comp, int x, int y)`
`void` | `startDraw(int x, int y)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### shapeType

    protected int shapeType

### grCanvas

    protected SimpleGraphicsCanvas2D grCanvas

### diff

    protected java.awt.Point diff

### shapeAnchor

    protected java.awt.Point shapeAnchor

### scrollOn

    protected boolean scrollOn

### mousePressed

    protected boolean mousePressed

### currentShape

    protected java.awt.Shape currentShape

### prevShape

    protected java.awt.Shape prevShape

Constructor Detail

### DrawSimpleShapes

    public DrawSimpleShapes(SimpleGraphicsCanvas2D c)

Method Detail

### startDraw

    public void startDraw(int x,
                          int y)

### draw

    public void draw(int x,
                     int y)

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent e)

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent e)

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent e)

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`

### mouseDragged

    public void mouseDragged(java.awt.event.MouseEvent e)

  Specified by:
    `mouseDragged` in interface `java.awt.event.MouseMotionListener`

### mouseMoved

    public void mouseMoved(java.awt.event.MouseEvent e)

  Specified by:
    `mouseMoved` in interface `java.awt.event.MouseMotionListener`

### popupMenu

    protected void popupMenu(javax.swing.JComponent comp,
                             int x,
                             int y)

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD