Package javax.swing

Examples of javax.swing.JInternalFrame$JDesktopIconTest


  }

  private void testConstructor2(TestHarness harness)
  {
    harness.checkPoint("(String)");
    JInternalFrame f = new JInternalFrame("Title");
    harness.check(f.getTitle(), "Title");
    harness.check(f.getDesktopPane(), null);
    harness.check(f.getDefaultCloseOperation(),
            JInternalFrame.DISPOSE_ON_CLOSE);
    harness.check(f.getLayer(), JLayeredPane.DEFAULT_LAYER.intValue());
    harness.check(!f.isResizable());
    harness.check(!f.isClosable());
    harness.check(!f.isMaximizable());
    harness.check(!f.isIconifiable());
   
    f = new JInternalFrame(null);
    harness.check(f.getTitle(), null);
  }
View Full Code Here


  }

  private void testConstructor3(TestHarness harness)
  {
    harness.checkPoint("(String, boolean)");
    JInternalFrame f = new JInternalFrame("Title", true);
    harness.check(f.getTitle(), "Title");
    harness.check(f.getDesktopPane(), null);
    harness.check(f.getDefaultCloseOperation(),
            JInternalFrame.DISPOSE_ON_CLOSE);
    harness.check(f.getLayer(), JLayeredPane.DEFAULT_LAYER.intValue());
    harness.check(f.isResizable());
    harness.check(!f.isClosable());
    harness.check(!f.isMaximizable());
    harness.check(!f.isIconifiable());

    f = new JInternalFrame(null, false);
    harness.check(f.getTitle(), null);
  }
View Full Code Here

  }

  private void testConstructor4(TestHarness harness)
  {
    harness.checkPoint("(String, boolean, boolean)");
    JInternalFrame f = new JInternalFrame("Title", false, true);
    harness.check(f.getTitle(), "Title");
    harness.check(f.getDesktopPane(), null);
    harness.check(f.getDefaultCloseOperation(),
            JInternalFrame.DISPOSE_ON_CLOSE);
    harness.check(f.getLayer(), JLayeredPane.DEFAULT_LAYER.intValue());
    harness.check(!f.isResizable());
    harness.check(f.isClosable());
    harness.check(!f.isMaximizable());
    harness.check(!f.isIconifiable());

    f = new JInternalFrame(null, false, false);
    harness.check(f.getTitle(), null);
  }
View Full Code Here

  }

  private void testConstructor5(TestHarness harness)
  {
    harness.checkPoint("(String, boolean, boolean, boolean)");
    JInternalFrame f = new JInternalFrame("Title", false, false, true);
    harness.check(f.getTitle(), "Title");
    harness.check(f.getDesktopPane(), null);
    harness.check(f.getDefaultCloseOperation(),
            JInternalFrame.DISPOSE_ON_CLOSE);
    harness.check(f.getLayer(), JLayeredPane.DEFAULT_LAYER.intValue());
    harness.check(!f.isResizable());
    harness.check(!f.isClosable());
    harness.check(f.isMaximizable());
    harness.check(!f.isIconifiable());

    f = new JInternalFrame(null, false, false, false);
    harness.check(f.getTitle(), null);
  }
View Full Code Here

  }

  private void testConstructor6(TestHarness harness)
  {
    harness.checkPoint("(String, boolean, boolean, boolean, boolean)");
    JInternalFrame f = new JInternalFrame("Title", false, false, false, true);
    harness.check(f.getTitle(), "Title");
    harness.check(f.getDesktopPane(), null);
    harness.check(f.getDefaultCloseOperation(),
            JInternalFrame.DISPOSE_ON_CLOSE);
    harness.check(f.getLayer(), JLayeredPane.DEFAULT_LAYER.intValue());
    harness.check(!f.isResizable());
    harness.check(!f.isClosable());
    harness.check(!f.isMaximizable());
    harness.check(f.isIconifiable());

    f = new JInternalFrame(null, false, false, false, false);
    harness.check(f.getTitle(), null);
  }
View Full Code Here

   * @param h the test harness to use
   */
  private void testBoundProperty(TestHarness h)
  {
    h.checkPoint("testBoundProperty");
    JInternalFrame t = new JInternalFrame();
    t.addPropertyChangeListener(new TestPropertyChangeHandler());
    try
      {
        t.setClosed(false);
        propertyChanged = null;
        t.setClosed(true);
        h.check(propertyChanged, "closed");
      }
    catch (PropertyVetoException ex)
      {
        h.fail(ex.getMessage());
View Full Code Here

public class getAccessibleRole implements Testlet
{
  public void test(TestHarness harness)
  {
    JInternalFrame f = new JInternalFrame("Title");
    AccessibleContext ac = f.getAccessibleContext();
    harness.check(ac.getAccessibleRole(), AccessibleRole.INTERNAL_FRAME)
  }
View Full Code Here

public class getCurrentAccessibleValue implements Testlet
{
  public void test(TestHarness harness)
  {
    JInternalFrame f = new JInternalFrame("Title");
    AccessibleContext ac = f.getAccessibleContext();
    AccessibleValue av = ac.getAccessibleValue();
    // by trial and error I found that this is equal to the frame's layer
    harness.check(av.getCurrentAccessibleValue(), JLayeredPane.DEFAULT_LAYER);
    f.setLayer(JLayeredPane.PALETTE_LAYER);
    harness.check(av.getCurrentAccessibleValue(), JLayeredPane.PALETTE_LAYER);
  }
View Full Code Here

    lastEvent = event;
  }
 
  public void test(TestHarness harness)
  {
    JInternalFrame f = new JInternalFrame("Title");
    JDesktopIcon icon = f.getDesktopIcon();
    AccessibleContext ac = icon.getAccessibleContext();
    AccessibleValue av = ac.getAccessibleValue();
   
    // by trial and error, I determined that the "value" is the frame's layer
    harness.check(av.getCurrentAccessibleValue(), JLayeredPane.DEFAULT_LAYER);
    ac.addPropertyChangeListener(this);
    av.setCurrentAccessibleValue(JLayeredPane.PALETTE_LAYER);
    harness.check(f.getLayer(), JLayeredPane.PALETTE_LAYER.intValue());
    harness.check(lastEvent, null)// no event is generated
   
    boolean set = av.setCurrentAccessibleValue(null);
    harness.check(!set);
    harness.check(f.getLayer(), JLayeredPane.PALETTE_LAYER.intValue());
  }
View Full Code Here

public class getAccessibleName implements Testlet
{
  public void test(TestHarness harness)
  {
    JInternalFrame f = new JInternalFrame("Title");
    AccessibleContext ac = f.getAccessibleContext();
    harness.check(ac.getAccessibleName(), "Title");
    f.setTitle(null);
    harness.check(ac.getAccessibleName(), null);   
  }
View Full Code Here

TOP

Related Classes of javax.swing.JInternalFrame$JDesktopIconTest

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.