Package javax.swing

Examples of javax.swing.JList.addPropertyChangeListener()


    catch (UnsupportedLookAndFeelException e)
    {
      e.printStackTrace();
    }
    JList list = new JList();
    list.addPropertyChangeListener(this);
    harness.check(list.getBackground(),
        MetalLookAndFeel.getWindowBackground());
   
    list.setBackground(Color.yellow);
    harness.check(list.getBackground(), Color.yellow);
View Full Code Here


    catch (UnsupportedLookAndFeelException e)
    {
      e.printStackTrace();
    }
    JList list = new JList();
    list.addPropertyChangeListener(this);

    DefaultListModel m = new DefaultListModel();
    list.setModel(m);
    harness.check(list.getModel(), m);
    harness.check(events.size(), 1);
View Full Code Here

 
 
  public void test(TestHarness harness)
  {
    JList list = new JList();
    list.addPropertyChangeListener(this);
    harness.check(list.getLayoutOrientation(), JList.VERTICAL);
    list.setLayoutOrientation(JList.HORIZONTAL_WRAP);
    harness.check(list.getLayoutOrientation(), JList.HORIZONTAL_WRAP);
    harness.check(events.size(), 1);
    PropertyChangeEvent e0 = (PropertyChangeEvent) events.get(0);
View Full Code Here

    catch (UnsupportedLookAndFeelException e)
    {
      e.printStackTrace();
    }
    JList list = new JList();
    list.addPropertyChangeListener(this);
    harness.check(list.getSelectionBackground(),
        MetalLookAndFeel.getTextHighlightColor());
   
    list.setSelectionBackground(Color.yellow);
    harness.check(list.getSelectionBackground(), Color.yellow);
View Full Code Here

  public void test(TestHarness harness)
  {
    JList list = new JList();
    harness.check(list.getVisibleRowCount(), 8);
    list.addPropertyChangeListener(this);
    list.setVisibleRowCount(13);
    harness.check(list.getVisibleRowCount(), 13);
    harness.check(events.size(), 1);
    PropertyChangeEvent e0 = (PropertyChangeEvent) events.get(0);
    harness.check(e0.getSource(), list);
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.