|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Attachable
Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.
The Attachable interface is used to attach a report element to another. This can be used when the position
of an element depends on the size and/or position of another.
Once attached, all methods inherited from Position change behaviour; the x
coordinates become the distance to the attached anchors (when their anchor types are not
NONE)
For example, when a reportElement2 (which is an Attachable) is attached
to a reportElement1, using the method call
reportElement2.setAttachTo(reportElement1, VAnchorType.BOTTOM, HAnchorType.NONE), this will be rendered in the following way:
+--------------------------------+ | | | +---------------+ | | |reportElement1 | | | +---------------+ | | ^ | | | y | | v | | x +---------------+ | |<----->|reportElement2 | | | +---------------+ | | | +--------------------------------+
Attachments can be made using negative values, so Position.setX(double),
Position.setY(double) and Position.setLocation(double, double) will not throw an
IllegalArgumentException when their anchor type is not NONE.
| Method Summary | |
|---|---|
void |
deleteAttachment()
Removes attachments to other ReportElement objects. |
ReportElement |
getAttachTo()
Deprecated. use Attachable.getHAttachTo() or Attachable.getVAttachTo() |
ReportElement |
getHAttachTo()
Returns the ReportElement to which this element is attached horizontally. |
HAnchorType |
getHorizontalAnchor()
This method returns a HAnchorType indicating the way
in which this element is attached to another ReportElement horizontally. |
ReportElement |
getVAttachTo()
Returns the ReportElement to which this element is attached
vertically. |
VAnchorType |
getVerticalAnchor()
This method returns a VAnchorType indicating the way
in which this element is attached to another ReportElement vertically. |
void |
setAttachTo(ReportElement elem,
VAnchorType va,
HAnchorType ha)
This method is use to attach this ReportElement to another. |
void |
setAttachTo(ReportElement vElem,
VAnchorType va,
ReportElement hElem,
HAnchorType ha)
This method is used to attach this ReportElement to two other
ReportElement objects. |
| Methods inherited from interface com.businessobjects.rebean.wi.Position |
|---|
getX, getY, setLocation, setX, setY |
| Methods inherited from interface com.businessobjects.rebean.wi.Unit |
|---|
getUnit, setUnit |
| Method Detail |
|---|
void setAttachTo(ReportElement elem,
VAnchorType va,
HAnchorType ha)
throws REException
ReportElement to another.
Any existing attachment are removed when the ReportElement is attached.
Note: To remove an attachment, use Attachable.deleteAttachment()
or set ha to HAnchorType.NONE and va to VAnchorType.NONE.
elem - The ReportElement to attach to.va - The way in which this ReportElement is to be
attached to the ReportElement vertically. This can be any VAnchorType.ha - The way in which this ReportElement is to be
attached to the ReportElement horizontally. This can be any HAnchorType.
java.lang.NullPointerException - When va or ha are null
or when elem is null and ha != HAnchorType.NONE
and >va != VAnchorType.NONE.
java.lang.IllegalArgumentException - When elem is the current
ReportElement; you cannot attach a ReportElement to itself.
ReportException - when elem is not in the same
ReportElementContainer.
ReportException - when the current element is a section and
ha != HAnchorType.NONE. Sections
always have maximum width and thus cannot have a horizontal
attachment.
REException
void setAttachTo(ReportElement vElem,
VAnchorType va,
ReportElement hElem,
HAnchorType ha)
throws REException
ReportElement to two other
ReportElement objects. Any existing attachment are removed
when the ReportElement is attached.
Note:To remove an attachment, use Attachable.deleteAttachment() or set
ha = HAnchorType.NONE and va = VAnchorType.NONE.
To remove the element to which the current element is attached horizontally,
set ha = HAnchorType.NONE.
To remove the element to which the current element is attached vertically,
set va = VAnchorType.NONE.
vElem - The vertical ReportElement to attach to.va - The way in which this ReportElement is to be
attached to the vertical element vElem. This can be any VAnchorType.hElem - The horizontal ReportElement to attach to.ha - The way in which this ReportElement is to be
attached to the horizontal element hElem. This can be any HAnchorType.
java.lang.NullPointerException - When va or ha are null,
when vElem is null and va != VAnchorType.NONE
or hElem is null and ha != HAnchorType.NONE.
java.lang.IllegalArgumentException - When vElem or hElem are the current
report element; you cannot attach a ReportElement to itself.
ReportException - when hElem or vElem are not in the same
ReportElementContainer.
See ReportException.ATTACH_DIFFERENT_CONTAINER.
ReportException - when the current element is a section and
ha != HAnchorType.NONE. Sections
always have maximum width, thus cannot have a horizontal attachment.
See ReportException.HOR_ATTACHMENT_ON_SECTION.
REException
@Deprecated
ReportElement getAttachTo()
throws REException
Attachable.getHAttachTo() or Attachable.getVAttachTo()
ReportElement to which this ReportElement is
attached.
ReportElement to which this ReportElement is
attached. Returns null if no ReportElement is attached.
REExceptionReportElement getHAttachTo()
ReportElement to which this element is attached horizontally.
ReportElement to which this element is attached horizontally.
Returns null if no ReportElement is attached
horizontally. That is to say, when
Attachable.getHorizontalAnchor() == HAnchorType.NONE.ReportElement getVAttachTo()
ReportElement to which this element is attached
vertically.
ReportElement to which this element is attached vertically.
Returns null when no ReportElement is attached
vertically. That is to say, when
Attachable.getVerticalAnchor() == VAnchorType.NONE.VAnchorType getVerticalAnchor()
VAnchorType indicating the way
in which this element is attached to another ReportElement vertically.
ReportElement
vertically or VAnchorType.NONE if their is no vertical attachment.HAnchorType getHorizontalAnchor()
HAnchorType indicating the way
in which this element is attached to another ReportElement horizontally.
ReportElement
horizontally or HAnchorType.NONE when their is no horizontal attachment.void deleteAttachment()
ReportElement objects.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||