|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.bioinfweb.treegraph.document.Labels
public class Labels
This class stores the Labels of a Node and provides infomation about whole rows and columns.
| Field Summary | |
|---|---|
private static int |
CAPACITY_INCREMENT
|
private Branch |
holdingBranch
|
private static int |
INITIAL_CAPACITY
|
private List<LabelLine> |
labelLinesAbove
|
private List<LabelLine> |
labelLinesBelow
|
| Constructor Summary | |
|---|---|
Labels(Branch holdingBranch)
|
|
| Method Summary | |
|---|---|
int |
add(Label label)
Adds a label to the List. |
float |
blockHeight(PositionPaintType type,
boolean above,
float spacing)
Returns the overall height of all rows of labels above or below the node. |
float |
blockWidth(PositionPaintType type,
float spacing)
Returns the maximum width of all lines of labels above and below the branch without the block margin defined in the formats of the accordant document. |
void |
clear()
|
Labels |
clone()
Returns a deep copy of this Labels-object (including copys of all
LabelLine-objects and their Labels. |
boolean |
contains(boolean above,
Label label)
Tests if the specified label is contained in the specified block (above or below the branch). |
boolean |
contains(Label label)
Tests if the specified label is contained in this object. |
boolean |
containsSameID(Labels other)
|
private boolean |
containsSameID(Labels other,
boolean above)
|
Label |
get(boolean above,
int lineNo,
int lineIndex)
Returns the label at the specified position |
Label |
get(String id)
|
Branch |
getHoldingBranch()
|
int |
getLineIndex(boolean above,
int lineNo,
Label label)
Returns the index of the specified label in its line. |
int |
getLineIndex(boolean above,
Label label)
Returns the index of the specified label in its line. |
int |
getLineNo(boolean above,
Label label)
Returns the line number this label is located in. |
private List<LabelLine> |
getLines(boolean above)
|
boolean |
isEmpty()
Tests if any labels are present |
int |
labelCount(boolean above,
int lineNo)
Returns the number of labels in the specified line. |
int |
lineCount(boolean above)
|
float |
lineDescent(boolean above,
int lineNumber)
|
float |
lineHeight(PositionPaintType type,
boolean above,
int lineNumber)
|
float |
lineWidth(PositionPaintType type,
boolean above,
int lineNumber,
float spacing)
Returns the width of the specified line |
private void |
reduceLabelLineVectors()
|
boolean |
reinsert(Label label)
|
boolean |
remove(Label label)
|
private Label |
searchByID(String id,
boolean above)
|
void |
setHoldingBranch(Branch holdingBranch)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int INITIAL_CAPACITY
private static final int CAPACITY_INCREMENT
private Branch holdingBranch
private List<LabelLine> labelLinesAbove
private List<LabelLine> labelLinesBelow
| Constructor Detail |
|---|
public Labels(Branch holdingBranch)
| Method Detail |
|---|
public Branch getHoldingBranch()
public void setHoldingBranch(Branch holdingBranch)
private void reduceLabelLineVectors()
private List<LabelLine> getLines(boolean above)
public int add(Label label)
label - the label to add
public boolean remove(Label label)
public boolean reinsert(Label label)
public Label get(boolean above,
int lineNo,
int lineIndex)
above - indicates wheather the label is above the branchlineNo - the number of the line the label in located in (below or above the branch) The first line has the index 0.lineIndex - the position in the line counted from the left (Does not equal the linePosition value.)
private Label searchByID(String id,
boolean above)
public Label get(String id)
public boolean contains(boolean above,
Label label)
above - label -
true if the label is containedpublic boolean contains(Label label)
label -
true if the label is contained
public int getLineNo(boolean above,
Label label)
above - - specifies the labels blocklabel -
public int getLineIndex(boolean above,
Label label)
above - label -
public int getLineIndex(boolean above,
int lineNo,
Label label)
getLineIndex(boolean, Label).
above - lineNo - label -
public void clear()
public boolean isEmpty()
public int lineCount(boolean above)
public int labelCount(boolean above,
int lineNo)
public float lineWidth(PositionPaintType type,
boolean above,
int lineNumber,
float spacing)
id - the id of the treepositioner used to position the paintable elementsabove - indicates wheather the line widths above or below the branch should be returnedspacing - the vertical spacing in millimeters between two labels in one line (depends on the user values in the current document)
public float blockWidth(PositionPaintType type,
float spacing)
id - spacing -
public float lineHeight(PositionPaintType type,
boolean above,
int lineNumber)
public float lineDescent(boolean above,
int lineNumber)
public float blockHeight(PositionPaintType type,
boolean above,
float spacing)
private boolean containsSameID(Labels other,
boolean above)
public boolean containsSameID(Labels other)
public Labels clone()
Labels-object (including copys of all
LabelLine-objects and their Labels.
Note that the holding branch is still the same as in the original
Labels-object.
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||