TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.core.internal
Class DItem

java.lang.Object
  extended by org.eclipse.tptp.platform.report.core.internal.DItem
All Implemented Interfaces:
IDItem, IDObject
Direct Known Subclasses:
DAccessibilityDesc, DAccessibilityTitle, DData, DEvent, DI18N, DImage, DInclude, DIndex, DItemContainer, DItemPointer, DLine, DMarkerLine, DMarkerRegion, DPageBreak, DPageCounter, DPalettes, DPreferences, DShapes, DSummary, DTag, DText, DTimeStamp, DXmlReader.DDummy, DXYSurface

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public abstract class DItem
extends java.lang.Object
implements IDItem

A DItem is defined by a parent item, a next item and a style. A DItem can't have children, it's a leaf object. This is the based object for all other item of a document in the JScrib core.


Constructor Summary
DItem()
          Deprecated. Creates a DItem with no next and parent IDItem and no style.
 
Method Summary
 boolean addChild(IDItem item)
          Deprecated. Inserts a child after the last IDItem child.
 void clear()
          Deprecated. Detaches the item from a document and clears its style.
 IDStyle getAppliedStyle()
          Deprecated. Returns the Applied style of the item.
 int getChildCount()
          Deprecated. Returns the number of children of the item.
 int getChildPosition(IDItem i)
          Deprecated. Returns the position of the child passed in argument.
 IDItem getFirstChild()
          Deprecated. Returns the first child of the item.
 IDItemIterator getIterator()
          Deprecated. Returns the iterator of the item.
 IDItem getLastChild()
          Deprecated. Returns the last child of the item.
 IDItem getNext()
          Deprecated. Returns the next item.
 IDItem getParent()
          Deprecated. Returns the parent item.
 IDItem getRoot()
          Deprecated. Returns the top level parent item in a IDItem hierarchy.
 IDStyle getStyle()
          Deprecated. Returns the style of the item.
 boolean insertChild(IDItem item, IDItem after)
          Deprecated. Inserts the child 'item' to the item after the child 'after'.
 boolean isContainer()
          Deprecated. Return true if the item is a container.
 boolean removeChild(IDItem item)
          Deprecated. Removes the child 'item' from the item children and returns true.
 void setNext(IDItem i)
          Deprecated. Sets the next IDItem.
 void setParent(IDItem p)
          Deprecated. Sets the parent of the item.
 void setStyle(IDStyle style)
          Deprecated. Sets the style of the item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DItem

public DItem()
Deprecated. 
Creates a DItem with no next and parent IDItem and no style.

Method Detail

clear

public void clear()
Deprecated. 
Detaches the item from a document and clears its style.

Specified by:
clear in interface IDItem

getRoot

public IDItem getRoot()
Deprecated. 
Returns the top level parent item in a IDItem hierarchy. Generally this item is a IDDocument item in a valid JScrib document.

Specified by:
getRoot in interface IDItem

getNext

public IDItem getNext()
Deprecated. 
Returns the next item. It is the sibling of the current item.

Specified by:
getNext in interface IDItem

getAppliedStyle

public IDStyle getAppliedStyle()
Deprecated. 
Returns the Applied style of the item. If the current item has'nt a style this method search a parent IDItem that has a style.
This method can return null if no parent IDItem have a style.
To give the style of the IDItem use method getStyle

Specified by:
getAppliedStyle in interface IDItem
See Also:
getStyle()

getStyle

public IDStyle getStyle()
Deprecated. 
Returns the style of the item.

Specified by:
getStyle in interface IDItem
See Also:
setStyle(org.eclipse.tptp.platform.report.core.internal.IDStyle), getAppliedStyle()

setNext

public void setNext(IDItem i)
Deprecated. 
Sets the next IDItem.

Specified by:
setNext in interface IDItem
Parameters:
i - next item

setStyle

public void setStyle(IDStyle style)
Deprecated. 
Sets the style of the item.

Specified by:
setStyle in interface IDItem
Parameters:
style - item style
See Also:
getStyle()

addChild

public boolean addChild(IDItem item)
Deprecated. 
Inserts a child after the last IDItem child. This method calls getLastChildren before calling insertChild. It is no very efficient.

Specified by:
addChild in interface IDItem
See Also:
insertChild(org.eclipse.tptp.platform.report.core.internal.IDItem, org.eclipse.tptp.platform.report.core.internal.IDItem), getLastChild()

getChildCount

public int getChildCount()
Deprecated. 
Returns the number of children of the item. This method returns always 0 because an IDItem can contains children because it is a leaf in a document.

Specified by:
getChildCount in interface IDItem

getChildPosition

public int getChildPosition(IDItem i)
Deprecated. 
Returns the position of the child passed in argument. If the return value is -1, that means that the item has not be found in item children. This method returns always -1 because an IDItem can contains children.

Specified by:
getChildPosition in interface IDItem

getFirstChild

public IDItem getFirstChild()
Deprecated. 
Returns the first child of the item. This method returns always null because an IDItem can contains children.

Specified by:
getFirstChild in interface IDItem
See Also:
getLastChild(), getChildPosition(org.eclipse.tptp.platform.report.core.internal.IDItem)

getIterator

public IDItemIterator getIterator()
Deprecated. 
Returns the iterator of the item.

Specified by:
getIterator in interface IDItem

getLastChild

public IDItem getLastChild()
Deprecated. 
Returns the last child of the item. This method returns always null because an IDItem can contains children.

Specified by:
getLastChild in interface IDItem
See Also:
getFirstChild(), getChildPosition(org.eclipse.tptp.platform.report.core.internal.IDItem)

insertChild

public boolean insertChild(IDItem item,
                           IDItem after)
Deprecated. 
Inserts the child 'item' to the item after the child 'after'. This method returns always false because IDItem can contains children.

Specified by:
insertChild in interface IDItem
Parameters:
child - item to be added
after - item after which the child should be added
Returns:
true if the insertion has succed, false in othercase.
See Also:
addChild(org.eclipse.tptp.platform.report.core.internal.IDItem), removeChild(org.eclipse.tptp.platform.report.core.internal.IDItem)

isContainer

public boolean isContainer()
Deprecated. 
Return true if the item is a container. This method returns always false because IDItem can contains children.

Specified by:
isContainer in interface IDItem
See Also:
DItemContainer.isContainer()

removeChild

public boolean removeChild(IDItem item)
Deprecated. 
Removes the child 'item' from the item children and returns true. Returns false if the item to remove isn't found in the child list. This method returns always true because IDItem can contains children.

Specified by:
removeChild in interface IDItem
See Also:
insertChild(org.eclipse.tptp.platform.report.core.internal.IDItem, org.eclipse.tptp.platform.report.core.internal.IDItem), addChild(org.eclipse.tptp.platform.report.core.internal.IDItem)

setParent

public void setParent(IDItem p)
Deprecated. 
Sets the parent of the item. No control is applied by this method.
DO NOT USE DIRECTLY IT to add an item in a container. Prefer to use insertChild(org.eclipse.tptp.platform.report.core.internal.IDItem, org.eclipse.tptp.platform.report.core.internal.IDItem) method

Specified by:
setParent in interface IDItem
Parameters:
p - parent item
See Also:
getParent()

getParent

public IDItem getParent()
Deprecated. 
Returns the parent item.

Specified by:
getParent in interface IDItem
See Also:
setParent(org.eclipse.tptp.platform.report.core.internal.IDItem)

TPTP 4.5.0 Platform Project
Internal API Specification