// File: ModeCreateConstVertex.java // Classes: ModeCreateConstVertex // Author: Kedar Patankar package edu.neu.ccs.demeter.tools.apstudio.graphedit; import java.awt.Graphics; import java.awt.event.MouseEvent; import java.awt.Cursor; import java.awt.Point; public class ModeCreateConstVertex extends Mode { private Editor _editor; ModeCreateConstVertex(Document d,Editor e) { super(d); _editor=e; setMessage(_editor); } public void setCursorType() { parent.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void setMessage(Editor ed) { ed.setMessage("In mode Create Construction Vertex. Click on the canvas to add vertex to graph"); } public void mouseUp(MouseEvent event) { Point p=event.getPoint(); Action addClass = new ActionCreateVertex(_editor,parent,p,UVertex.CONSTVERT); addClass.doIt(); done(); } public void draw(Graphics g) { } } /* end class ModeCreateConstVertex */