Package java.awt.event

Examples of java.awt.event.AdjustmentListener


        try {
            kit.insertHTML(doc, doc.getLength(), "<style>body { color: #7f7f7f;}</style>", 0, 0, null);
        } catch (Throwable e) {
            Flog.warn("Couldn't insert initial HTML into chat %s.", e.toString());
        }
        messagesScrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent e) {
                if (shouldScrollToBottom) {
                    e.getAdjustable().setValue(e.getAdjustable().getMaximum());
                }
                shouldScrollToBottom = false;
View Full Code Here


    }

    public void testAddGetRemoveAdjustmentListener() {
        assertEquals(0, scrollbar.getAdjustmentListeners().length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent ae) {
            }
        };
        scrollbar.addAdjustmentListener(listener);
        assertEquals(1, scrollbar.getAdjustmentListeners().length);
View Full Code Here

        assertEquals(0, scrollbar.getAdjustmentListeners().length);
    }

    public void testProcessAdjustmentEvent() {
        eventProcessed = false;
        scrollbar.addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent arg0) {
                eventProcessed = true;
            }
        });
        scrollbar.processEvent(new AdjustmentEvent(scrollbar,
View Full Code Here

    public void testGetListenersClass() {
        Class<AdjustmentListener> cls = AdjustmentListener.class;
        assertEquals(0, scrollbar.getListeners(cls).length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent arg0) {
            }
        };
        scrollbar.addAdjustmentListener(listener);
        assertEquals(1, scrollbar.getListeners(cls).length);
View Full Code Here

    }

    public void testAddGetRemoveAdjustmentListener() {
        assertEquals(0, vAdjustable.getAdjustmentListeners().length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent ae) {
            }
        };
        vAdjustable.addAdjustmentListener(listener);
        assertEquals(1, vAdjustable.getAdjustmentListeners().length);
View Full Code Here

    }

    public void testAddGetRemoveAdjustmentListener() {
        assertEquals(0, scrollbar.getAdjustmentListeners().length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent ae) {
            }
        };
        scrollbar.addAdjustmentListener(listener);
        assertEquals(1, scrollbar.getAdjustmentListeners().length);
View Full Code Here

        assertEquals(0, scrollbar.getAdjustmentListeners().length);
    }

    public void testProcessAdjustmentEvent() {
        eventProcessed = false;
        scrollbar.addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent arg0) {
                eventProcessed = true;
            }
        });
        scrollbar.processEvent(new AdjustmentEvent(scrollbar,
View Full Code Here

    public void testGetListenersClass() {
        Class<AdjustmentListener> cls = AdjustmentListener.class;
        assertEquals(0, scrollbar.getListeners(cls).length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent arg0) {
            }
        };
        scrollbar.addAdjustmentListener(listener);
        assertEquals(1, scrollbar.getListeners(cls).length);
View Full Code Here

    }

    public void testAddGetRemoveAdjustmentListener() {
        assertEquals(0, vAdjustable.getAdjustmentListeners().length);

        AdjustmentListener listener = new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent ae) {
            }
        };
        vAdjustable.addAdjustmentListener(listener);
        assertEquals(1, vAdjustable.getAdjustmentListeners().length);
View Full Code Here

        assertEquals(0, testList.size());
    }

    public void testAdjustmentListener() throws Exception {
        final List<String> test = new Vector<String>();
        bar.addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(final AdjustmentEvent e) {
                test.add("1");
            }
        });
        assertEquals(0, test.size());
View Full Code Here

TOP

Related Classes of java.awt.event.AdjustmentListener

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.