Class SelectionHistory

java.lang.Object
com.amalgamasimulation.desktop.appelements.utils.SelectionHistory

@Creatable @Singleton public class SelectionHistory extends Object
History of objects selected in the application, for the Back and Forward toolbar buttons. It keeps up to the last 50 new objects sent with PROPERTY_SELECTION_CHANGED, together with the property tab that is open for each object. Back and Forward select the object again and open its tab. Objects that are not in the current scenario are skipped.

Handlers get the single instance by injection. The injector creates the instance at the first injection, and the instance records only the events after that.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether there is an object of the current scenario before the current one.
    boolean
    Returns whether there is an object of the current scenario after the current one.
    void
    Selects the nearest object of the current scenario before the current one and opens its property tab.
    void
    Selects the nearest object of the current scenario after the current one and opens its property tab.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SelectionHistory

      public SelectionHistory()
  • Method Details

    • canGoBack

      public boolean canGoBack()
      Returns whether there is an object of the current scenario before the current one.
    • goBack

      public void goBack()
      Selects the nearest object of the current scenario before the current one and opens its property tab. Does nothing if there is no such object.
    • canGoForward

      public boolean canGoForward()
      Returns whether there is an object of the current scenario after the current one.
    • goForward

      public void goForward()
      Selects the nearest object of the current scenario after the current one and opens its property tab. Does nothing if there is no such object.