|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem
public class OutlineItem
An item in a document outline. A document outline reflects the heading structure of the document. Generally there is always a root item that represents the document itself. Every level-1 heading becomes a child item of the root.
Nested Class Summary | |
---|---|
static interface |
OutlineItem.Visitor
|
Constructor Summary | |
---|---|
OutlineItem(OutlineItem parent,
int level,
String id,
int offset,
int length,
String label)
|
Method Summary | |
---|---|
void |
accept(OutlineItem.Visitor visitor)
|
void |
clear()
|
boolean |
contains(OutlineItem item)
Indicate if this outline item contains the given outline item. |
int |
distance(int offset)
|
boolean |
equals(Object obj)
|
OutlineItem |
findItemById(String id)
|
OutlineItem |
findNearestMatchingOffset(int offset)
|
List<OutlineItem> |
getChildren()
|
String |
getId()
the id of the heading, which is typically (though not guaranteed to be) unique within a document. |
String |
getKind()
|
String |
getLabel()
the text of the heading which could be truncated |
int |
getLength()
get the length of the outline item, which corresponds to the length of the heading text. |
int |
getLevel()
the level of the document which is positive and usually <= 6 except for the root item where the value is undefined. |
int |
getOffset()
|
OutlineItem |
getParent()
|
OutlineItem |
getPrevious()
Get the previous item. |
String |
getResourcePath()
the resource path to the resource of this outline item |
int |
getSectionLength()
get the length of the section, which is the length of the heading text plus the length of any following content up to the next peer-leveled heading or the parent's following sibling. |
String |
getTooltip()
|
int |
hashCode()
|
boolean |
isRootItem()
indicate if this is the root item (that is, the item representing the whole document) |
void |
moveChildren(OutlineItem otherParent)
move children from the given outline item to this |
void |
setKind(String kind)
|
void |
setLabel(String label)
|
void |
setResourcePath(String resourcePath)
the resource path to the resource of this outline item |
void |
setTooltip(String tooltip)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OutlineItem(OutlineItem parent, int level, String id, int offset, int length, String label)
Method Detail |
---|
public int getLength()
getSectionLength()
public int getSectionLength()
getLength()
public String getKind()
public void setKind(String kind)
public String getLabel()
public String getId()
public int getLevel()
public void setLabel(String label)
public OutlineItem getParent()
public boolean isRootItem()
public OutlineItem getPrevious()
public List<OutlineItem> getChildren()
public int getOffset()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void clear()
public OutlineItem findNearestMatchingOffset(int offset)
public OutlineItem findItemById(String id)
public int distance(int offset)
public void accept(OutlineItem.Visitor visitor)
public void setTooltip(String tooltip)
public String getTooltip()
public String getResourcePath()
public void setResourcePath(String resourcePath)
resourcePath
- the resource path, or null if it's unknown.public void moveChildren(OutlineItem otherParent)
public boolean contains(OutlineItem item)
offset
and section length
.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |