|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart2D.axis.layouters.SimpleLinearLabelLayouter
public class SimpleLinearLabelLayouter extends java.lang.Object implements LinearLabelLayouter, java.io.Serializable
Eliminates labels, falling outside the visible axis range. Does not handle overlapping labels in any way.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
calculatePreferredDimensions
Shows cleanup preferred dimmensions |
protected int |
levels
number of label levels |
protected double |
prefferedHeight
Preferred height of the labels |
protected double |
prefferedWidth
Preferred width of the labels |
protected boolean |
sparseMode
specifies whether sparse mode is set to this layouter |
protected double |
start
start of the visible range |
protected double |
stop
end of the visible range |
protected Area |
titleArea
Axis titles |
| Constructor and Description |
|---|
SimpleLinearLabelLayouter()
Constructs a new SimpleLinearLabelLayouter. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a copy of the layouter. |
protected int |
compareLabels(AbstractAxisLabel l1,
AbstractAxisLabel l2)
Compares positions of the specified labels. |
void |
dispose()
Disposes layouter |
protected void |
eliminateOutbound(AbstractAxisLabel[] labels)
Eliminates labels, falling outside the visible axis range. |
protected int |
findMaxLevel(AbstractAxisLabel[] labels)
Finds the maximum level of labels in the specified array. |
int |
getMaxLevel()
Returns the maximum level of layouted labels. |
double |
getPreferredHeight()
Non-API method. Returns height required to layout labels. |
double |
getPreferredWidth()
Non-API method. Returns width required to layout labels. |
void |
layout(AbstractAxisLabel[] labels)
Layouts specified labels. |
void |
prepare(AbstractAxisLabel[] labels)
Non-API method. Calculates preferred size of all visible labels (maximum size of all labels). |
void |
setSparseMode(boolean sparseMode)
Enables sparse mode (true - enabled, false - disabled). |
void |
setTitleArea(Area title)
Adds title area |
void |
setVisibleRange(double start,
double stop)
Sets the visible range for the layouter. |
protected void |
sort(AbstractAxisLabel[] labels)
Sorts the labels |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double start
protected double stop
protected int levels
protected Area titleArea
protected boolean sparseMode
protected double prefferedHeight
protected double prefferedWidth
protected boolean calculatePreferredDimensions
| Constructor Detail |
|---|
public SimpleLinearLabelLayouter()
SimpleLinearLabelLayouter. The value of levels
is set to Integer.MAX_VALUE.
| Method Detail |
|---|
public void setTitleArea(Area title)
setTitleArea in interface LinearLabelLayoutertitle - title areapublic java.lang.Object clone()
clone in interface LinearLabelLayouterclone in class java.lang.Object
public void setVisibleRange(double start,
double stop)
setVisibleRange in interface LinearLabelLayouterstart - the start of the rangestop - the end of the rangepublic void setSparseMode(boolean sparseMode)
setSparseMode in interface LinearLabelLayoutersparseMode - enable sparse mode permitpublic int getMaxLevel()
getMaxLevel in interface LinearLabelLayouterprotected int findMaxLevel(AbstractAxisLabel[] labels)
labels - the labels arraypublic void layout(AbstractAxisLabel[] labels)
null.
layout in interface LinearLabelLayouterlabels - labels to layoutprotected void eliminateOutbound(AbstractAxisLabel[] labels)
labels - labels to layoutprotected void sort(AbstractAxisLabel[] labels)
labels - AxisLabel array
protected int compareLabels(AbstractAxisLabel l1,
AbstractAxisLabel l2)
l1 - the first label to comparel2 - the second label to comparepublic void dispose()
LinearLabelLayouter
dispose in interface LinearLabelLayouterpublic void prepare(AbstractAxisLabel[] labels)
LinearLabelLayouter
prepare in interface LinearLabelLayouterlabels - label arraypublic double getPreferredHeight()
LinearLabelLayouter
getPreferredHeight in interface LinearLabelLayouterpublic double getPreferredWidth()
LinearLabelLayouter
getPreferredWidth in interface LinearLabelLayouter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||