|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.SlotHandle
public class SlotHandle
Represents a "slot" within an element. A slot holds a collection of report items.
Field Summary | |
---|---|
protected int |
slotID
The numeric identifier of the slot. |
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
---|
elementHandle |
Constructor Summary | |
---|---|
SlotHandle(DesignElementHandle element,
int slotID)
Constructs a handle for the slot with the given design element handle and the id of the slot. |
Method Summary | |
---|---|
void |
add(org.eclipse.birt.report.model.core.DesignElement content)
Deprecated. by the method add(DesignElementHandle) |
void |
add(DesignElementHandle content)
Adds a report item to the slot with the given element handle. |
void |
add(DesignElementHandle content,
int newPos)
Adds a report item to the slot at the given position. |
void |
add(org.eclipse.birt.report.model.core.DesignElement content,
int newPos)
Deprecated. by the method add(DesignElementHandle, int) |
boolean |
canContain(DesignElementHandle content)
Determines if the given slot can contain the content . |
boolean |
canContain(java.lang.String type)
Determines if the slot can contain an element with the type of type . |
void |
drop(DesignElementHandle content)
Drops a content element from the slot, and unresolve any reference property which refers the element to drop. |
void |
drop(int posn)
Drops a content element at the given position from the slot, and unresolve any reference property which refers the element to drop. |
void |
dropAndClear(DesignElementHandle content)
Drops a content element from the slot, and clear any reference property which refers the element to drop. |
void |
dropAndClear(int posn)
Drops a content element at the given position from the slot, and clear any reference property which refers the element to drop. |
int |
findPosn(DesignElementHandle content)
Returns the position of the given content in this slot. |
DesignElementHandle |
get(int posn)
Returns a handle to the content element at the given position. |
java.util.List |
getContents()
Returns the a list with slot contents.Items are handles to the contents and in order by position. |
int |
getCount()
Returns the number of elements in the slot. |
ISlotDefn |
getDefn()
Returns the definition of the current slot. |
org.eclipse.birt.report.model.core.ContainerSlot |
getSlot()
Returns the internal representation of the slot. |
int |
getSlotID()
Returns the numeric identifier of the slot. |
java.util.Iterator |
iterator()
Gets an iterator over the items in the slot. |
void |
move(DesignElementHandle content,
DesignElementHandle newContainer,
int toSlot)
Moves a content element into a slot in another container element. |
void |
move(DesignElementHandle content,
DesignElementHandle newContainer,
int toSlot,
int newPos)
Moves a content element into a slot in another container element at the specified position. |
java.util.List |
paste(DesignElementHandle content)
Pastes a report item to the slot. |
java.util.List |
paste(DesignElementHandle content,
int newPos)
Pastes a report item to the slot. |
java.util.List |
paste(IDesignElement content)
Pastes a report item to the slot. |
java.util.List |
paste(IDesignElement content,
int newPos)
Pastes a report item to the slot. |
void |
shift(DesignElementHandle content,
int toPosn)
Moves the position of a content element within the slot. |
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
---|
getDesign, getElement, getElementHandle, getModule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int slotID
Constructor Detail |
---|
public SlotHandle(DesignElementHandle element, int slotID)
getSlot( )
method
on an element handle, or one of the specific methods on the handle for an
element that is a container.
element
- handle to the report elementslotID
- the numeric identifier of the slotMethod Detail |
---|
public void add(DesignElementHandle content) throws ContentException, NameException
content
- handle to the newly created element
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic void add(DesignElementHandle content, int newPos) throws ContentException, NameException
content
- handle to the newly created elementnewPos
- the position index at which the content to be inserted
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic void add(org.eclipse.birt.report.model.core.DesignElement content) throws ContentException, NameException
add(DesignElementHandle)
content
- the newly created element
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic void add(org.eclipse.birt.report.model.core.DesignElement content, int newPos) throws ContentException, NameException
add(DesignElementHandle, int)
content
- the newly created elementnewPos
- the position index at which the content to be inserted.
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic java.util.List paste(DesignElementHandle content) throws ContentException, NameException
content
- the newly created element handle
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic java.util.List paste(IDesignElement content) throws ContentException, NameException
content
- the newly created element
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic java.util.List paste(DesignElementHandle content, int newPos) throws ContentException, NameException
content
- the newly created element handlenewPos
- the position index at which the content to be inserted.
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic java.util.List paste(IDesignElement content, int newPos) throws ContentException, NameException
content
- the newly created elementnewPos
- the position index at which the content to be inserted.
ContentException
- if the element is not allowed in the slot
NameException
- if the element has a duplicate or illegal namepublic java.util.Iterator iterator()
SlotIterator
and each item returned by the iterator's
getNext( )
method is of type
DesignElementHandle
.public java.util.List getContents()
public int getCount()
public DesignElementHandle get(int posn)
posn
- the position within the slot
public void shift(DesignElementHandle content, int toPosn) throws ContentException
content
- handle to the content to movetoPosn
- the new position
ContentException
- if the content is not in the slot, or if the to position is
not valid.public void move(DesignElementHandle content, DesignElementHandle newContainer, int toSlot) throws ContentException
content
- a handle to the element to movenewContainer
- a handle to the new container elementtoSlot
- the target slot ID where the element will be moved to.
ContentException
- if the content is not in this slot or if the new container is
not, in fact, a container, or if the content cannot go into
the target slot.public void move(DesignElementHandle content, DesignElementHandle newContainer, int toSlot, int newPos) throws ContentException
content
- a handle to the element to movenewContainer
- a handle to the new container elementtoSlot
- the target slot ID where the element will be moved to.newPos
- the position to which the content will be moved. If it is
greater than the current size of the target slot, the content
will be appended at the end of the target slot.
ContentException
- if the content is not in this slot or if the new container is
not, in fact, a container, or if the content cannot go into
the target slot.public void dropAndClear(DesignElementHandle content) throws SemanticException
content
- a handle to the content to drop
SemanticException
- if the content is not within the slotpublic void drop(DesignElementHandle content) throws SemanticException
content
- a handle to the content to drop
SemanticException
- if the content is not within the slotpublic void dropAndClear(int posn) throws SemanticException
posn
- the position of the content to drop
SemanticException
- if the position is out of rangepublic void drop(int posn) throws SemanticException
posn
- the position of the content to drop
SemanticException
- if the position is out of rangepublic org.eclipse.birt.report.model.core.ContainerSlot getSlot()
public int findPosn(DesignElementHandle content)
content
- the content to look up
public int getSlotID()
public boolean canContain(java.lang.String type)
type
. Even return value is true
, doesn't
mean the element can be added/moved without exceptions.
type
- the name of the element type, like "Table", "List", etc.
true
if the slot can contain the an element with
type
type, otherwise false
.public boolean canContain(DesignElementHandle content)
content
.
Even return value is true
, doesn't mean the element can
be added/moved without exceptions.
content
- the design element handle to check
true
if the slot with the given
slotId
can contain the content
,
otherwise false
.public ISlotDefn getDefn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |