Gephi Toolkit Javadoc

org.gephi.ranking
Class RankingControllerImpl

java.lang.Object
  extended by org.gephi.ranking.RankingControllerImpl
All Implemented Interfaces:
RankingController

public class RankingControllerImpl
extends java.lang.Object
implements RankingController

Implementation of the RankingController interface.

Author:
Mathieu Bastian

Constructor Summary
RankingControllerImpl()
           
 
Method Summary
 RankingModel getModel()
          Returns the ranking model of the current workspace.
 RankingModel getModel(Workspace workspace)
          Returns the ranking model of workspace.
 void setInterpolator(Interpolator interpolator)
          Sets the interpolator to be used when transforming values.
 void setUseLocalScale(boolean useLocalScale)
          Sets whether rankings use a local or a global scale.
 void startAutoTransform(Ranking ranking, Transformer transformer)
          Starts an auto transformation using ranking and transformer.
 void stopAutoTransform(Transformer transformer)
          Stops the auto transformation of transfromer.
 void transform(Ranking ranking, Transformer transformer)
          Apply the transformation of transformer on ranking.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RankingControllerImpl

public RankingControllerImpl()
Method Detail

getModel

public RankingModel getModel()
Description copied from interface: RankingController
Returns the ranking model of the current workspace.

Specified by:
getModel in interface RankingController
Returns:
the ranking model of the current workspace

getModel

public RankingModel getModel(Workspace workspace)
Description copied from interface: RankingController
Returns the ranking model of workspace. If it doesn't exists, it creates one and put it in the workspace.

Specified by:
getModel in interface RankingController
Parameters:
workspace - the workspace containing the model
Returns:
the ranking model of this workspace

setInterpolator

public void setInterpolator(Interpolator interpolator)
Description copied from interface: RankingController
Sets the interpolator to be used when transforming values. This is set to the current model only. If the model is changed (i.e. switch workspace), call this again.

Default interpolator implementations can be found in the Interpolator class.

Specified by:
setInterpolator in interface RankingController
Parameters:
interpolator - the interpolator to use for transformation.

setUseLocalScale

public void setUseLocalScale(boolean useLocalScale)
Description copied from interface: RankingController
Sets whether rankings use a local or a global scale. When calculating the minimum and maximum value (i.e. the scale) rankings can use the complete graph or only the currently visible graph. When using the visible graph it is called the local scale.

Specified by:
setUseLocalScale in interface RankingController
Parameters:
useLocalScale - true for local, false for global

transform

public void transform(Ranking ranking,
                      Transformer transformer)
Description copied from interface: RankingController
Apply the transformation of transformer on ranking. The transformer will modify element's color or size according to the values returned by the ranking. Before passing values to the transformer, they may be transformer by the current interpolator.

Specified by:
transform in interface RankingController
Parameters:
ranking - the ranking to give to the transformer
transformer - the transformer to apply on the ranking's elements

startAutoTransform

public void startAutoTransform(Ranking ranking,
                               Transformer transformer)
Description copied from interface: RankingController
Starts an auto transformation using ranking and transformer. The transformation is continuously applied to the current graph. The operation is the same as transform(), except it is applied in a loop until stopAutoTransform() is called.

Note that auto transformation work only in the current workspace and are paused when the workspace is not current.

Specified by:
startAutoTransform in interface RankingController
Parameters:
ranking - the ranking to give to the transformer
transformer - the transformer to apply on the ranking's elements

stopAutoTransform

public void stopAutoTransform(Transformer transformer)
Description copied from interface: RankingController
Stops the auto transformation of transfromer.

Specified by:
stopAutoTransform in interface RankingController
Parameters:
transformer - the transformer to stop auto transformation

Gephi Toolkit Javadoc