Package javax.swing

Examples of javax.swing.JInternalFrame$JDesktopIconTest$MyPropertyChangeListener


    return super.getDropWidget();
  }

  public WidgetAdapter getRootAdapter() {
    if (isInternalFrameContentPane()) {
      JInternalFrame jif = getTopFrame();
      return WidgetAdapter.getWidgetAdapter(jif).getRootAdapter();
    }
    return super.getRootAdapter();
  }
View Full Code Here


  }

  @Override
  public boolean isRoot() {
    if (isInternalFrameContentPane()) {
      JInternalFrame jif = getTopFrame();
      return WidgetAdapter.getWidgetAdapter(jif).isRoot();
    } else if (delegate != null)
      return delegate.isRoot();
    return super.isRoot();
  }
View Full Code Here

    CompositeAdapter content = getContentAdapter();
    content.doLayout();
  }
  public boolean removeChild(Component child) {
    if (child instanceof JMenuBar) {
      JInternalFrame jframe = (JInternalFrame) getWidget();
      jframe.setJMenuBar(null);
      return true;
    } else
      return getContentAdapter().removeChild(child);
 
View Full Code Here

      return getContentAdapter().removeChild(child);
 
  @Override
  public void clearSelection() {
    setSelected(false);
    JInternalFrame jframe = (JInternalFrame) getWidget();
    JMenuBar jmb = jframe.getJMenuBar();
    if (jmb != null) {
      WidgetAdapter jmbAdapter = WidgetAdapter.getWidgetAdapter(jmb);
      jmbAdapter.clearSelection();
    }
    getContentAdapter().clearSelection();
View Full Code Here

    }
    getContentAdapter().clearSelection();
  }
  @Override
  public Component cloneWidget() {
    JInternalFrame copy = (JInternalFrame) super.cloneWidget();
    JInternalFrame jframe = (JInternalFrame) getWidget();
    JMenuBar jmb = jframe.getJMenuBar();
    if (jmb != null) {
      WidgetAdapter jmbAdapter = WidgetAdapter.getWidgetAdapter(jmb);
      JMenuBar copyjmb=(JMenuBar) jmbAdapter.cloneWidget();
      copy.setJMenuBar(copyjmb);
    }
View Full Code Here

  }
  public CompositeAdapter getContentAdapter() {
    if (contentAdapter == null) {
      contentAdapter = (JPanelAdapter) ExtensionRegistry.createWidgetAdapter(JPanel.class);
      ((JPanelAdapter) contentAdapter).setIntermediate(true);
      JInternalFrame jif = (JInternalFrame) getWidget();
      contentPane = (JPanel) jif.getContentPane();
      contentAdapter.setWidget(contentPane);
      contentAdapter.setDirty(false);
      contentAdapter.setName(getName());
      ((JPanelAdapter)contentAdapter).setDelegate(this);
    }
View Full Code Here

    return true;
  }

  @Override
  public boolean interceptPoint(Point p, int ad) {
    JInternalFrame comp = (JInternalFrame) getWidget();
    return p.x >= -ad
        && p.y >= -ad
        && p.x < comp.getWidth() + ad
        && p.y < comp.getHeight() + ad
        && !(p.x >= ad && p.y >= ad + TITLE_HEIGHT
            && p.x < comp.getWidth() - ad && p.y < comp.getHeight()
            - ad);
  }
View Full Code Here

  private static int TITLE_HEIGHT = 22;

  @Override
  protected Component createWidget() {
    JInternalFrame jif = new JInternalFrame();   
    Dimension size = new Dimension(100, 100);
    jif.setLayout(new GroupLayout());
    jif.setSize(size);
    JavaUtil.layoutContainer(jif);
    jif.validate();
    jif.addNotify();
    desktopPane.add(jif);
    jif.setVisible(true);
    return jif;
  }
View Full Code Here

  }


  @Override
  public Component getChild(int index) {
    JInternalFrame jif = (JInternalFrame) getWidget();
    JMenuBar jmb = jif.getJMenuBar();
    if (jmb == null)
      return getContentAdapter().getChild(index);
    else if (index == 0)
      return jmb;
    else
View Full Code Here

      return getContentAdapter().getChild(index - 1);
  }

  @Override
  public int getChildCount() {
    JInternalFrame jif = (JInternalFrame) getWidget();
    JMenuBar jmb=jif.getJMenuBar();   
    int count = getContentAdapter().getChildCount();
    return jmb==null?count:count+1;
  }
View Full Code Here

TOP

Related Classes of javax.swing.JInternalFrame$JDesktopIconTest$MyPropertyChangeListener

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.