コード例 #1
0
 @Override
 protected void onDetach() {
   getTarget().children().clear();
   myPopupManager.dispose();
   myContext.unregister(this);
   super.onDetach();
 }
コード例 #2
0
  @Override
  protected void onAttach(MappingContext ctx) {
    super.onAttach(ctx);

    myContext.register(this);

    if (isAutoChildManagement()) {
      myChildMappers = createChildList();
      ObservableList<Cell> children = getSource().children();
      for (int i = 0; i < children.size(); i++) {
        childAdded(i, children.get(i));
      }
    }

    myPopupManager = createPopupManager();
    myPopupManager.attach(getSource());

    refreshProperties();
  }
コード例 #3
0
 void childAdded(int index, Cell child) {
   if (!isAutoChildManagement()) return;
   BaseCellMapper<? extends Cell, ? extends View> mapper = myContext.apply(child);
   getTarget().children().add(index, mapper.getTarget());
   myChildMappers.add(index, mapper);
 }