public void cellSizeUpdated(Object cell,boolean ignoreChildren){
  if (cell != null) {
    model.beginUpdate();
    try {
      mxRectangle size=getPreferredSizeForCell(cell);
      mxGeometry geo=model.getGeometry(cell);
      if (size != null && geo != null) {
        boolean collapsed=isCellCollapsed(cell);
        geo=(mxGeometry)geo.clone();
        if (isSwimlane(cell)) {
          mxCellState state=view.getState(cell);
          Map<String,Object> style=(state != null) ? state.getStyle() : getCellStyle(cell);
          String cellStyle=model.getStyle(cell);
          if (cellStyle == null) {
            cellStyle="";
          }
          if (mxUtils.isTrue(style,mxConstants.STYLE_HORIZONTAL,true)) {
            cellStyle=mxUtils.setStyle(cellStyle,mxConstants.STYLE_STARTSIZE,String.valueOf(size.getHeight() + 8));
            if (collapsed) {
              geo.setHeight(size.getHeight() + 8);
            }
            geo.setWidth(size.getWidth());
          }
 else {
            cellStyle=mxUtils.setStyle(cellStyle,mxConstants.STYLE_STARTSIZE,String.valueOf(size.getWidth() + 8));
            if (collapsed) {
              geo.setWidth(size.getWidth() + 8);
            }
            geo.setHeight(size.getHeight());
          }
          model.setStyle(cell,cellStyle);
        }
 else {
          geo.setWidth(size.getWidth());
          geo.setHeight(size.getHeight());
        }
        if (!ignoreChildren && !collapsed) {
          mxRectangle bounds=view.getBounds(mxGraphModel.getChildren(model,cell));
          if (bounds != null) {
            mxPoint tr=view.getTranslate();
            double scale=view.getScale();
            double width=(bounds.getX() + bounds.getWidth()) / scale - geo.getX() - tr.getX();
            double height=(bounds.getY() + bounds.getHeight()) / scale - geo.getY() - tr.getY();
            geo.setWidth(Math.max(geo.getWidth(),width));
            geo.setHeight(Math.max(geo.getHeight(),height));
          }
        }
        cellsResized(new Object[]{cell},new mxRectangle[]{geo});
      }
    }
  finally {
      model.endUpdate();
    }
  }
}

public void cellSizeUpdated ( Object cell , boolean ignoreChildren ) { if ( cell != null ) { model . beginUpdate ( ) ; try { mxRectangle size = getPreferredSizeForCell ( cell ) ; mxGeometry geo = model . getGeometry ( cell ) ; if ( size != null && geo != null ) { boolean collapsed = isCellCollapsed ( cell ) ; geo = ( mxGeometry ) geo . clone ( ) ; if ( isSwimlane ( cell ) ) { mxCellState state = view . getState ( cell ) ; Map < String , Object > style = ( state != null ) ? state . getStyle ( ) : getCellStyle ( cell ) ; String cellStyle = model . getStyle ( cell ) ; if ( cellStyle == null ) { cellStyle = "" ; } if ( mxUtils . isTrue ( style , mxConstants . STYLE_HORIZONTAL , true ) ) { cellStyle = mxUtils . setStyle ( cellStyle , mxConstants . STYLE_STARTSIZE , String . valueOf ( size . getHeight ( ) + 8 ) ) ; if ( collapsed ) { geo . setHeight ( size . getHeight ( ) + 8 ) ; } geo . setWidth ( size . getWidth ( ) ) ; } else { cellStyle = mxUtils . setStyle ( cellStyle , mxConstants . STYLE_STARTSIZE , String . valueOf ( size . getWidth ( ) + 8 ) ) ; if ( collapsed ) { geo . setWidth ( size . getWidth ( ) + 8 ) ; } geo . setHeight ( size . getHeight ( ) ) ; } model . setStyle ( cell , cellStyle ) ; } else { geo . setWidth ( size . getWidth ( ) ) ; geo . setHeight ( size . getHeight ( ) ) ; } if ( ! ignoreChildren && ! collapsed ) { mxRectangle bounds = view . getBounds ( mxGraphModel . getChildren ( model , cell ) ) ; if ( bounds != null ) { mxPoint tr = view . getTranslate ( ) ; double scale = view . getScale ( ) ; double width = ( bounds . getX ( ) + bounds . getWidth ( ) ) / scale - geo . getX ( ) - tr . getX ( ) ; double height = ( bounds . getY ( ) + bounds . getHeight ( ) ) / scale - geo . getY ( ) - tr . getY ( ) ; geo . setWidth ( Math . max ( geo . getWidth ( ) , width ) ) ; geo . setHeight ( Math . max ( geo . getHeight ( ) , height ) ) ; } } cellsResized ( new Object [ ] { cell } , new mxRectangle [ ] { geo } ) ; } } finally { model . endUpdate ( ) ; } } }
updates the size of the given cell in the model using getpreferredsizeforcell to get the new size .
