Interface VisualizationController


public interface VisualizationController
Main controller for visualization settings and operations.

Provides access to the visualization model and methods to modify visualization settings.

Author:
Mathieu Bastian
  • Method Details

    • getModel

      VisualizationModel getModel()
      Returns the visualization model for the current workspace.
      Returns:
      the current visualization model
    • getModel

      VisualizationModel getModel(org.gephi.project.api.Workspace workspace)
      Returns the visualization model for the specified workspace.
      Parameters:
      workspace - the workspace
      Returns:
      the visualization model for the workspace
    • getScreenshotController

      ScreenshotController getScreenshotController()
      Returns the screenshot controller.
      Returns:
      the screenshot controller
    • setZoom

      void setZoom(float zoom)
      Sets the zoom level.
      Parameters:
      zoom - the zoom level
    • setAutoSelectNeighbors

      void setAutoSelectNeighbors(boolean autoSelectNeighbors)
      Sets whether neighbors are automatically selected when a node is selected.
      Parameters:
      autoSelectNeighbors - true to enable, false to disable
    • setBackgroundColor

      void setBackgroundColor(Color color)
      Sets the background color of the visualization canvas.
      Parameters:
      color - the background color
    • setNodeScale

      void setNodeScale(float nodeScale)
      Sets the node size scaling factor.
      Parameters:
      nodeScale - the node scale
    • setShowEdges

      void setShowEdges(boolean showEdges)
      Sets whether edges are visible.
      Parameters:
      showEdges - true to show edges, false to hide them
    • setEdgeColorMode

      void setEdgeColorMode(EdgeColorMode mode)
      Sets the edge color mode.
      Parameters:
      mode - the edge color mode
    • setEdgeSelectionColor

      void setEdgeSelectionColor(boolean edgeSelectionColor)
      Sets whether selected edges use custom selection colors.
      Parameters:
      edgeSelectionColor - true to enable selection colors, false to disable
    • setEdgeInSelectionColor

      void setEdgeInSelectionColor(Color edgeInSelectionColor)
      Sets the color for selected incoming edges.
      Parameters:
      edgeInSelectionColor - the incoming edge selection color
    • setEdgeOutSelectionColor

      void setEdgeOutSelectionColor(Color edgeOutSelectionColor)
      Sets the color for selected outgoing edges.
      Parameters:
      edgeOutSelectionColor - the outgoing edge selection color
    • setEdgeBothSelectionColor

      void setEdgeBothSelectionColor(Color edgeBothSelectionColor)
      Sets the color for selected bidirectional edges.
      Parameters:
      edgeBothSelectionColor - the bidirectional edge selection color
    • setEdgeScale

      void setEdgeScale(float edgeScale)
      Sets the edge thickness scaling factor.
      Parameters:
      edgeScale - the edge scale
    • setUseEdgeWeight

      void setUseEdgeWeight(boolean useEdgeWeight)
      Sets whether edge weights affect edge thickness.
      Parameters:
      useEdgeWeight - true to enable, false to disable
    • setRescaleEdgeWeight

      void setRescaleEdgeWeight(boolean rescaleEdgeWeight)
      Sets whether edge weights are rescaled to fit within the specified min and max thickness.
      Parameters:
      rescaleEdgeWeight - true to enable, false to disable
    • setLightenNonSelectedAuto

      void setLightenNonSelectedAuto(boolean lightenNonSelectedAuto)
      Sets whether non-selected elements are automatically lightened.
      Parameters:
      lightenNonSelectedAuto - true to enable, false to disable
    • setHideNonSelectedEdges

      void setHideNonSelectedEdges(boolean hideNonSelectedEdges)
      Sets whether non-selected edges are hidden.
      Parameters:
      hideNonSelectedEdges - true to hide, false to show
    • setEdgeWeightEstimator

      void setEdgeWeightEstimator(org.gephi.graph.api.Estimator estimator)
      Sets the estimator used for dynamic edge weights.
      Parameters:
      estimator - the edge weight estimator
    • centerOnGraph

      void centerOnGraph()
      Centers the view on the entire graph.
    • centerOnZero

      void centerOnZero()
      Centers the view on the origin (0, 0) with default dimensions.
    • centerOn

      void centerOn(float x, float y, float width, float height)
      Centers the view on the specified rectangular area.
      Parameters:
      x - the x coordinate
      y - the y coordinate
      width - the width
      height - the height
    • centerOnNode

      void centerOnNode(org.gephi.graph.api.Node node)
      Centers the view on the specified node.
      Parameters:
      node - the node to center on
    • centerOnEdge

      void centerOnEdge(org.gephi.graph.api.Edge edge)
      Centers the view on the specified edge.
      Parameters:
      edge - the edge to center on
    • addPropertyChangeListener

      void addPropertyChangeListener(VisualizationPropertyChangeListener listener)
      Adds a property change listener.
      Parameters:
      listener - the listener to add
    • removePropertyChangeListener

      void removePropertyChangeListener(VisualizationPropertyChangeListener listener)
      Removes a property change listener.
      Parameters:
      listener - the listener to remove
    • addListener

      void addListener(VisualizationEventListener listener)
      Adds a visualization event listener.
      Parameters:
      listener - the listener to add
    • removeListener

      void removeListener(VisualizationEventListener listener)
      Removes a visualization event listener.
      Parameters:
      listener - the listener to remove
    • disableSelection

      void disableSelection()
      Disables all selection modes.
    • setRectangleSelection

      void setRectangleSelection()
      Enables rectangle selection mode.
    • setDirectMouseSelection

      void setDirectMouseSelection()
      Enables direct mouse selection mode.
    • setCustomSelection

      void setCustomSelection()
      Enables custom selection mode.
    • setNodeSelection

      void setNodeSelection(boolean singleNode)
      Enables node selection mode.
      Parameters:
      singleNode - true for single node selection, false for multiple
    • setMouseSelectionDiameter

      void setMouseSelectionDiameter(int diameter)
      Sets the mouse selection diameter in pixels.
      Parameters:
      diameter - the selection diameter
    • setMouseSelectionZoomProportional

      void setMouseSelectionZoomProportional(boolean proportional)
      Sets whether the mouse selection diameter scales with zoom.
      Parameters:
      proportional - true to enable zoom proportional, false otherwise
    • resetSelection

      void resetSelection()
      Resets the current selection.
    • selectNodes

      void selectNodes(org.gephi.graph.api.Node[] nodes)
      Selects the specified nodes.
      Parameters:
      nodes - the nodes to select or null to clear node selection
    • selectEdges

      void selectEdges(org.gephi.graph.api.Edge[] edges)
      Selects the specified edges.
      Parameters:
      edges - the edges to select or null to clear edge selection
    • setShowNodeLabels

      void setShowNodeLabels(boolean showNodeLabels)
      Sets whether node labels are visible.
      Parameters:
      showNodeLabels - true to show node labels, false to hide them
    • setNodeLabelFont

      void setNodeLabelFont(Font font)
      Sets the font used for node labels.
      Parameters:
      font - the node label font
    • setNodeLabelScale

      void setNodeLabelScale(float scale)
      Sets the node label size scaling factor.
      Parameters:
      scale - the node label scale
    • setHideNonSelectedNodeLabels

      void setHideNonSelectedNodeLabels(boolean hideNonSelected)
      Sets whether non-selected node labels are hidden.
      Parameters:
      hideNonSelected - true to hide, false to show
    • setNodeLabelColorMode

      void setNodeLabelColorMode(LabelColorMode mode)
      Sets the node label color mode.
      Parameters:
      mode - the node label color mode
    • setNodeLabelSizeMode

      void setNodeLabelSizeMode(LabelSizeMode mode)
      Sets the node label size mode.
      Parameters:
      mode - the node label size mode
    • setNodeLabelColumns

      void setNodeLabelColumns(org.gephi.graph.api.Column[] columns)
      Sets the columns used to generate node labels.
      Parameters:
      columns - the node label columns
    • setNodeLabelFitToNodeSize

      void setNodeLabelFitToNodeSize(boolean fitToNodeSize)
      Sets whether node labels are constrained to fit within node size.
      Parameters:
      fitToNodeSize - true to enable, false to disable
    • setAvoidNodeLabelOverlap

      void setAvoidNodeLabelOverlap(boolean avoidOverlap)
      Sets whether node label overlap avoidance is enabled.
      Parameters:
      avoidOverlap - true to enable, false to disable
    • setShowEdgeLabels

      void setShowEdgeLabels(boolean showEdgeLabels)
      Sets whether edge labels are visible.
      Parameters:
      showEdgeLabels - true to show edge labels, false to hide them
    • setEdgeLabelFont

      void setEdgeLabelFont(Font font)
      Sets the font used for edge labels.
      Parameters:
      font - the edge label font
    • setEdgeLabelScale

      void setEdgeLabelScale(float scale)
      Sets the edge label size scaling factor.
      Parameters:
      scale - the edge label scale
    • setEdgeLabelColorMode

      void setEdgeLabelColorMode(LabelColorMode mode)
      Sets the edge label color mode.
      Parameters:
      mode - the edge label color mode
    • setEdgeLabelSizeMode

      void setEdgeLabelSizeMode(LabelSizeMode mode)
      Sets the edge label size mode.
      Parameters:
      mode - the edge label size mode
    • setHideNonSelectedEdgeLabels

      void setHideNonSelectedEdgeLabels(boolean hideNonSelected)
      Sets whether non-selected edge labels are hidden.
      Parameters:
      hideNonSelected - true to hide, false to show
    • setEdgeLabelColumns

      void setEdgeLabelColumns(org.gephi.graph.api.Column[] columns)
      Sets the columns used to generate edge labels.
      Parameters:
      columns - the edge label columns