コード例 #1
0
  public ActionCallback restoreLastUiState() {
    final ActionCallback result = new ActionCallback(myPlaceInGrid2Cell.values().size());
    for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) {
      cell.restoreLastUiState().notifyWhenDone(result);
    }

    return result;
  }
コード例 #2
0
 public List<SwitchTarget> getTargets(boolean onlyVisible) {
   Collection<GridCellImpl> cells = myPlaceInGrid2Cell.values();
   ArrayList<SwitchTarget> result = new ArrayList<SwitchTarget>();
   for (GridCellImpl each : cells) {
     result.addAll(each.getTargets(onlyVisible));
   }
   return result;
 }
コード例 #3
0
  public boolean updateGridUI() {
    for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) {
      cell.setHideTabs(myContents.size() == 1);
    }

    final Content onlyContent = myContents.get(0);

    return onlyContent.getSearchComponent() != null;
  }
コード例 #4
0
  public void processAddToUi(boolean restoreProportions) {
    if (restoreProportions) {
      for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) {
        cell.restoreProportions();
      }
    }

    updateSelection(true);
  }
コード例 #5
0
  @Nullable
  public SwitchTarget getCellFor(Component c) {
    Component eachParent = c;
    while (eachParent != null) {
      for (GridCellImpl eachCell : myContent2Cell.values()) {
        if (eachCell.contains(eachParent)) {
          return eachCell.getTargetForSelection();
        }
      }

      eachParent = eachParent.getParent();
    }

    return null;
  }
コード例 #6
0
 public void saveUiState() {
   for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) {
     cell.saveUiState();
   }
 }
コード例 #7
0
 public void setToolbarHorizontal(boolean horizontal) {
   for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) {
     cell.setToolbarHorizontal(horizontal);
   }
 }
コード例 #8
0
 private void updateSelection(boolean isShowing) {
   for (GridCellImpl each : myPlaceInGrid2Cell.values()) {
     each.updateSelection(isShowing);
   }
 }