Title: Figura
1Figura
Rectangle areaPresentacion boolean
seleccionada clone() dibujar(Graphics
g) dibujarSeleccion(Graphics g) cambiarAreaPresen
tacion(Point p1, Point p2) Rectangle
getAreaPresentacion() setSeleccionada(boolean) Dim
ension getDimensiones() contienePunto(Point
p) boolean esFiguraVacia() mover (int dx, int dy)
java.awt.Rectangle java.awt.Point Java.awt.Dimensi
on javax.swing.JTextField javax.swing.JTextArea
2VentanaEditor
Dibujo areaDibujo actionPerformed(ActionEvent e)
Dibujo BotonHerramienta java.awt.event.ActionEvent
3Dibujo
VectorltFiguragt listaFiguras Herramienta
herramientaActiva insertarFigura(Figura
f) Figura eliminarFigura(Figura f) Figura
encuentraFigura(Point) paintComponent(Graphics
g) setHerramientaActiva(Herramienta) void
mousePressed(MouseEvent e) void
mouseDragged(MouseEvent e) void
mouseReleased(MouseEvent e)
Figura java.awt.MouseEvent Herramienta
4BotonHerramienta
Herramienta herramienta Herramienta
getHerramienta()
javax.swing.JButton Herramienta
5Herramienta
java.awt.MouseEvent
void mousePressed(MouseEvent e) void
mouseDragged(MouseEvent e) void
mouseReleased(MouseEvent e)
6HerramientaCreacion
Figura prototipo Dibujo areaDibujo Figura
ultiFiguraCreada Point ultPulsacion void
mousePressed(MouseEvent e) void
mouseDragged(MouseEvent e) void
mouseReleased(MouseEvent e)
java.awt.MouseEvent Figura Dibujo java.awt.Point
7HerramientaSeleccion
java.awt.MouseEvent Dibujo Figura java.awt.Point
Dibujo areaDibujo Figura figSeleccionada Point
ultPulsacion void mousePressed(MouseEvent
e) void mouseDragged(MouseEvent e) void
mouseReleased(MouseEvent e)
8Figure
Rectangle displayBox move(int dx, int
dy) resize(Handle m, int dx, int
dy) draw() boolean containsPoint(int x, int
y) changeDisplayBox(Rectangle r) boolean
isEmptyFigure() Rectangle getDisplayBox() Enumerat
ionlt Handlegt Handles()
java.awt.Rectangle java.util.Enumeration Handle
9EditorWindow
Drawing drawArea CreationTool hc Figure
lastFigure int lastX, lastY boolean
resizing Handle lastHandle mousePressed(MouseEven
t e) mouseDragged(MouseEvent e) mouseReleased(Mous
eEvent e) boolean isSelectionToolChosen() boolean
isCreationToolChosen()
Drawing CreationTool java.awt.event.MouseEvent Fig
ure Handle
10Drawing
VectorltFiguregt figureList Figure
selectedFigure Figure findFigure (int x, int
y) addFigure(Figure f) Figure removeFigure(Figure
f) draw() selectFigure(Figure f) deselectFigure()
Figure getSelectedFigure()
Figure
11ButtonTool
Figure protoype Figure createFigure()
Figure