コード例 #1
0
 /**
  * Is called when the listened object is closed really.
  *
  * @param eventObject event object
  * @author Andreas Bröker
  */
 public void notifyClosing(EventObject eventObject) {
   closeListener.notifyClosing(new CloseEvent(eventObject, getServiceProvider()));
 }
コード例 #2
0
 /**
  * Is called when somewhere tries to close listened object.
  *
  * @param eventObject source event object
  * @param getsOwnership information about the ownership
  * @throws CloseVetoException close veto exception
  * @author Andreas Bröker
  */
 public void queryClosing(EventObject eventObject, boolean getsOwnership)
     throws CloseVetoException {
   CloseEvent closeEvent = new CloseEvent(eventObject, getServiceProvider());
   closeListener.queryClosing(closeEvent, getsOwnership);
   if (closeEvent.getVeto()) throw new CloseVetoException();
 }