/** @generated */
 public IBorderItemLocator getBorderItemLocator() {
   IFigure parentFigure = getFigure().getParent();
   if (parentFigure != null && parentFigure.getLayoutManager() != null) {
     Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
     return (IBorderItemLocator) constraint;
   }
   return null;
 }
 /**
  * Default implementation treats passed figure as content pane. Respects layout one may have set
  * for generated figure.
  *
  * @param nodeShape instance of generated figure class
  * @generated
  */
 protected IFigure setupContentPane(IFigure nodeShape) {
   if (nodeShape.getLayoutManager() == null) {
     ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
     layout.setSpacing(5);
     nodeShape.setLayoutManager(layout);
   }
   return nodeShape; // use nodeShape itself as contentPane
 }
  /**
   * Default implementation treats passed figure as content pane. Respects layout one may have set
   * for generated figure.
   *
   * @param nodeShape instance of generated figure class
   * @generated
   */
  protected IFigure setupContentPane(IFigure nodeShape) {
    if (nodeShape.getLayoutManager() == null) {
      nodeShape.setLayoutManager(
          new FreeformLayout() {

            public Object getConstraint(IFigure figure) {
              Object result = constraints.get(figure);
              if (result == null) {
                result = new Rectangle(0, 0, -1, -1);
              }
              return result;
            }
          });
    }
    return nodeShape; // use nodeShape itself as contentPane
  }