Browse Source

set(Top,Bottom,Left,Right) modified to update BorderRectangle


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197780 13f79535-47bb-0310-9956-ffa450edef68
tags/Defoe_export
Peter Bernard West 20 years ago
parent
commit
aabfba4800
1 changed files with 59 additions and 2 deletions
  1. 59
    2
      src/java/org/apache/fop/area/PaddingRectangle.java

+ 59
- 2
src/java/org/apache/fop/area/PaddingRectangle.java View File

@@ -32,12 +32,28 @@ public class PaddingRectangle extends AreaFrame {
private static final String revision = "$Revision$";


public PaddingRectangle(Area area, Area.AreaGeometry content) {
/**
* Instantiates a <code>PaddingRectangle</code> within the given instance
* of <code>Area</code>, with the given <code>ContentRectangle</code> as
* content.
* @param area the containing area instance
* @param content the <i>content-rectangle</i> framed by this padding
*/
public PaddingRectangle(Area area, ContentRectangle content) {
super(area, content);
borders = new BorderRectangle(area, this);
}

/**
/**
* Instantiates a <code>PaddingRectangle</code> within the given instance
* of <code>Area</code>, with the given offset and dimension values, the
* given <code>ContentRectangle</code> as content at the given offset from
* the origin corner of the <i>padding-rectangle</i>.
* @param area the containing area instance
* @param ipOffset
* @param bpOffset
* @param ipDim
* @param bpDim
* @param contents
* @param contentOffset
*/
@@ -64,4 +80,45 @@ public class PaddingRectangle extends AreaFrame {
public BorderRectangle getBorders() {
return borders;
}

/**
* {@inheritDoc}
* <p>The containing <code>BorderRectangle</code> is notified of the
* change.
*/
public void setTop(double top) {
super.setTop(top);
borders.setContents(this);
}

/**
* {@inheritDoc}
* <p>The containing <code>BorderRectangle</code> is notified of the
* change.
*/
public void setLeft(double left) {
super.setLeft(left);
borders.setContents(this);
}

/**
* {@inheritDoc}
* <p>The containing <code>BorderRectangle</code> is notified of the
* change.
*/
public void setBottom(double bottom) {
super.setBottom(bottom);
borders.setContents(this);
}

/**
* {@inheritDoc}
* <p>The containing <code>BorderRectangle</code> is notified of the
* change.
*/
public void setRight(double right) {
super.setRight(right);
borders.setContents(this);
}

}

Loading…
Cancel
Save