Package com.google.gdt.eclipse.designer.gxt.model.widgets.PortalInfo

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.PortalInfo.ColumnInfo


  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void decorateChild(EditPart child) {
    Object model = child.getModel();
    if (model instanceof ColumnInfo) {
      ColumnInfo column = (ColumnInfo) model;
      child.installEditPolicy(
          EditPolicy.SELECTION_ROLE,
          new PortalColumnSelectionEditPolicy(column));
    }
  }
View Full Code Here


  }

  private void command_CREATE(Object newObject, Object referenceObject) throws Exception {
    if (newObject instanceof PortletInfo) {
      PortletInfo portlet = (PortletInfo) newObject;
      ColumnInfo nextColumn = (ColumnInfo) referenceObject;
      ColumnInfo column = m_portal.command_CREATE(nextColumn);
      column.command_CREATE(portlet, null);
    }
  }
View Full Code Here

    }
  }

  private void command_MOVE(Object object, Object referenceObject) throws Exception {
    if (object instanceof ColumnInfo) {
      ColumnInfo column = (ColumnInfo) object;
      ColumnInfo nextColumn = (ColumnInfo) referenceObject;
      m_portal.command_MOVE(column, nextColumn);
    }
    if (object instanceof PortletInfo) {
      PortletInfo portlet = (PortletInfo) object;
      ColumnInfo nextColumn = (ColumnInfo) referenceObject;
      ColumnInfo column = m_portal.command_CREATE(nextColumn);
      column.command_MOVE(portlet, null);
    }
  }
View Full Code Here

    List<ColumnInfo> columns = portal.getColumns();
    assertThat(columns).hasSize(2);
    // test getBounds()
    assertEquals(new Rectangle(0, 0, 450, 300), portal.getBounds());
    {
      ColumnInfo column = columns.get(0);
      assertEquals(new Rectangle(10, 0, 151, 300), column.getBounds());
      assertEquals(0.7, column.getWidth(), 1E-10);
    }
    {
      ColumnInfo column = columns.get(1);
      assertEquals(new Rectangle(171, 0, 190, 300), column.getBounds());
      assertEquals(200.0, column.getWidth(), 1E-10);
    }
  }
View Full Code Here

    // prepare columns
    List<ColumnInfo> columns = portal.getColumns();
    assertThat(columns).hasSize(2);
    //
    {
      ColumnInfo column = columns.get(0);
      assertSame(portal, column.getPortal());
      assertThat(column.getPortlets()).containsExactly(portlets.get(0), portlets.get(1));
    }
    {
      ColumnInfo column = columns.get(1);
      assertSame(portal, column.getPortal());
      assertThat(column.getPortlets()).containsExactly(portlets.get(2));
    }
  }
View Full Code Here

            "    setColumnWidth(0, 0.7);",
            "  }",
            "}");
    portal.refresh();
    //
    ColumnInfo column = portal.getColumns().get(0);
    column.setWidth(100);
    assertEditor(
        "public class Test extends Portal {",
        "  public Test() {",
        "    super(1);",
        "    setColumnWidth(0, 100.0);",
View Full Code Here

            "    setEnabled(true);",
            "  }",
            "}");
    portal.refresh();
    //
    ColumnInfo column = portal.getColumns().get(0);
    column.setWidth(100);
    assertEditor(
        "public class Test extends Portal {",
        "  public Test() {",
        "    super(5);",
        "    setColumnWidth(0, 100.0);",
View Full Code Here

            "    setEnabled(true);",
            "  }",
            "}");
    portal.refresh();
    //
    ColumnInfo column = portal.getColumns().get(4);
    column.setWidth(100);
    assertEditor(
        "public class Test extends Portal {",
        "  public Test() {",
        "    super(5);",
        "    setColumnWidth(2, 0.1);",
View Full Code Here

            "    setEnabled(true);",
            "  }",
            "}");
    portal.refresh();
    //
    ColumnInfo column = portal.getColumns().get(2);
    column.setWidth(100);
    assertEditor(
        "public class Test extends Portal {",
        "  public Test() {",
        "    super(5);",
        "    setColumnWidth(2, 100.0);",
View Full Code Here

    portal.startEdit();
    //
    ExecutionUtils.run(portal, new RunnableEx() {
      public void run() throws Exception {
        List<ColumnInfo> columns = portal.getColumns();
        ColumnInfo nextColumn = columns.get(1);
        ColumnInfo newColumn = portal.command_CREATE(nextColumn);
        assertEquals(1, columns.indexOf(newColumn));
        assertEquals(2, columns.indexOf(nextColumn));
      }
    });
    assertEditor(
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gxt.model.widgets.PortalInfo.ColumnInfo

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.