| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.client.api.GraphDialogExtensions |
Optional extension used to customize and provide action handlers for
graph
dialogs. Custom implementations should override the methods they need.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | GraphDialogExtensions.EdgeStyle | Edge styles for rendering. | |||||||||
| enum | GraphDialogExtensions.LayoutMode | Graph rendering mode. | |||||||||
| enum | GraphDialogExtensions.VertexShape | Vertex shape for rendering. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GraphDialogExtensions() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Integer |
displayEdgesOrientation()
Specify how edge orientations should be rendered (as arrows), as well as their position on
the edge.
| ||||||||||
| int |
getCanvasNodeDensity()
Provide a custom maximum node density (per pixels) used by the high-score-only rendering
mode(s).
| ||||||||||
| String |
getDescription(int vertexId)
This method is called when additional information for a node (not held in the graph
definition) is requested by the client.
| ||||||||||
| int |
getEdgeColor(int vertexId0, int vertexId1)
Determine the color of a directed edge for rendering.
| ||||||||||
| GraphDialogExtensions.EdgeStyle |
getEdgeStyle(int vertexId0, int vertexId1)
Determine the style of an edge for rendering.
| ||||||||||
| GraphDialogExtensions.LayoutMode |
getLayoutMode()
Provide the layout mode.
| ||||||||||
| boolean |
getShowVertex(int vertexId)
When in a filtered mode, this method is called to determine whether a vertex should be shown.
| ||||||||||
| UnitAddress<?> |
getUnitAddress(int vertexId)
This method is called when client code requests a navigation action on a node.
| ||||||||||
| int |
getVertexColor(int vertexId)
Determine the base color of a vertex for rendering.
| ||||||||||
| boolean |
getVertexMark(int vertexId)
Determine if the provided vertex is marked.
| ||||||||||
| GraphDialogExtensions.VertexShape |
getVertexShape(int vertexId)
Determine the shape of a vertex for rendering.
| ||||||||||
| boolean |
processNewVertexName(int vertexId, String newName)
This method is called when a vertex is about to be renamed.
| ||||||||||
| boolean |
processVertexMark(int vertexId, boolean marking)
This method is called when the graph controller requests to mark or unmark a node.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Specify how edge orientations should be rendered (as arrows), as well as their position on the edge.
The default implementation returns null (i.e., use the defaults, currently set to 50: an arrow will be positioned right in the middle of its edge).
Provide a custom maximum node density (per pixels) used by the high-score-only rendering mode(s).
The default implementation returns -1.
This method is called when additional information for a node (not held in the graph definition) is requested by the client. E.g. the GUI client displays that information in tooltip widgets displayed when hovering over a node.)
The default implementation returns null.
| vertexId | node id |
|---|
Determine the color of a directed edge for rendering.
The default implementation returns -1.
| vertexId0 | source node |
|---|---|
| vertexId1 | destination node |
Determine the style of an edge for rendering.
The default implementation returns null.
| vertexId0 | source node |
|---|---|
| vertexId1 | destination node |
Provide the layout mode.
The default implementation returns null.
When in a filtered mode, this method is called to determine whether a vertex should be shown. (This method is only called in a filtered mode.)
The default implementation returns true.
| vertexId | node id |
|---|
This method is called when client code requests a navigation action on a node. The implementation can return a unit+address couple that clients will then attempt to navigate to.
The default implementation returns null.
| vertexId | node id |
|---|
Determine the base color of a vertex for rendering.
The default implementation returns -1.
| vertexId | an optional vertex id; -1 means any vertex |
|---|
Determine if the provided vertex is marked. A 'mark' is a boolean flag which value can be
toggled via the context menu on a node. Note that the mark is not be stored on the graph
itself. It should be stored on the model. See processVertexMark(int, boolean).
The default implementation returns false.
| vertexId | a vertex id |
|---|
Determine the shape of a vertex for rendering.
The default implementation returns null.
| vertexId | an optional vertex id; -1 means any vertex |
|---|
This method is called when a vertex is about to be renamed. The implementation can reject or accept the name, and act accordingly, e.g. by modifying underlying model data.
The default implementation returns true.
| vertexId | node id |
|---|---|
| newName | new name |
This method is called when the graph controller requests to mark or unmark a node. The implementation can reject or accept the name, and should act accordingly, e.g. by modifying underlying model data.
The default implementation returns false.
| vertexId | node id |
|---|---|
| marking | new mark value |