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>, ItemSelectable

public class GPickedState<V> extends Object implements edu.uci.ics.jung.visualization.picking.PickedState<V>
This picked-state is a wrapper for PickedState that allows us to broadcast events with the trigger of that event.
  • Constructor Details

    • GPickedState

      public GPickedState(edu.uci.ics.jung.visualization.picking.MultiPickedState<V> pickedState)
  • Method Details

    • 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, call pick(Object, boolean). Calling this method is the same as calling
      pickToSync(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, call pick(Object, boolean)
      Parameters:
      vertex - the vertex to pick
      addToSelection - 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 interface edu.uci.ics.jung.visualization.picking.PickedState<V>
    • clear

      public void clear()
      Specified by:
      clear in interface edu.uci.ics.jung.visualization.picking.PickedState<V>
    • getPicked

      public Set<V> getPicked()
      Specified by:
      getPicked in interface edu.uci.ics.jung.visualization.picking.PickedState<V>
    • isPicked

      public boolean isPicked(V vertex)
      Specified by:
      isPicked in interface edu.uci.ics.jung.visualization.picking.PickedInfo<V>
      Specified by:
      isPicked in interface edu.uci.ics.jung.visualization.picking.PickedState<V>
    • getSelectedObjects

      public Object[] getSelectedObjects()
      Specified by:
      getSelectedObjects in interface ItemSelectable
    • addItemListener

      public void addItemListener(ItemListener l)
      Specified by:
      addItemListener in interface ItemSelectable
    • removeItemListener

      public void removeItemListener(ItemListener l)
      Specified by:
      removeItemListener in interface ItemSelectable