Class GPickedState<V>
- java.lang.Object
-
- ghidra.graph.viewer.event.picking.GPickedState<V>
-
- Type Parameters:
V
- the vertex type
- All Implemented Interfaces:
edu.uci.ics.jung.visualization.picking.PickedInfo<V>
,edu.uci.ics.jung.visualization.picking.PickedState<V>
,java.awt.ItemSelectable
public class GPickedState<V> extends java.lang.Object implements edu.uci.ics.jung.visualization.picking.PickedState<V>
This picked-state is a wrapper forPickedState
that allows us to broadcast events with the trigger of that event.
-
-
Constructor Summary
Constructors Constructor Description GPickedState(edu.uci.ics.jung.visualization.picking.MultiPickedState<V> pickedState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addItemListener(java.awt.event.ItemListener l)
void
addPickingListener(PickListener<V> pickListener)
void
clear()
java.util.Set<V>
getPicked()
java.lang.Object[]
getSelectedObjects()
boolean
isPicked(V vertex)
boolean
pick(V vertex, boolean b)
void
pickToActivate(V vertex)
A convenience method to clear the current selected vertices and select the given vertexvoid
pickToSync(V vertex)
Picks the given vertex, but signals that the pick is really just to make sure that the vertex is picked in order to match the graph's notion of the current location.void
pickToSync(V vertex, boolean addToSelection)
Picks the given vertex, but signals that the pick is really just to make sure that the vertex is picked in order to match the graph's notion of the current location.void
removeItemListener(java.awt.event.ItemListener l)
void
removePickingListener(PickListener<V> pickListener)
-
-
-
Constructor Detail
-
GPickedState
public GPickedState(edu.uci.ics.jung.visualization.picking.MultiPickedState<V> pickedState)
-
-
Method Detail
-
addPickingListener
public void addPickingListener(PickListener<V> pickListener)
-
removePickingListener
public void removePickingListener(PickListener<V> pickListener)
-
pickToSync
public void pickToSync(V vertex)
Picks the given vertex, but signals that the pick is really just to make sure that the vertex is picked in order to match the graph's notion of the current location. To pick a vertex and signal that the location has changed, callpick(Object, boolean)
. Calling this method is the same as callingpickToSync(vertex, false);
- Parameters:
vertex
- the vertex to pick
-
pickToSync
public void pickToSync(V vertex, boolean addToSelection)
Picks the given vertex, but signals that the pick is really just to make sure that the vertex is picked in order to match the graph's notion of the current location. To pick a vertex and signal that the location has changed, callpick(Object, boolean)
- Parameters:
vertex
- the vertex to pickaddToSelection
- true signals that the given vertex should be picked, but not to remove any other picked vertices; false signals to pick the given vertex and to clear any other picked vertices
-
pickToActivate
public void pickToActivate(V vertex)
A convenience method to clear the current selected vertices and select the given vertex- Parameters:
vertex
- the vertex to pick
-
pick
public boolean pick(V vertex, boolean b)
- Specified by:
pick
in interfaceedu.uci.ics.jung.visualization.picking.PickedState<V>
-
clear
public void clear()
- Specified by:
clear
in interfaceedu.uci.ics.jung.visualization.picking.PickedState<V>
-
getPicked
public java.util.Set<V> getPicked()
- Specified by:
getPicked
in interfaceedu.uci.ics.jung.visualization.picking.PickedState<V>
-
isPicked
public boolean isPicked(V vertex)
-
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
- Specified by:
getSelectedObjects
in interfacejava.awt.ItemSelectable
-
addItemListener
public void addItemListener(java.awt.event.ItemListener l)
- Specified by:
addItemListener
in interfacejava.awt.ItemSelectable
-
removeItemListener
public void removeItemListener(java.awt.event.ItemListener l)
- Specified by:
removeItemListener
in interfacejava.awt.ItemSelectable
-
-