Package ghidra.graph.viewer.vertex
Class AbstractVisualVertex
java.lang.Object
ghidra.graph.viewer.vertex.AbstractVisualVertex
- All Implemented Interfaces:
GVertex
,VisualVertex
- Direct Known Subclasses:
DockingVisualVertex
A
VisualVertex
implementation that implements most of the methods on the interface-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAlpha()
Get the alpha, which determines how much of the vertex is visible/see through.double
Returns the emphasis value of this vertex.Returns the location of this vertex in the viewboolean
Returns true if this vertex is focused (seeVisualVertex.setFocused(boolean)
boolean
Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.boolean
Returns true if this vertex is being hovered by the mouseboolean
Returns true if this vertex is selectedvoid
setAlpha
(double alpha) Set the alpha, which determines how much of the vertex is visible/see through.void
setEmphasis
(double emphasisLevel) Sets the emphasis value for this vertex.void
setFocused
(boolean focused) Sets this vertex to be focused.void
setHovered
(boolean hovered) Sets this vertex to be hoveredvoid
setLocation
(Point2D location) Sets the location of this vertex in the viewvoid
setSelected
(boolean selected) Sets this vertex selectedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.graph.viewer.VisualVertex
dispose, getComponent
-
Constructor Details
-
AbstractVisualVertex
public AbstractVisualVertex()
-
-
Method Details
-
setFocused
public void setFocused(boolean focused) Description copied from interface:VisualVertex
Sets this vertex to be focused. This differs from being selected in that multiple vertices in a graph can be selected, but only one can be the focused vertex.- Specified by:
setFocused
in interfaceVisualVertex
- Parameters:
focused
- true to focus; false to be marked as not focused
-
isFocused
public boolean isFocused()Description copied from interface:VisualVertex
Returns true if this vertex is focused (seeVisualVertex.setFocused(boolean)
- Specified by:
isFocused
in interfaceVisualVertex
- Returns:
- true if focused
-
setSelected
public void setSelected(boolean selected) Description copied from interface:VisualVertex
Sets this vertex selected- Specified by:
setSelected
in interfaceVisualVertex
- Parameters:
selected
- true to select this vertex; false to de-select this vertex
-
isSelected
public boolean isSelected()Description copied from interface:VisualVertex
Returns true if this vertex is selected- Specified by:
isSelected
in interfaceVisualVertex
- Returns:
- true if this vertex is selected
-
setHovered
public void setHovered(boolean hovered) Description copied from interface:VisualVertex
Sets this vertex to be hovered- Specified by:
setHovered
in interfaceVisualVertex
- Parameters:
hovered
- true to be marked as hovered; false to be marked as not hovered
-
isHovered
public boolean isHovered()Description copied from interface:VisualVertex
Returns true if this vertex is being hovered by the mouse- Specified by:
isHovered
in interfaceVisualVertex
- Returns:
- true if this vertex is being hovered by the mouse
-
setEmphasis
public void setEmphasis(double emphasisLevel) Description copied from interface:VisualVertex
Sets the emphasis value for this vertex. A value of 0 indicates no emphasis.- Specified by:
setEmphasis
in interfaceVisualVertex
- Parameters:
emphasisLevel
- the emphasis
-
getEmphasis
public double getEmphasis()Description copied from interface:VisualVertex
Returns the emphasis value of this vertex. 0 if not emphasized.- Specified by:
getEmphasis
in interfaceVisualVertex
- Returns:
- the emphasis value of this vertex.
-
getLocation
Description copied from interface:VisualVertex
Returns the location of this vertex in the view- Specified by:
getLocation
in interfaceVisualVertex
- Returns:
- the location of this vertex in the view
-
setLocation
Description copied from interface:VisualVertex
Sets the location of this vertex in the view- Specified by:
setLocation
in interfaceVisualVertex
- Parameters:
location
- the location of this vertex in the view
-
setAlpha
public void setAlpha(double alpha) Description copied from interface:VisualVertex
Set the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.- Specified by:
setAlpha
in interfaceVisualVertex
- Parameters:
alpha
- the alpha value
-
getAlpha
public double getAlpha()Description copied from interface:VisualVertex
Get the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.- Specified by:
getAlpha
in interfaceVisualVertex
- Returns:
- the alpha value
-
isGrabbable
Description copied from interface:VisualVertex
Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.This is used to differentiate components within a vertex that should receive mouse events versus those components that will not be given mouse events.
- Specified by:
isGrabbable
in interfaceVisualVertex
- Parameters:
c
- the component- Returns:
- true if the component is grabbable
-