Package javax.swing

Examples of javax.swing.AbstractButton.addPropertyChangeListener()


  }

  public void test(TestHarness harness)
  {
    AbstractButton b = new JButton("ABC");
    b.addPropertyChangeListener(this);
    b.setVerticalTextPosition(SwingConstants.TOP);
    harness.check(b.getVerticalTextPosition(), SwingConstants.TOP);
    PropertyChangeEvent e = (PropertyChangeEvent) events.get(0);
    harness.check(e.getSource(), b);
    harness.check(e.getPropertyName(), "verticalTextPosition");
View Full Code Here


  }

  public void test(TestHarness harness)
  {
    AbstractButton b = new JButton("ABC");
    b.addPropertyChangeListener(this);
    b.setVerticalAlignment(SwingConstants.BOTTOM);
    harness.check(b.getVerticalAlignment(), SwingConstants.BOTTOM);
    PropertyChangeEvent e = (PropertyChangeEvent) events.get(0);
    harness.check(e.getSource(), b);
    harness.check(e.getPropertyName(), "verticalAlignment");
View Full Code Here

  }

  public void test(TestHarness harness)
  {
    AbstractButton b = new JButton("ABC");
    b.addPropertyChangeListener(this);
    b.setHorizontalAlignment(SwingConstants.RIGHT);
    harness.check(b.getHorizontalAlignment(), SwingConstants.RIGHT);
    PropertyChangeEvent e = (PropertyChangeEvent) events.get(0);
    harness.check(e.getSource(), b);
    harness.check(e.getPropertyName(), "horizontalAlignment");
View Full Code Here

  {
    Icon icon1 = MetalIconFactory.getFileChooserNewFolderIcon();
    Icon icon2 = MetalIconFactory.getHorizontalSliderThumbIcon();
    AbstractButton b = new JButton("123");
    b.setRolloverEnabled(false);
    b.addPropertyChangeListener(this);
    b.setRolloverIcon(icon1);
    harness.check(b.getRolloverIcon(), icon1);
    harness.check(events.size(), 2);
    PropertyChangeEvent e1 = (PropertyChangeEvent) events.get(0);
    harness.check(e1.getSource(), b);
View Full Code Here

      {
        // ignore
      }
    AbstractButton b = new JButton("Test");
    harness.check(b.isRolloverEnabled(), false);
    b.addPropertyChangeListener(this);   
    b.setRolloverEnabled(true);
    harness.check(b.isRolloverEnabled(), true);
    harness.check(this.event.getPropertyName(), "rolloverEnabled");
    harness.check(this.event.getSource(), b);
    harness.check(this.event.getOldValue(), Boolean.FALSE);
View Full Code Here

  {
    Icon icon1 = MetalIconFactory.getFileChooserNewFolderIcon();
    Icon icon2 = MetalIconFactory.getHorizontalSliderThumbIcon();
    AbstractButton b = new JButton("123");
    b.setRolloverEnabled(false);
    b.addPropertyChangeListener(this);
    b.setRolloverSelectedIcon(icon1);
    harness.check(b.getRolloverSelectedIcon(), icon1);
    harness.check(events.size(), 2);
    PropertyChangeEvent e1 = (PropertyChangeEvent) events.get(0);
    harness.check(e1.getSource(), b);
View Full Code Here

  }

  public void test(TestHarness harness)
  {
    AbstractButton b = new JButton("ABC");
    b.addPropertyChangeListener(this);
    b.setHorizontalTextPosition(SwingConstants.LEFT);
    harness.check(b.getHorizontalTextPosition(), SwingConstants.LEFT);
    PropertyChangeEvent e = (PropertyChangeEvent) events.get(0);
    harness.check(e.getSource(), b);
    harness.check(e.getPropertyName(), "horizontalTextPosition");
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.