Package javax.swing

Examples of javax.swing.JApplet$AccessibleJApplet


    @RunsInEDT
    public JApplet createNew() {
      return execute(new GuiQuery<JApplet>() {
        @Override
        protected JApplet executeInEDT() {
          JApplet applet = new JApplet();
          applet.setName(name);
          return applet;
        }
      });
    }
View Full Code Here


import javax.swing.JMenuBar;

public class JAppletParser extends RootPaneContainerParser {
  @Override
  protected JMenuBar getJMenuBar() {
    JApplet japplet = (JApplet) adaptable.getWidget();
    JMenuBar jmb = japplet.getJMenuBar();
    return jmb;
  }
View Full Code Here

  }

  private void createContentAdapter() {
    contentAdapter = (JPanelAdapter) ExtensionRegistry.createWidgetAdapter(JPanel.class);
    contentAdapter.setDelegate(this);
    JApplet me = (JApplet) getWidget();
    JavaUtil.layoutContainer(me);
    contentPane = (JComponent) me.getContentPane();
    jrootPane = me.getRootPane();
    contentAdapter.setWidget(contentPane);
    contentAdapter.setDelegate(this);
  }
View Full Code Here

  }

  @Override
  public void addChildByConstraints(Component child, Object constraints) {
    if (child instanceof JMenuBar) {
      JApplet japplet = (JApplet) getWidget();
      japplet.setJMenuBar((JMenuBar) child);
    } else
      contentAdapter.addChildByConstraints(child, constraints);
  }
View Full Code Here

  }

  @Override
  public void clearSelection() {
    setSelected(false);
    JApplet japplet = (JApplet) getWidget();
    JMenuBar jmb = japplet.getJMenuBar();
    if (jmb != null) {
      WidgetAdapter jmbAdapter = WidgetAdapter.getWidgetAdapter(jmb);
      jmbAdapter.clearSelection();
    }
    contentAdapter.clearSelection();
View Full Code Here

    contentAdapter.clearSelection();
  }

  @Override
  protected Component createWidget() {
    return new JApplet();
  }
View Full Code Here

    return bounds;
  }

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

  }

  @Override
  public Component cloneWidget() {
    JRootPane jrp = new JRootPane();
    JApplet japplet = (JApplet) getWidget();
    JMenuBar jmb = japplet.getJMenuBar();
    if (jmb != null) {
      WidgetAdapter jmbAdapter = WidgetAdapter.getWidgetAdapter(jmb);
      JMenuBar jmenubar = (JMenuBar) jmbAdapter.cloneWidget();
      jrp.setJMenuBar(jmenubar);
    }
View Full Code Here

    return contentAdapter.doKeyPressed(e);
  }

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

      return contentAdapter.getChild(index - 1);
  }

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

TOP

Related Classes of javax.swing.JApplet$AccessibleJApplet

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.