Examples of LayoutManager


Examples of java.awt.LayoutManager

    /*
     * Class under test for void setLayout(LayoutManager)
     */
    public void testSetLayout() {
        TestInternalFrame frame = new TestInternalFrame();
        LayoutManager contentLayout = frame.getContentPane().getLayout();
        LayoutManager frameLayout = frame.getLayout();
        // rootPaneCheckingEnabled is true, no exception since 1.5
        frame.setRootPaneCheckingEnabled(true);
        boolean ok = false;
        try {
            frame.setLayout(new FlowLayout());
View Full Code Here

Examples of java.awt.LayoutManager

    return true;
  }

  @Override
  protected LayoutManager copyLayout(Container con) {
    LayoutManager layout = con.getLayout();
    if (layout == null || layout.getClass() != GroupLayout.class)
      return new GroupLayout();
    else
      return layout;
  }
View Full Code Here

Examples of java.awt.LayoutManager

        }

        public void react(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout == false ) lm = c.getLayout();

            if ( lm instanceof MigLayout ) {
                MigLayout layout = (MigLayout) lm;
                boolean isComp = layout.isManagingComponent( c );
View Full Code Here

Examples of java.awt.LayoutManager

    private static class ToolTipListener extends MouseMotionAdapter
    {
        public void mouseMoved(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout ) {
                Object constr = ((MigLayout) lm).getComponentConstraints( c );
                if ( constr instanceof String ) c.setToolTipText( (constr != null ? ("\"" + constr + "\"") : "null") );
            }
        }
View Full Code Here

Examples of java.awt.LayoutManager

        }

        public void react(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout == false ) lm = c.getLayout();

            if ( lm instanceof MigLayout ) {
                MigLayout layout = (MigLayout) lm;
                boolean isComp = layout.isManagingComponent( c );
View Full Code Here

Examples of java.awt.LayoutManager

    private static class ToolTipListener extends MouseMotionAdapter
    {
        public void mouseMoved(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout ) {
                Object constr = ((MigLayout) lm).getComponentConstraints( c );
                if ( constr instanceof String ) c.setToolTipText( (constr != null ? ("\"" + constr + "\"") : "null") );
            }
        }
View Full Code Here

Examples of java.awt.LayoutManager

    } else {
      testClass = comp.getClass();
    }
    try {
      Container container = (Container) testClass.newInstance();
      LayoutManager lm = container.getLayout();
      if (lm == null)
        return null;
      else
        return lm.getClass();
    } catch (Exception e) {
      return FlowLayout.class;
    }
  }
View Full Code Here

Examples of java.awt.LayoutManager

  @Override
  public Component cloneWidget() {
    JPanel panel = (JPanel) super.cloneWidget();
    JPanel jp = (JPanel) getWidget();
    LayoutManager layout = jp.getLayout();
    if (layout == null) {
      panel.setLayout(null);
      int count = this.getChildCount();
      for (int i = 0; i < count; i++) {
        Component widget = getChild(i);
View Full Code Here

Examples of java.awt.LayoutManager

  }

  @Override
  public void addAfter(Component hovering, Component dragged) {
    JPanel jpanel = (JPanel) getWidget();
    LayoutManager layout = jpanel.getLayout();
    if (layout == null) {
      int hoveringIndex = getComponentIndex(hovering);
      if (hoveringIndex == -1)
        jpanel.add(dragged);
      else if (hoveringIndex == jpanel.getComponentCount() - 1) {
View Full Code Here

Examples of java.awt.LayoutManager

  }

  @Override
  public void addBefore(Component hovering, Component dragged) {
    JPanel jpanel = (JPanel) getWidget();
    LayoutManager layout = jpanel.getLayout();
    if (layout == null) {
      int hoveringIndex = getComponentIndex(hovering);
      if (hoveringIndex == -1)
        jpanel.add(dragged, 0);
      else if (hoveringIndex == 0) {
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.