コード例 #1
0
ファイル: FigClass.java プロジェクト: carvalhomb/tsmells
  /**
   * Updates the attributes in the fig. Called from modelchanged if there is a modelevent effecting
   * the attributes and from renderingChanged in all cases.
   */
  protected void updateAttributes() {
    if (!isAttributesVisible()) {
      return;
    }
    FigAttributesCompartment attributesCompartment = getAttributesFig();
    attributesCompartment.populate();

    Rectangle rect = getBounds();

    // ouch ugly but that's for a next refactoring
    // TODO: make setBounds, calcBounds and updateBounds consistent
    setBounds(rect.x, rect.y, rect.width, rect.height);
  }
コード例 #2
0
ファイル: FigClass.java プロジェクト: carvalhomb/tsmells
 /** @return The bounds of the attributes compartment. */
 public Rectangle getAttributesBounds() {
   return attributesFigCompartment.getBounds();
 }