Class SelectionHistory
java.lang.Object
com.amalgamasimulation.desktop.appelements.utils.SelectionHistory
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether there is an object of the current scenario before the current one.booleanReturns whether there is an object of the current scenario after the current one.voidgoBack()Selects the nearest object of the current scenario before the current one and opens its property tab.voidSelects the nearest object of the current scenario after the current one and opens its property tab.
-
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.
-