Examples of ListSelectionEvent


Examples of javax.swing.event.ListSelectionEvent

    protected ListSelectionModel createSelectionModel() {
        return new DefaultListSelectionModel();
    }

    protected void fireSelectionValueChanged(final int firstIndex, final int lastIndex, final boolean isAdjusting) {
        ListSelectionEvent event = new ListSelectionEvent(this, firstIndex, lastIndex, isAdjusting);
        ListSelectionListener[] listeners = getListSelectionListeners();
        for (int i = 0; i < listeners.length; i++) {
            listeners[i].valueChanged(event);
        }
    }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

        listenerList.remove(ListSelectionListener.class, l);
    }
    protected void fireListSelectionEvent(boolean isAdjusting) {
        EventListener[] listeners = listenerList.getListeners(ListSelectionListener.class);
        if (listeners != null && listeners.length > 0) {
            ListSelectionEvent event = new ListSelectionEvent(this, -1, -1, isAdjusting);
            for (int i = 0; i < listeners.length; i++) {
                ((ListSelectionListener) listeners[i]).valueChanged(event);
            }
        }
    }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

        this.additionalText1.setBackground(new Color(230, 230, 230));
        this.additionalText2.setBackground(new Color(230, 230, 230));
        this.additionalCheck1.setSelected(true);
        this.additionalCheck2.setSelected(false);
        this.list.ensureIndexIsVisible(this.list.getSelectedIndex());
        this.valueChanged(new ListSelectionEvent(
                this.list,
                this.list.getSelectedIndex(),
                this.list.getSelectedIndex(),
                true));
    }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

    }

    private void checkSingleEvent(final TestListener listener, final int beginIndex,
            final int endIndex, final boolean isAdjusting) {
        assertEquals(1, listener.getEvents().size());
        ListSelectionEvent event = listener.getEvents().get(0);
        assertEquals(model, event.getSource());
        assertEquals(beginIndex, event.getFirstIndex());
        assertEquals(endIndex, event.getLastIndex());
        assertEquals(isAdjusting, event.getValueIsAdjusting());
    }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

    }
    protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting)
    {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;

        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener)listeners[i+1]).valueChanged(e);
            }
        }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

    }
    protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting)
    {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;

        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener)listeners[i+1]).valueChanged(e);
            }
        }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

     * @see EventListenerList
     */
    private void fireValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener) listeners[i + 1]).valueChanged(e);
            }
        }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

     * @see EventListenerList
     */
    private void fireValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener) listeners[i + 1]).valueChanged(e);
            }
        }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

    }
    protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting)
    {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;

        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener)listeners[i+1]).valueChanged(e);
            }
        }
View Full Code Here

Examples of javax.swing.event.ListSelectionEvent

     * @see EventListenerList
     */
    private void fireValueChanged(int firstIndex, int lastIndex,
            boolean isAdjusting) {
        Object[] listeners = listenerList.getListenerList();
        ListSelectionEvent e = null;
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ListSelectionListener.class) {
                if (e == null) {
                    e = new ListSelectionEvent(this, firstIndex, lastIndex,
                            isAdjusting);
                }
                ((ListSelectionListener) listeners[i + 1]).valueChanged(e);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.