Package ghidra.graph.support
Class TextAreaTestVertex
- java.lang.Object
-
- ghidra.graph.viewer.vertex.AbstractVisualVertex
-
- ghidra.graph.graphs.AbstractTestVertex
-
- ghidra.graph.support.TextAreaTestVertex
-
- All Implemented Interfaces:
GVertex
,VisualVertex
public class TextAreaTestVertex extends AbstractTestVertex
A test vertex that allows the user t enter text and has a header for dragging.
-
-
Constructor Summary
Constructors Constructor Description TextAreaTestVertex(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
A dispose method that should be called when a vertex is reclaimed, never again to be used in a graph or displayjavax.swing.JComponent
getComponent()
Returns the component of this vertex.java.lang.String
getText()
javax.swing.JTextArea
getTextArea()
boolean
isGrabbable(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.void
setFocused(boolean focused)
Sets this vertex to be focused.void
setSelected(boolean selected)
Sets this vertex selected-
Methods inherited from class ghidra.graph.graphs.AbstractTestVertex
equals, getName, hasBeenEmphasised, hashCode, setEmphasis, toString
-
Methods inherited from class ghidra.graph.viewer.vertex.AbstractVisualVertex
getAlpha, getEmphasis, getLocation, isFocused, isHovered, isSelected, setAlpha, setHovered, setLocation
-
-
-
-
Method Detail
-
isGrabbable
public boolean isGrabbable(java.awt.Component c)
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
- Overrides:
isGrabbable
in classAbstractVisualVertex
- Parameters:
c
- the component- Returns:
- true if the component is grabbable
-
getComponent
public javax.swing.JComponent getComponent()
Description copied from interface:VisualVertex
Returns the component of this vertex. This is used for rendering and interaction with the user.- Returns:
- the component of this vertex
-
getTextArea
public javax.swing.JTextArea getTextArea()
-
getText
public java.lang.String getText()
-
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
- Overrides:
setFocused
in classAbstractVisualVertex
- Parameters:
focused
- true to focus; false to be marked as not focused
-
setSelected
public void setSelected(boolean selected)
Description copied from interface:VisualVertex
Sets this vertex selected- Specified by:
setSelected
in interfaceVisualVertex
- Overrides:
setSelected
in classAbstractVisualVertex
- Parameters:
selected
- true to select this vertex; false to de-select this vertex
-
dispose
public void dispose()
Description copied from interface:VisualVertex
A dispose method that should be called when a vertex is reclaimed, never again to be used in a graph or display- Specified by:
dispose
in interfaceVisualVertex
- Overrides:
dispose
in classAbstractTestVertex
-
-