Package javax.swing

Examples of javax.swing.JDesktopPane$AccessibleJDesktopPane


    return true;
  }

  @Override
  protected Component createWidget() {
    JDesktopPane pane = new JDesktopPane();
    Dimension size = new Dimension(100, 100);
    pane.setSize(size);
    return pane;
  }
View Full Code Here


    return true;
  }

  @Override
  public Component getChild(int index) {
    JDesktopPane jdp = (JDesktopPane) getWidget();
    JInternalFrame[] frames = jdp.getAllFrames();
    return frames[index];
  }
View Full Code Here

    return frames[index];
  }

  @Override
  public int getChildCount() {
    JDesktopPane desktopPane = (JDesktopPane) getWidget();
    JInternalFrame[] frames = desktopPane.getAllFrames();
    int count = frames == null ? 0 : frames.length;
    return count;
  }
View Full Code Here

    return count;
  }

  @Override
  public int getIndexOfChild(Component child) {
    JDesktopPane desktopPane = (JDesktopPane) getWidget();
    JInternalFrame[] frames = desktopPane.getAllFrames();
    for (int i = 0; i < frames.length; i++) {
      if (frames[i] == child)
        return i;
    }
    return -1;
View Full Code Here

    return -1;
  }

  @Override
  public Component cloneWidget() {
    JDesktopPane copy = (JDesktopPane) super.cloneWidget();
    JDesktopPane pane = (JDesktopPane) getWidget();
    for (JInternalFrame frame : pane.getAllFrames()) {
      WidgetAdapter adapter = WidgetAdapter.getWidgetAdapter(frame);
      JInternalFrame copy_frame = (JInternalFrame) adapter.cloneWidget();
      copy.add(copy_frame);
      copy_frame.setVisible(true);
    }
View Full Code Here

  }


  @Override
  protected Component newWidget() {
    return new JDesktopPane();
  }
View Full Code Here

  }

  @Override
  public void addChildByConstraints(Component child, Object constraints) {
    JInternalFrame jif = (JInternalFrame)child;
    JDesktopPane jtp = (JDesktopPane) getWidget();
    jif.setBounds((Rectangle)constraints);
    jtp.add(jif);
    jif.setVisible(true);
    clearAllSelected();
    WidgetAdapter.getWidgetAdapter(child).setSelected(true);
    getWidget().validate();
    jif.toFront();
View Full Code Here

  @Override
  public boolean drop(Point p) {
    if(isDroppingPopup())
      return super.drop(p);
    if (!isForbid()) {
      JDesktopPane jtp = (JDesktopPane) adaptable.getWidget();
      adaptable.clearAllSelected();     
      for (WidgetAdapter drop : adaptable.getDropWidget()) {
        JInternalFrame jif = (JInternalFrame) drop.getWidget();
        Point htsp = drop.getHotspotPoint();
        int state = adaptable.getState();
        switch (state) {
        case Azimuth.STATE_BEAN_HOVER:
          jif.setLocation(p.x - htsp.x, p.y - htsp.y);
          break;
        default:
          Point pt = adaptable.getMascotLocation();
          jif.setLocation(pt.x - htsp.x, pt.y - htsp.y);
          break;
        }
        jtp.add(jif);
        drop.requestNewName();
        jif.setVisible(true);
        drop.setSelected(true);
        drop.setDirty(true);
        jif.toFront();       
View Full Code Here

   *
   * @param harness the test harness to use
   */
  public void test(TestHarness harness)
  {
    JDesktopPane p = new JDesktopPane();
    harness.check(p.isOpaque(), true);
    harness.check(p.getLayout(), null);
  }
View Full Code Here

  {
    lastEvent = event;
  }
  public void test(TestHarness harness)
  {
    JDesktopPane desktop = new JDesktopPane();
    JInternalFrame f = new JInternalFrame("Title");
    desktop.add(f);
    f.addPropertyChangeListener(this);
    harness.check(f.getNormalBounds(), new Rectangle());
    f.setBounds(4, 3, 2, 1);
    harness.check(f.getNormalBounds(), new Rectangle(4, 3, 2, 1));
   
View Full Code Here

TOP

Related Classes of javax.swing.JDesktopPane$AccessibleJDesktopPane

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.