Package ghidra.graph.viewer.vertex
Class AbstractVisualVertex
- java.lang.Object
-
- ghidra.graph.viewer.vertex.AbstractVisualVertex
-
- All Implemented Interfaces:
GVertex,VisualVertex
- Direct Known Subclasses:
DockingVisualVertex
public abstract class AbstractVisualVertex extends java.lang.Object implements VisualVertex
AVisualVerteximplementation that implements most of the methods on the interface
-
-
Constructor Summary
Constructors Constructor Description AbstractVisualVertex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAlpha()Get the alpha, which determines how much of the vertex is visible/see through.doublegetEmphasis()Returns the emphasis value of this vertex.java.awt.geom.Point2DgetLocation()Returns the location of this vertex in the viewbooleanisFocused()Returns true if this vertex is focused (seeVisualVertex.setFocused(boolean)booleanisGrabbable(java.awt.Component c)Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.booleanisHovered()Returns true if this vertex is being hovered by the mousebooleanisSelected()Returns true if this vertex is selectedvoidsetAlpha(double alpha)Set the alpha, which determines how much of the vertex is visible/see through.voidsetEmphasis(double emphasisLevel)Sets the emphasis value for this vertex.voidsetFocused(boolean focused)Sets this vertex to be focused.voidsetHovered(boolean hovered)Sets this vertex to be hoveredvoidsetLocation(java.awt.geom.Point2D location)Sets the location of this vertex in the viewvoidsetSelected(boolean selected)Sets this vertex selected-
Methods 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
-
-
-
-
Method Detail
-
setFocused
public void setFocused(boolean focused)
Description copied from interface:VisualVertexSets 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:
setFocusedin interfaceVisualVertex- Parameters:
focused- true to focus; false to be marked as not focused
-
isFocused
public boolean isFocused()
Description copied from interface:VisualVertexReturns true if this vertex is focused (seeVisualVertex.setFocused(boolean)- Specified by:
isFocusedin interfaceVisualVertex- Returns:
- true if focused
-
setSelected
public void setSelected(boolean selected)
Description copied from interface:VisualVertexSets this vertex selected- Specified by:
setSelectedin interfaceVisualVertex- Parameters:
selected- true to select this vertex; false to de-select this vertex
-
isSelected
public boolean isSelected()
Description copied from interface:VisualVertexReturns true if this vertex is selected- Specified by:
isSelectedin interfaceVisualVertex- Returns:
- true if this vertex is selected
-
setHovered
public void setHovered(boolean hovered)
Description copied from interface:VisualVertexSets this vertex to be hovered- Specified by:
setHoveredin interfaceVisualVertex- Parameters:
hovered- true to be marked as hovered; false to be marked as not hovered
-
isHovered
public boolean isHovered()
Description copied from interface:VisualVertexReturns true if this vertex is being hovered by the mouse- Specified by:
isHoveredin interfaceVisualVertex- Returns:
- true if this vertex is being hovered by the mouse
-
setEmphasis
public void setEmphasis(double emphasisLevel)
Description copied from interface:VisualVertexSets the emphasis value for this vertex. A value of 0 indicates no emphasis.- Specified by:
setEmphasisin interfaceVisualVertex- Parameters:
emphasisLevel- the emphasis
-
getEmphasis
public double getEmphasis()
Description copied from interface:VisualVertexReturns the emphasis value of this vertex. 0 if not emphasized.- Specified by:
getEmphasisin interfaceVisualVertex- Returns:
- the emphasis value of this vertex.
-
getLocation
public java.awt.geom.Point2D getLocation()
Description copied from interface:VisualVertexReturns the location of this vertex in the view- Specified by:
getLocationin interfaceVisualVertex- Returns:
- the location of this vertex in the view
-
setLocation
public void setLocation(java.awt.geom.Point2D location)
Description copied from interface:VisualVertexSets the location of this vertex in the view- Specified by:
setLocationin interfaceVisualVertex- Parameters:
location- the location of this vertex in the view
-
setAlpha
public void setAlpha(double alpha)
Description copied from interface:VisualVertexSet 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:
setAlphain interfaceVisualVertex
-
getAlpha
public double getAlpha()
Description copied from interface:VisualVertexGet 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:
getAlphain interfaceVisualVertex- Returns:
- the alpha value
-
isGrabbable
public boolean isGrabbable(java.awt.Component c)
Description copied from interface:VisualVertexReturns 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:
isGrabbablein interfaceVisualVertex- Parameters:
c- the component- Returns:
- true if the component is grabbable
-
-