javax.help

Class TreeItem

Implemented Interfaces:
Serializable
Known Direct Subclasses:
FavoritesItem, IndexItem, TOCItem

public class TreeItem
extends java.lang.Object
implements Serializable

The base items known to TOC, Index and Favorites Navigators.

Field Summary

static int
COLLAPSE
Show the children of the node collapsed in the view
static int
DEFAULT_EXPANSION
A state of expansion determined by the view
static int
EXPAND
Show the children of the node expanded in the view
protected Locale
locale

Constructor Summary

TreeItem()
Creates an empty TreeItem.
TreeItem(String name)
Creates a TreeItem.
TreeItem(Map.ID id, Locale locale)
Creates a TreeItem.
TreeItem(Map.ID id, HelpSet hs, Locale locale)
Create an TreeItem.

Method Summary

int
getExpansionType()
Returns the exansion type
HelpSet
getHelpSet()
Returns the HelpSet scoping this IndexItem.
Map.ID
getID()
Returns the ID for the item.
Locale
getLocale()
Returns the locale for the item.
String
getMergeType()
Returns the merge type for the item
String
getName()
Returns the name of the item.
String
getPresentation()
Returns the presentation
String
getPresentationName()
Returns the presentation name
URL
getURL()
Returns the URL for the item.
void
setExpansionType(int type)
Sets the expansion type
void
setHelpSet(HelpSet hs)
Set the HelpSet for this TreeItem.
void
setID(Map.ID id)
Set the ID for the item.
void
setMergeType(String mergeType)
Sets the merge type
void
setName(String name)
Sets the name of the item.
void
setPresentation(String presentation)
Sets the presentation
void
setPresentationName(String presentationName)
Sets the presentation name
String
toString()
Returns a String used when displaying the object.

Field Details

COLLAPSE

public static final int COLLAPSE
Show the children of the node collapsed in the view
Field Value:
0

DEFAULT_EXPANSION

public static final int DEFAULT_EXPANSION
A state of expansion determined by the view
Field Value:
-1

EXPAND

public static final int EXPAND
Show the children of the node expanded in the view
Field Value:
1

locale

protected Locale locale

Constructor Details

TreeItem

public TreeItem()
Creates an empty TreeItem.

TreeItem

public TreeItem(String name)
Creates a TreeItem.
Parameters:
name - The name for the item.

TreeItem

public TreeItem(Map.ID id,
                Locale locale)
Creates a TreeItem.
Parameters:
id - ID for the item. Null is a valid ID.

TreeItem

public TreeItem(Map.ID id,
                HelpSet hs,
                Locale locale)
Create an TreeItem.
Parameters:
id - ID for the item. The ID can be null.
hs - A HelpSet scoping this item.
locale - The locale for this item

Method Details

getExpansionType

public int getExpansionType()
Returns the exansion type

getHelpSet

public HelpSet getHelpSet()
Returns the HelpSet scoping this IndexItem. Will return the ID HelpSet if one exists. Null otherwise

getID

public Map.ID getID()
Returns the ID for the item.

getLocale

public Locale getLocale()
Returns the locale for the item.

getMergeType

public String getMergeType()
Returns the merge type for the item

getName

public String getName()
Returns the name of the item.

getPresentation

public String getPresentation()
Returns the presentation

getPresentationName

public String getPresentationName()
Returns the presentation name

getURL

public URL getURL()
Returns the URL for the item.

setExpansionType

public void setExpansionType(int type)
Sets the expansion type

setHelpSet

public void setHelpSet(HelpSet hs)
Set the HelpSet for this TreeItem.

setID

public void setID(Map.ID id)
Set the ID for the item.

setMergeType

public void setMergeType(String mergeType)
Sets the merge type

setName

public void setName(String name)
Sets the name of the item.

setPresentation

public void setPresentation(String presentation)
Sets the presentation

setPresentationName

public void setPresentationName(String presentationName)
Sets the presentation name

toString

public String toString()
Returns a String used when displaying the object. Used by CellRenderers.
See Also:
TOCCellRenderer