|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.graphlayout.labellayout.IlvLabelLayout
ilog.views.graphlayout.labellayout.random.IlvRandomLabelLayout
public class IlvRandomLabelLayout
The main class for the Random Label Layout algorithm.
This is the simplest label layout algorithm. The labels are moved at
randomly-computed positions inside an user-defined region which
can be specified using the method setLayoutRegion(ilog.views.IlvRect).
This algorithm exists mainly for demonstration purpose.
See the corresponding chapter of the User's Manual for details on the algorithm, the features and limitations, code samples, and so on.
| Field Summary |
|---|
| Fields inherited from class ilog.views.graphlayout.labellayout.IlvLabelLayout |
|---|
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES |
| Constructor Summary | |
|---|---|
IlvRandomLabelLayout()
Creates a new instance of the Random Layout algorithm. |
|
IlvRandomLabelLayout(IlvRandomLabelLayout source)
Creates a new label layout instance by copying an existing one. |
|
| Method Summary | |
|---|---|
IlvLabelLayout |
copy()
Copies the layout instance. |
void |
copyParameters(IlvLabelLayout source)
Copies the parameters from a given layout instance. |
protected IlvLabelLayoutManagerProperty |
createLayoutManagerProperty(String name,
boolean withDefaults)
Returns a new instance of IlvRandomLabelLayoutManagerProperty
that stores the parameter settings of this layout class. |
IlvRect |
getLayoutRegion()
Returns the layout region of the layout. |
protected void |
init()
Initializes instance variables. |
protected void |
layout(boolean redraw)
Computes the layout using the Random Layout algorithm. |
void |
setLayoutRegion(IlvRect region)
Sets the layout region of the layout. |
boolean |
supportsAllowedTime()
Indicates that this layout class can stop the layout computation when the user-defined allowed time is exceeded. |
boolean |
supportsPercentageComplete()
Indicates that this layout class can estimate the percentage of completion during the run of layout. |
boolean |
supportsRandomGenerator()
Indicates that this layout class uses randomly-generated numbers that can be initialized with a user-defined seed value. |
boolean |
supportsSaveParametersToNamedProperties()
Indicates whether the layout class can transfer the layout parameters to named properties. |
boolean |
supportsStopImmediately()
Indicates that this layout class can interrupt the current run of the layout immediately in a controlled way. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvRandomLabelLayout()
attach(IlvManager).
attach(IlvLabelingModel).
performLayout.
IlvLabelLayout.attach(ilog.views.IlvManager),
IlvLabelLayout.attach(IlvLabelingModel),
IlvLabelLayout.performLayout()public IlvRandomLabelLayout(IlvRandomLabelLayout source)
copy() method.
Any subclass should provide a copy constructor.
Note that layout parameters which are specific to a label or obstacle are not copied. Global layout parameters are copied.
source - The layout instance that is copied.| Method Detail |
|---|
protected void init()
You should not call this method directly. The method is called internally by the constructor without arguments and by the copy constructor. The method must be overridden by subclasses that need to initialize additional instance variables.
init in class IlvLabelLayoutpublic IlvLabelLayout copy()
This method copies the layout instance by calling the copy constructor.
Note that layout parameters which are specific to a label or obstacle are not copied. Global layout parameters are copied.
copy in class IlvLabelLayoutIlvRandomLabelLayout(IlvRandomLabelLayout),
copyParameters(ilog.views.graphlayout.labellayout.IlvLabelLayout)public void copyParameters(IlvLabelLayout source)
Note that layout parameters which are specific to a label or obstacle are not copied. Global layout parameters are copied.
copyParameters in class IlvLabelLayoutsource - The layout instance from which the parameters are copied.copy()protected void layout(boolean redraw)
IlvLabelLayout.performLayout().
layout in class IlvLabelLayoutredraw - If true, the attached labeling model will be
asked to redraw the manager after layout.
When the layout algorithm moves the labels, it is
required to pass the value of the redraw
argument to the method IlvLabelingModel.moveLabel(java.lang.Object, float, float, boolean).IlvLabelLayout.performLayout()public void setLayoutRegion(IlvRect region)
public IlvRect getLayoutRegion()
public final boolean supportsPercentageComplete()
supportsPercentageComplete in class IlvLabelLayouttrue.IlvLabelLayout.increasePercentageComplete(int),
IlvLabelLayoutReport.getPercentageComplete()public final boolean supportsRandomGenerator()
useSeedValueForRandomGenerator with
a true argument.
supportsRandomGenerator in class IlvLabelLayouttrue.IlvLabelLayout.setSeedValueForRandomGenerator(long),
IlvLabelLayout.getSeedValueForRandomGenerator(),
IlvLabelLayout.setUseSeedValueForRandomGenerator(boolean),
IlvLabelLayout.isUseSeedValueForRandomGenerator()public final boolean supportsAllowedTime()
IlvLabelLayoutReport.STOPPED_AND_INVALID in this case.
supportsAllowedTime in class IlvLabelLayouttrue.IlvLabelLayout.setAllowedTime(long),
IlvLabelLayout.getAllowedTime(),
IlvLabelLayoutReport.getCode()public boolean supportsStopImmediately()
IlvLabelLayoutReport.STOPPED_AND_INVALID in this case.
supportsStopImmediately in class IlvLabelLayouttrue.IlvLabelLayout.stopImmediately(),
IlvLabelLayout.isStoppedImmediately(),
IlvLabelLayoutReport.getCode()public boolean supportsSaveParametersToNamedProperties()
.ivl file.
supportsSaveParametersToNamedProperties in class IlvLabelLayouttrue.IlvDefaultLabelingModel.saveParametersToNamedProperties(ilog.views.graphlayout.labellayout.IlvLabelLayout, boolean),
IlvDefaultLabelingModel.loadParametersFromNamedProperties(ilog.views.graphlayout.labellayout.IlvLabelLayout),
IlvDefaultLabelingModel.removeParametersFromNamedProperties()
protected IlvLabelLayoutManagerProperty createLayoutManagerProperty(String name,
boolean withDefaults)
IlvRandomLabelLayoutManagerProperty
that stores the parameter settings of this layout class.
The method is used by
IlvDefaultLabelingModel.saveParametersToNamedProperties(IlvLabelLayout, boolean)
to create a named property that contains parameter settings of this layout
instance.
createLayoutManagerProperty in class IlvLabelLayoutIlvLabelLayoutManagerProperty,
IlvDefaultLabelingModel.saveParametersToNamedProperties(ilog.views.graphlayout.labellayout.IlvLabelLayout, boolean),
IlvDefaultLabelingModel.loadParametersFromNamedProperties(ilog.views.graphlayout.labellayout.IlvLabelLayout),
IlvDefaultLabelingModel.removeParametersFromNamedProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||