Package java.util

Examples of java.util.EventObject


            EventFactory factory = context.getManagementStrategy().getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createExchangeSentEvent(exchange, endpoint, timeTaken);
            if (event == null) {
                return;
            }
            doNotifyEvent(notifier, event);
        }
View Full Code Here


        }
    }

    public synchronized void buttonPressed() {
        if (wasMouseClicked()) {
            EventObject eo = getCurrentEvent();
            XButton button = (XButton) eo.getSource();
            Question question = (Question)questionHashMap.get(button.getName());
            question.buttonClicked();
            showItem();
            m_dialog.repaint();
            return;
View Full Code Here

            return;
        }
    }

    public synchronized void listPressed() {
        EventObject eo = getCurrentEvent();
        showItem();
        m_dialog.repaint();
        return;
    }
View Full Code Here

    protected boolean someoneCares() {
        return (recalcListeners != null && !recalcListeners.isEmpty());
    }
    protected void fireEvRecalculated() {
        if (someoneCares()) {
            EventObject e = new EventObject(this);
            Iterator i = new ArrayList(recalcListeners).iterator();
            while (i.hasNext())
                ((RecalcListener) i.next()).evRecalculated(e);
        }
    }
View Full Code Here

            super(name);
        }
       
        public void run() {
            while (true) {
                EventObject event = null;
                try {
                    event = getEventObject();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                    continue;
                }
                AbstractPreferences pref = (AbstractPreferences) event
                        .getSource();
                if (event instanceof NodeAddEvent) {
                    dispatchNodeAdd((NodeChangeEvent) event,
                            pref.nodeChangeListeners);
                } else if (event instanceof NodeRemoveEvent) {
View Full Code Here

        private EventObject getEventObject() throws InterruptedException {
            synchronized (events) {
                if (events.isEmpty()) {
                    events.wait();
                }
                EventObject event = events.get(0);
                events.remove(0);
                return event;
            }
        }
View Full Code Here

 
// <editor-fold defaultstate="collapsed" desc="Inicializalo">
  /** Alapbeallitasok */
  private void initialize(Login login) {
    setLogin(login);
    enabler(new EventObject(this));
  }
View Full Code Here

  protected DocumentListener getDocListener() {
    if (docListener == null) {
      docListener =
          new DocumentListener() {
        public void changedUpdate(DocumentEvent e) {
          enabler(new EventObject(e.getDocument()));
        }
       
       
        public void insertUpdate(DocumentEvent e) {
          changedUpdate(e);
View Full Code Here

        // when, then should fail
        expectedExceptions.expectMessage("Already completed");
        toDoItem.completed();

        // and then
        final EventObject ev = toDoItemSubscriptions.mostRecentlyReceivedEvent(EventObject.class);
        assertThat(ev, is(nullValue()));
    }
View Full Code Here

        // when, then should fail
        expectedExceptions.expectMessage("Always disabled");
        toDoItem.setComplete(true);

        // and then
        final EventObject ev = toDoItemSubscriptions.mostRecentlyReceivedEvent(EventObject.class);
        assertThat(ev, is(nullValue()));
    }
View Full Code Here

TOP

Related Classes of java.util.EventObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.