예제 #1
0
 /**
  * Erstellt einen neuen Kommentar an der gegebenen Position.
  *
  * @param text der Text des Kommentars
  * @param x x-Koordinate des Kommentars
  * @param y y-Koordinate des Kommentars
  */
 public void createComment(String text, int x, int y) {
   CommentObject newComment = new CommentObject();
   newComment.setName(text);
   newComment.setCoordinates(x, y);
   getFsmProgram().addComment(newComment);
   this.modified();
   this.automataPanel.refresh();
   this.automataPanel.setLocked(false);
 }
예제 #2
0
 /** Zoomt aus dem endlichen Automaten heraus. */
 public void zoomOut() {
   if (getFsmProgram().getAllStates().size() > 0) {
     getFsmProgram().getAllStates().get(0).setZoomFactor(false);
   }
   for (StateObject state : getFsmProgram().getAllStates()) {
     state.updateTextCoordinates();
   }
   for (CommentObject comment : getFsmProgram().getAllComments()) {
     comment.setTextCoordinates(comment.getName());
   }
   this.automataPanel.refresh();
 }