Package java.awt.event

Examples of java.awt.event.AdjustmentEvent


     * @since 1.4
     */
    public void setValueIsAdjusting(boolean b) {
  if (isAdjusting != b) {
      isAdjusting = b;
      AdjustmentEvent e =
    new AdjustmentEvent(this,
            AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
      AdjustmentEvent.TRACK, value, b);
      adjustmentListener.adjustmentValueChanged(e);
  }
    }
View Full Code Here


    }

    protected void fireAdjustmentValueChanged(final int id, final int type, final int value) {
        AdjustmentListener[] listeners = getAdjustmentListeners();
        for (int i = 0; i < listeners.length; i++) {
            listeners[i].adjustmentValueChanged(new AdjustmentEvent(this, id, type, value));
        }
    }
View Full Code Here

        int type = stateController.getType();
        if (type < 0) {
            return;
        }
        setValueIsAdjusting(stateController.isSliderDragged());
        postEvent(new AdjustmentEvent(this, AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED, type,
                value, getValueIsAdjusting()));
    }
View Full Code Here

    private void postAdjustmentEvent(final int type) {
        // create and post invocation event here:
        comp.postEvent(new InvocationEvent(ScrollPaneAdjustable.this, new Runnable() {
            public void run() {
                AdjustmentEvent event = new AdjustmentEvent(ScrollPaneAdjustable.this,
                        AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED, type, value,
                        getValueIsAdjusting());
                if (callAWTListener) {
                    comp.toolkit.lockAWT();
                    try {
View Full Code Here

     * @see EventListenerList
     */
    private void fireAdjustmentValueChanged(int id, int type, int value,
                                            boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        AdjustmentEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i]==AdjustmentListener.class) {
                if (e == null) {
                    e = new AdjustmentEvent(this, id, type, value, isAdjusting);
                }
                ((AdjustmentListener)listeners[i+1]).adjustmentValueChanged(e);
            }
        }
    }
View Full Code Here

        if (v != value) {
            value = v;
            // Synchronously notify the listeners so that they are
            // guaranteed to be up-to-date with the Adjustable before
            // it is mutated again.
            AdjustmentEvent e =
                new AdjustmentEvent(this,
                        AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                        type, value, isAdjusting);
            adjustmentListener.adjustmentValueChanged(e);
        }
    }
View Full Code Here

     * @see EventListenerList
     */
    private void fireAdjustmentValueChanged(int id, int type, int value,
              boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        AdjustmentEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i]==AdjustmentListener.class) {
                if (e == null) {
                    e = new AdjustmentEvent(this, id, type, value, isAdjusting);
                }
                ((AdjustmentListener)listeners[i+1]).adjustmentValueChanged(e);
            }         
        }
    }  
View Full Code Here

     * @see EventListenerList
     */
    private void fireAdjustmentValueChanged(int id, int type, int value,
                                            boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        AdjustmentEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i]==AdjustmentListener.class) {
                if (e == null) {
                    e = new AdjustmentEvent(this, id, type, value, isAdjusting);
                }
                ((AdjustmentListener)listeners[i+1]).adjustmentValueChanged(e);
            }
        }
    }
View Full Code Here

     * @since 1.4
     */
    public void setValueIsAdjusting(boolean b) {
        if (isAdjusting != b) {
            isAdjusting = b;
            AdjustmentEvent e =
                new AdjustmentEvent(this,
                        AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                        AdjustmentEvent.TRACK, value, b);
            adjustmentListener.adjustmentValueChanged(e);
        }
    }
View Full Code Here

        if (v != value) {
            value = v;
            // Synchronously notify the listeners so that they are
            // guaranteed to be up-to-date with the Adjustable before
            // it is mutated again.
            AdjustmentEvent e =
                new AdjustmentEvent(this,
                        AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
                        type, value, isAdjusting);
            adjustmentListener.adjustmentValueChanged(e);
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.event.AdjustmentEvent

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.