示例#1
0
 /**
  * Create the event with the Cursor, message and/or MouseEvent.
  *
  * @param cursor Cursor to be used.
  * @param message an instruction/error to be displayed to the user.
  * @param mouseEvent where that caused the EOMGEvent. May be null.
  */
 public void fireEvent(Cursor cursor, String message, MouseEvent mouseEvent) {
   if (listeners != null) {
     EditableOMGraphic theSource = listeners.getEOMG();
     EOMGEvent event = new EOMGEvent(theSource, cursor, message, mouseEvent);
     fireEvent(event);
   }
 }
示例#2
0
 /**
  * Remove a EOMGListener.
  *
  * @param l EOMGListener
  */
 public synchronized void removeEOMGListener(EOMGListener l) {
   if (listeners == null) {
     return;
   }
   listeners.removeEOMGListener(l);
 }
示例#3
0
 /**
  * The method to call if you want to let listeners know that the state has changed. Usually called
  * when a graphic is selected or not, so that GUIs can be directed.
  */
 public void fireEvent(EOMGEvent event) {
   if (listeners != null) {
     listeners.fireEvent(event);
   }
 }
示例#4
0
 /**
  * Add a EOMGListener.
  *
  * @param l EOMGListener
  */
 public synchronized void addEOMGListener(EOMGListener l) {
   if (listeners == null) {
     listeners = new EOMGListenerSupport(this);
   }
   listeners.addEOMGListener(l);
 }