Package com.esotericsoftware.tablelayout

Examples of com.esotericsoftware.tablelayout.Cell


    super.layout();

    List<Cell> cells = getCells();
    for (int i = 0, n = cells.size(); i < n; i++) {
      Cell c = cells.get(i);
      if (c.getIgnore()) continue;
      Actor actor = (Actor)c.getWidget();
      actor.x = c.getWidgetX();
      int widgetHeight = c.getWidgetHeight();
      actor.y = table.height - c.getWidgetY() - widgetHeight;
      actor.width = c.getWidgetWidth();
      actor.height = widgetHeight;
      if (actor instanceof Layout) {
        Layout layout = (Layout)actor;
        layout.invalidate();
        layout.layout();
View Full Code Here


    return layout.add(actor);
  }

  public boolean removeActor (Actor actor) {
    if (!super.removeActor(actor)) return false;
    Cell cell = getCell(actor);
    if (cell != null) cell.setWidget(null);
    return true;
  }
View Full Code Here

    super.layout(0, 0, width, height);

    java.util.List<Cell> cells = getCells();
    if (round) {
      for (int i = 0, n = cells.size(); i < n; i++) {
        Cell c = cells.get(i);
        if (c.getIgnore()) continue;
        float widgetWidth = Math.round(c.getWidgetWidth());
        float widgetHeight = Math.round(c.getWidgetHeight());
        float widgetX = Math.round(c.getWidgetX());
        float widgetY = height - Math.round(c.getWidgetY()) - widgetHeight;
        c.setWidgetBounds(widgetX, widgetY, widgetWidth, widgetHeight);
        Actor actor = (Actor)c.getWidget();
        if (actor != null) actor.setBounds(widgetX, widgetY, widgetWidth, widgetHeight);
      }
    } else {
      for (int i = 0, n = cells.size(); i < n; i++) {
        Cell c = cells.get(i);
        if (c.getIgnore()) continue;
        float widgetHeight = c.getWidgetHeight();
        float widgetY = height - c.getWidgetY() - widgetHeight;
        c.setWidgetY(widgetY);
        Actor actor = (Actor)c.getWidget();
        if (actor != null) actor.setBounds(c.getWidgetX(), widgetY, c.getWidgetWidth(), widgetHeight);
      }
    }
    // Validate children separately from sizing actors to ensure actors without a cell are validated.
    Array<Actor> children = table.getChildren();
    for (int i = 0, n = children.size; i < n; i++) {
View Full Code Here

      layout.add(actors[i]);
  }

  public boolean removeActor (Actor actor) {
    if (!super.removeActor(actor)) return false;
    Cell cell = getCell(actor);
    if (cell != null) cell.setWidget(null);
    return true;
  }
View Full Code Here

      layout.add(actors[i]);
  }

  public boolean removeActor (Actor actor) {
    if (!super.removeActor(actor)) return false;
    Cell cell = getCell(actor);
    if (cell != null) cell.setWidget(null);
    return true;
  }
View Full Code Here

TOP

Related Classes of com.esotericsoftware.tablelayout.Cell

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.