Class 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 for PickedState 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 vertex
      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.
      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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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, 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 java.util.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 java.lang.Object[] getSelectedObjects()
        Specified by:
        getSelectedObjects in interface java.awt.ItemSelectable
      • addItemListener

        public void addItemListener​(java.awt.event.ItemListener l)
        Specified by:
        addItemListener in interface java.awt.ItemSelectable
      • removeItemListener

        public void removeItemListener​(java.awt.event.ItemListener l)
        Specified by:
        removeItemListener in interface java.awt.ItemSelectable