|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.graphlayout.labellayout.IlvLabelLayoutReport
public class IlvLabelLayoutReport
The base class of the objects used to store information about the behavior of the label layout algorithms.
The layout report is returned by the method
IlvLabelLayout.performLayout().
It can be also obtained during the layout using the layout event listener
mechanism.
IlvLabelLayout,
IlvLabelLayout.performLayout(),
IlvLabelLayout.addLabelLayoutEventListener(LabelLayoutEventListener),
LabelLayoutEvent,
LabelLayoutEventListener,
Serialized Form| Field Summary | |
|---|---|
static int |
EXCEPTION_DURING_LAYOUT
An exception has been raised during layout. |
static int |
GREATEST_CODE
The largest integer value used as an error code. |
static int |
INITIAL_CODE
The initial value of the code. |
static int |
LAYOUT_DONE
The label layout was performed normally. |
static int |
LAYOUT_FINISHED
The layout was finished. |
static int |
LAYOUT_STARTED
The layout was started. |
static int |
NO_LABELS
The label layout was not performed because there are no labels. |
static int |
NOT_NEEDED
The label layout was not performed because there was no significant change in the manager since the last time the layout was performed successfully. |
static int |
STOPPED_AND_INVALID
The label layout was performed but stopped because either the layout time elapsed or IlvLabelLayout.stopImmediately() was called. |
static int |
STOPPED_AND_VALID
The label layout was performed but stopped because either the layout time elapsed or IlvLabelLayout.stopImmediately() was called. |
| Constructor Summary | |
|---|---|
protected |
IlvLabelLayoutReport()
Creates a new instance of the report object. |
| Method Summary | |
|---|---|
String |
codeToString(int code)
Returns a message string (in English) corresponding to the code value that can be obtained by getCode(). |
int |
getCode()
Returns the code describing the current state of the layout algorithm. |
long |
getLayoutTime()
Returns the total duration of the label layout algorithm (milliseconds). |
int |
getPercentageComplete()
If the label layout algorithm supports the percentage completion feature, this method returns the current percentage of completion during layout. |
void |
setCode(int code)
Sets the code for the current state of the label layout algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INITIAL_CODE
getCode() returns
this value if a different code was not set using setCode(int).
public static final int NO_LABELS
getCode(),
Constant Field Valuespublic static final int NOT_NEEDED
getCode(),
Constant Field Valuespublic static final int LAYOUT_DONE
getCode(),
Constant Field Valuespublic static final int STOPPED_AND_VALID
IlvLabelLayout.stopImmediately() was called.
The result can be considered a valid layout. Iterative layout algorithms
that can be stopped at any iteration set this result code if they do not
run to completion (see IlvLabelLayout.supportsStopImmediately()
and IlvLabelLayout.supportsAllowedTime()).
getCode(),
Constant Field Valuespublic static final int STOPPED_AND_INVALID
IlvLabelLayout.stopImmediately() was called.
The result cannot be considered a valid layout. Noniterative layout
algorithms set this result code if they do not run to completion (see
IlvLabelLayout.supportsStopImmediately() and
IlvLabelLayout.supportsAllowedTime()).
The labels are either at intermediate positions (that is, the
positions seem to be placed randomly) or have not changed at all,
depending on the specific behavior of the layout algorithm.
getCode(),
Constant Field Valuespublic static final int LAYOUT_STARTED
getCode(),
LabelLayoutEvent.isLayoutStarted(),
Constant Field Valuespublic static final int LAYOUT_FINISHED
getCode(),
LabelLayoutEvent.isLayoutStarted(),
Constant Field Valuespublic static final int EXCEPTION_DURING_LAYOUT
getCode(),
Constant Field Valuespublic static final int GREATEST_CODE
GREATEST_CODE+1 for the definition of a new code.
getCode(),
Constant Field Values| Constructor Detail |
|---|
protected IlvLabelLayoutReport()
IlvLabelLayout.createLayoutReport().
| Method Detail |
|---|
public long getLayoutTime()
IlvLabelLayout.isLayoutNeeded() and IlvLabelLayout.layout(boolean).
public int getPercentageComplete()
0 at the beginning of layout,
increases during layout, and reaches 100 at the end of
layout.
IlvLabelLayout.supportsPercentageComplete(),
IlvLabelLayout.increasePercentageComplete(int)public void setCode(int code)
LAYOUT_DONE, STOPPED_AND_VALID, NOT_NEEDED, and
so on) or those defined in subclasses of IlvLabelLayoutReport.
The codes are mutually exclusive.
The last value specified using setCode(int) is returned
by getCode().
Note that you should call this method only if you create your own layout
class inside the implementation of IlvLabelLayout.layout(boolean).
To obtain the layout report, use IlvLabelLayout.getLayoutReport().
getCode()public int getCode()
LAYOUT_DONE, STOPPED_AND_VALID, NOT_NEEDED, and
so on) or those defined in subclasses of IlvLabelLayoutReport.
Note that this method returns LAYOUT_STARTED if it is called
inside the method
LabelLayoutEventListener.layoutStepPerformed(LabelLayoutEvent)
at the beginning of the layout process (except if the layout is not
needed).
It returns LAYOUT_FINISHED if it is called
inside the method
LabelLayoutEventListener.layoutStepPerformed(LabelLayoutEvent)
at the end of the layout process (except if the layout is not needed).
Whenever the code LAYOUT_STARTED is returned, the
code LAYOUT_FINISHED will also be returned, even when
an exception occurs during the layout process or the layout is stopped
prematurely (by IlvLabelLayout.stopImmediately() or because the
layout time elapsed).
setCode(int),
IlvLabelLayout.layout(boolean),
IlvLabelLayout.supportsStopImmediately(),
IlvLabelLayout.supportsAllowedTime(),
LabelLayoutEvent.isLayoutStarted(),
LabelLayoutEvent.isLayoutFinished()public String codeToString(int code)
getCode().
Subclasses of IlvLabelLayoutReport can override and extend
this method if they allow additional return values for getCode().
For example, the method returns the string "layout done" for the input
code LAYOUT_DONE and the string "layout not needed" for the
input code NOT_NEEDED.
getCode()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||