Package ghidra.graph.viewer.edge
Class AbstractVisualEdge<V extends VisualVertex>
- java.lang.Object
-
- ghidra.graph.viewer.edge.AbstractVisualEdge<V>
-
- Type Parameters:
V
- the vertex type
- All Implemented Interfaces:
GEdge<V>
,VisualEdge<V>
- Direct Known Subclasses:
TestEdge
public abstract class AbstractVisualEdge<V extends VisualVertex> extends java.lang.Object implements VisualEdge<V>
An implementation ofVisualEdge
that implements the base interface so subclasses do not have to.
-
-
Constructor Summary
Constructors Constructor Description AbstractVisualEdge(V start, V end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
double
getAlpha()
Get the alpha, which determines how much of the edge is visible/see through.java.util.List<java.awt.geom.Point2D>
getArticulationPoints()
Returns the points (inGraphViewerUtils
View Space) of the articulationdouble
getEmphasis()
Returns the emphasis value of this edge.V
getEnd()
Get the end, or head, of the edgeV
getStart()
Get the start, or tail, of the edgeint
hashCode()
boolean
isInActivePath()
Returns true if this edge is part of an active path (this allows the edge to be differently rendered)boolean
isSelected()
Returns true if this edge is selectedvoid
setAlpha(double alpha)
Set the alpha, which determines how much of the edge is visible/see through.void
setArticulationPoints(java.util.List<java.awt.geom.Point2D> points)
Sets the articulation points for the given edgevoid
setEmphasis(double emphasisLevel)
Sets the emphasis value for this edge.void
setInActivePath(boolean inActivePath)
Sets this edge to be marked as in the active pathvoid
setSelected(boolean selected)
Sets this edge selectedjava.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ghidra.graph.viewer.VisualEdge
cloneEdge
-
-
-
-
Method Detail
-
getStart
public V getStart()
Description copied from interface:GEdge
Get the start, or tail, of the edgeIn the edge x -> y, x is the start
- Specified by:
getStart
in interfaceGEdge<V extends VisualVertex>
- Returns:
- the start
-
getEnd
public V getEnd()
Description copied from interface:GEdge
Get the end, or head, of the edgeIn the edge x -> y, y is the end
- Specified by:
getEnd
in interfaceGEdge<V extends VisualVertex>
- Returns:
- the end
-
setSelected
public void setSelected(boolean selected)
Description copied from interface:VisualEdge
Sets this edge selected- Specified by:
setSelected
in interfaceVisualEdge<V extends VisualVertex>
- Parameters:
selected
- true to select this edge; false to de-select this vertex
-
isSelected
public boolean isSelected()
Description copied from interface:VisualEdge
Returns true if this edge is selected- Specified by:
isSelected
in interfaceVisualEdge<V extends VisualVertex>
- Returns:
- true if this edge is selected
-
setInActivePath
public void setInActivePath(boolean inActivePath)
Description copied from interface:VisualEdge
Sets this edge to be marked as in the active path- Specified by:
setInActivePath
in interfaceVisualEdge<V extends VisualVertex>
- Parameters:
inActivePath
- true to be marked as in the active path; false to be marked as not in the active path
-
isInActivePath
public boolean isInActivePath()
Description copied from interface:VisualEdge
Returns true if this edge is part of an active path (this allows the edge to be differently rendered)- Specified by:
isInActivePath
in interfaceVisualEdge<V extends VisualVertex>
- Returns:
- true if this edge is part of the active path
-
getArticulationPoints
public java.util.List<java.awt.geom.Point2D> getArticulationPoints()
Description copied from interface:VisualEdge
Returns the points (inGraphViewerUtils
View Space) of the articulation- Specified by:
getArticulationPoints
in interfaceVisualEdge<V extends VisualVertex>
- Returns:
- the points (in View Space space) of the articulation.
-
setArticulationPoints
public void setArticulationPoints(java.util.List<java.awt.geom.Point2D> points)
Description copied from interface:VisualEdge
Sets the articulation points for the given edge- Specified by:
setArticulationPoints
in interfaceVisualEdge<V extends VisualVertex>
- Parameters:
points
- the points
-
setEmphasis
public void setEmphasis(double emphasisLevel)
Description copied from interface:VisualEdge
Sets the emphasis value for this edge. A value of 0 indicates no emphasis.- Specified by:
setEmphasis
in interfaceVisualEdge<V extends VisualVertex>
- Parameters:
emphasisLevel
- the emphasis
-
getEmphasis
public double getEmphasis()
Description copied from interface:VisualEdge
Returns the emphasis value of this edge. 0 if not emphasized.- Specified by:
getEmphasis
in interfaceVisualEdge<V extends VisualVertex>
- Returns:
- the emphasis value of this edge.
-
setAlpha
public void setAlpha(double alpha)
Description copied from interface:VisualEdge
Set the alpha, which determines how much of the edge is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.- Specified by:
setAlpha
in interfaceVisualEdge<V extends VisualVertex>
- Parameters:
alpha
- the alpha value
-
getAlpha
public double getAlpha()
Description copied from interface:VisualEdge
Get the alpha, which determines how much of the edge is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.- Specified by:
getAlpha
in interfaceVisualEdge<V extends VisualVertex>
- Returns:
- the alpha value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-