com.sas.swing.visuals.mdtable
Class AbstractAxisLabel

java.lang.Object
  |
  +--com.sas.swing.visuals.mdtable.AbstractNode
        |
        +--com.sas.swing.visuals.mdtable.AbstractAxisLabel
All Implemented Interfaces:
AxisLabelInterface, NodeInterface, NodeInterface, SimpleNodeInterface

public abstract class AbstractAxisLabel
extends AbstractNode
implements AxisLabelInterface

Defines an abstract base class for an implementation of AbstractAxisLabelInterface.

See Also:
AbstractAxis, AbstractDimension, AbstractHierarchy, AbstractLevel, AbstractMember

Constructor Summary
AbstractAxisLabel(MemberInterface member, int minCoord, int maxCoord)
          Constructor.
 
Method Summary
 AxisInterface getAxis()
          Returns the axis that this label is associated with.
 String getLabel()
          Returns the label's label, i.e. its descriptive text.
 int getMaximumCoordinate()
          Returns the largest axis coordinate spanned by the label.
 MemberInterface getMember()
          Returns the member that this label is associated with.
 int getMinimumCoordinate()
          Returns the smallest axis coordinate spanned by the label.
 String getName()
          Returns the label's name.
 SimpleNodeInterface[] getNodeChildren(int index, int count)
          Returns the child labels associated with a given range of indices.
 String getNodeType()
          Returns the label's type.
 
Methods inherited from class com.sas.swing.visuals.mdtable.AbstractNode
getNodeExpandedText, getNodeText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sas.models.NodeInterface
getNodeExpandedText, getNodeText
 
Methods inherited from interface com.sas.models.SimpleNodeInterface
countNodeChildren, getNodeChild, getNodeChildCount, isLeafNode
 

Constructor Detail

AbstractAxisLabel

public AbstractAxisLabel(MemberInterface member,
                         int minCoord,
                         int maxCoord)
Constructor.
Parameters:
member - The member associated with this label.
minCoord - The smallest axis coordinate spanned by the label. Must be greater than or equal to zero, and less than or equal to maxCoord.
maxCoord - The largest axis coordinate spanned by the label. Must be greater than or equal to zero, and greater than or equal to minCoord.
See Also:
getMember(), getMinimumCoordinate(), getMaximumCoordinate()
Method Detail

getAxis

public final AxisInterface getAxis()
Returns the axis that this label is associated with. (Convenience method for getMember().getLevel().getDimension().getAxis().)
Specified by:
getAxis in interface AxisLabelInterface
Returns:
The label's axis.
See Also:
AxisInterface

getLabel

public String getLabel()
                throws TableException
Returns the label's label, i.e. its descriptive text.
Specified by:
getLabel in interface NodeInterface
Returns:
getMember().getLabel()
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).

getMember

public final MemberInterface getMember()
Returns the member that this label is associated with.
Specified by:
getMember in interface AxisLabelInterface
Returns:
The label's member.
See Also:
MemberInterface

getMinimumCoordinate

public int getMinimumCoordinate()
Returns the smallest axis coordinate spanned by the label. If this is a leaf label, getMinimumCoordinate() will equal getMaximumCoordinate().
Specified by:
getMinimumCoordinate in interface AxisLabelInterface
Returns:
A zero-based integer that identifies a point along the axis.
See Also:
getMaximumCoordinate()

getMaximumCoordinate

public int getMaximumCoordinate()
Returns the largest axis coordinate spanned by the label. If this is a leaf label, getMinimumCoordinate() will equal getMaximumCoordinate().
Specified by:
getMaximumCoordinate in interface AxisLabelInterface
Returns:
A zero-based integer that identifies a point along the axis.
See Also:
getMinimumCoordinate()

getName

public String getName()
               throws TableException
Returns the label's name. The name is the label's unique identifier; whether the identifier is unique throughout the tree or just within the domain of the label's parent is implementation specific.
Specified by:
getName in interface NodeInterface
Returns:
getMember().getName()
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).

getNodeChildren

public SimpleNodeInterface[] getNodeChildren(int index,
                                             int count)
Returns the child labels associated with a given range of indices. The default implementation simply calls getNodeChild count-times; subclass should override if it can do so more efficiently.
Specified by:
getNodeChildren in interface SimpleNodeInterface
Parameters:
index - A zero-based child index (0 to getNodeChildCount()-1).
count - The number of child labels to return.
Returns:
An array whose first element is the child label associated with index, whose second element is the child label associated with index+1, and so on such that array[array.length-1] is the child label associated with index+count-1.
Throws:
IndexOutOfBoundsException - Thrown if index is negative, or greater than or equal to getNodeChildCount().

getNodeType

public String getNodeType()
Returns the label's type. The type serves to categorize a node, i.e. identify it as belonging to a particular group.
Specified by:
getNodeType in interface NodeInterface
Returns:
"label".




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Thu, 16 Feb 2006 02:19:56