Package ghidra.service.graph
Class GraphDisplayOptionsBuilder
java.lang.Object
ghidra.service.graph.GraphDisplayOptionsBuilder
Builder for building
GraphDisplayOptions
-
Constructor Summary
ConstructorDescriptionGraphDisplayOptionsBuilder
(GraphType graphType) Create a new GraphDisplayOptionsBuilder -
Method Summary
Modifier and TypeMethodDescriptionarrowLength
(int length) Sets the length of the arrows to display in the graph.build()
Returns a GraphTypeDisplayOptions as configured by this builderSets the default edge color for edges that don't have a registered edge typedefaultLayoutAlgorithm
(String string) Sets the name of the layout algorithm that will be used to initially layout the graphSets the default vertex color for vertexes that don't have a registered vertex typedefaultVertexShape
(VertexShape vertexShape) Sets the default vertex shape for vertices that don't have a registered vertex typeSets the color for edges of the given typeedgeColorOverrideAttribute
(String colorAttributeKey) Sets the attribute used to override the color for a edgeedgeSelectionColor
(Color color) Sets the edge selection colorlabelPosition
(GraphLabelPosition labelPosition) Sets the vertex label position relative to vertex shape.maxNodeCount
(int maxNodeCount) Sets the maximum number of nodes a graph can have and still be displayed.shapeOverrideAttribute
(String shapeAttributeKey) Sets the attribute used to override the shape for a vertexuseIcons
(boolean b) Sets drawing "mode" for the graph display.vertex
(String vertexType, VertexShape vertexShape, Color color) Sets the shape and color for vertices of the given typevertexColorOverrideAttribute
(String colorAttributeKey) Sets the attribute used to override the color for a vertexvertexSelectionColor
(Color color) Sets the vertex selection color
-
Constructor Details
-
GraphDisplayOptionsBuilder
Create a new GraphDisplayOptionsBuilder- Parameters:
graphType
- theGraphType
of graphs that this instance configures.
-
-
Method Details
-
defaultVertexColor
Sets the default vertex color for vertexes that don't have a registered vertex type- Parameters:
c
- the default vertex color- Returns:
- this GraphDisplayOptionsBuilder
-
defaultEdgeColor
Sets the default edge color for edges that don't have a registered edge type- Parameters:
c
- the default edge color- Returns:
- this GraphDisplayOptionsBuilder
-
vertexSelectionColor
Sets the vertex selection color- Parameters:
color
- the vertex selection color- Returns:
- this GraphDisplayOptionsBuilder
-
edgeSelectionColor
Sets the edge selection color- Parameters:
color
- the edge selection color- Returns:
- this GraphDisplayOptionsBuilder
-
defaultVertexShape
Sets the default vertex shape for vertices that don't have a registered vertex type- Parameters:
vertexShape
- theVertexShape
to use as a default- Returns:
- this GraphDisplayOptionsBuilder
-
vertex
Sets the shape and color for vertices of the given type- Parameters:
vertexType
- the vertex type to assign shape and colorvertexShape
- the shape to use for the named vertex typecolor
- the color to use for the named vertex type- Returns:
- this GraphDisplayOptionsBuilder
-
edge
Sets the color for edges of the given type- Parameters:
edgeType
- the edge type to assign colorcolor
- the color to use for the named edge type- Returns:
- this GraphDisplayOptionsBuilder
-
vertexColorOverrideAttribute
Sets the attribute used to override the color for a vertex- Parameters:
colorAttributeKey
- the attribute key to use for overriding a vertex color- Returns:
- this GraphDisplayOptionsBuilder
-
edgeColorOverrideAttribute
Sets the attribute used to override the color for a edge- Parameters:
colorAttributeKey
- the attribute key to use for overriding an edge color- Returns:
- this GraphDisplayOptionsBuilder
-
shapeOverrideAttribute
Sets the attribute used to override the shape for a vertex- Parameters:
shapeAttributeKey
- the attribute key to use of shape override- Returns:
- this GraphDisplayOptionsBuilder
-
defaultLayoutAlgorithm
Sets the name of the layout algorithm that will be used to initially layout the graph- Parameters:
string
- the name of the layout algoritm to use to initially layout the graph- Returns:
- this GraphDisplayOptionsBuilder
-
useIcons
Sets drawing "mode" for the graph display. If true, vertices are drawn as scaled cached images with the label inside the shapes. If false, vertices are drawn as smaller shapes with labels drawn near the shapes.- Parameters:
b
- true to use pre-rendered icon images- Returns:
- this GraphDisplayOptionsBuilder
-
arrowLength
Sets the length of the arrows to display in the graph. The width will be sized proportionately.- Parameters:
length
- the length the arrows to display in the graph- Returns:
- this GraphDisplayOptionsBuilder
-
maxNodeCount
Sets the maximum number of nodes a graph can have and still be displayed.- Parameters:
maxNodeCount
- the maximum number of nodes- Returns:
- this GraphDisplayOptionsBuilder
-
labelPosition
Sets the vertex label position relative to vertex shape. This is only applicable if theuseIcons(boolean)
is set to false.- Parameters:
labelPosition
- the relative position to place the vertex label- Returns:
- this GraphDisplayOptionsBuilder
-
build
Returns a GraphTypeDisplayOptions as configured by this builder- Returns:
- a GraphTypeDisplayOptions as configured by this builder
-