Package org.gephi.appearance.api
Interface AppearanceController
-
public interface AppearanceControllerManage and controls the appearance of elements through visual transformations.This controller is a singleton and can therefore be found in Lookup:
AppearanceController ac = Lookup.getDefault().lookup(AppearanceController.class);
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AppearanceModelgetModel()Returns the appearance model for the current workspace.AppearanceModelgetModel(Workspace workspace)Returns the appearance model for the given workspace.TransformergetTransformer(TransformerUI ui)Returns the transformer associated with the given transformer UI.voidsetTransformNullValues(boolean transformNullValues)Sets whether elements withnullvalues are also transformed.voidsetUsePartitionLocalScale(boolean useLocalScale)Sets whether partitions use a local or a global scale.voidsetUseRankingLocalScale(boolean useLocalScale)Sets whether rankings use a local or a global scale.voidtransform(Function function)Apply the function's transformer.
-
-
-
Method Detail
-
setUseRankingLocalScale
void setUseRankingLocalScale(boolean useLocalScale)
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.- Parameters:
useLocalScale-truefor local,falsefor global
-
setUsePartitionLocalScale
void setUsePartitionLocalScale(boolean useLocalScale)
Sets whether partitions use a local or a global scale. When calculating the partitions it can use the complete graph or only the currently visible graph. When using the visible graph it is called the local scale.- Parameters:
useLocalScale-truefor local,falsefor global
-
setTransformNullValues
void setTransformNullValues(boolean transformNullValues)
Sets whether elements withnullvalues are also transformed. Default value isfalse/- Parameters:
transformNullValues-trueto transform also null values,falseto ignore
-
transform
void transform(Function function)
Apply the function's transformer. If the function is for nodes all nodes in the visible graph will be transformed. Similarly for edges.- Parameters:
function- function to transform
-
getModel
AppearanceModel getModel()
Returns the appearance model for the current workspace.- Returns:
- appearance model
-
getModel
AppearanceModel getModel(Workspace workspace)
Returns the appearance model for the given workspace.- Parameters:
workspace- workspace- Returns:
- appearance model
-
getTransformer
Transformer getTransformer(TransformerUI ui)
Returns the transformer associated with the given transformer UI.- Parameters:
ui- user interface instance- Returns:
- transformer instance or null if not found
-
-