Class TLcyGXYNewControllerActiveSettable

All Implemented Interfaces:
ILcyActiveSettable, ILcyCustomizableRepresentationActiveSettable, ILcdPropertyChangeSource, Serializable

public class TLcyGXYNewControllerActiveSettable extends ALcyGXYNewControllerActiveSettable<TLcdGXYNewController2>
ALcyGXYNewControllerActiveSettable implementation for a TLcdGXYNewController2.
See Also:
  • Constructor Details

    • TLcyGXYNewControllerActiveSettable

      public TLcyGXYNewControllerActiveSettable(ALcyGXYNewControllerModel aControllerModel, ILcyLucyEnv aLucyEnv)
      Utility constructor that creates a new TLcyNewController2ActiveSettable for the given ALcyGXYNewControllerModel using a new TLcdGXYNewController2. It performs these steps automatically:
      • The snappables (setSnappables) of the created TLcdGXYNewController2 is set to aControllerModel.getMapComponent().getSnapList()
      • The setActionToTriggerAfterCommit of the new controller is initialized with an action that switches back to the select controller of the current map
      • The controller is automatically combined with the navigate controller (to support the scroll wheel): TLcyGXYSetControllerActiveSettable.combineWithNavigateController
      Parameters:
      aControllerModel - model to use for creating the new instance
      aLucyEnv - The current Lucy environment
    • TLcyGXYNewControllerActiveSettable

      public TLcyGXYNewControllerActiveSettable(ALcdGXYNewControllerModel2 aControllerModel, ILcyMapComponent aMapComponent, ILcyLucyEnv aLucyEnv)
      Utility constructor that creates a new TLcyNewController2ActiveSettable for the given ALcdGXYNewControllerModel2 using a new TLcdGXYNewController2. It performs these steps automatically:
      • The snappables (setSnappables) of the created TLcdGXYNewController2 is set to aMapComponent.getSnapList()
      • The action that is performed after an object is drawn on the map, activates the select controller: aMapComponent.retrieveAvailableGXYController( TLcyMapComponentFactory.SELECT_CONTROLLER )
      • The controller is automatically combined with the navigate controller (to support the scroll wheel): TLcyGXYSetControllerActiveSettable.combineWithNavigateController
      Parameters:
      aControllerModel - model to use for creating the new instance
      aMapComponent - The map component
      aLucyEnv - The current Lucy environment
    • TLcyGXYNewControllerActiveSettable

      public TLcyGXYNewControllerActiveSettable(TLcdGXYNewController2 aGXYNewController, ILcdGXYView aGXYView, ILcdAction aActionToTriggerAfterCreation, ILcyLucyEnv aLucyEnv)
      Constructor that creates a new TLcyNewController2ActiveSettable given a TLcdGXYNewController2, a view and an action.
      Parameters:
      aGXYNewController - The controller to set active.
      aGXYView - The view where the controller will be set in
      aActionToTriggerAfterCreation - The action that is trigger after a new instance has been
      aLucyEnv - The current Lucy environment
    • TLcyGXYNewControllerActiveSettable

      public TLcyGXYNewControllerActiveSettable(TLcdGXYNewController2 aGXYNewController, ILcdGXYView aGXYView, ILcdAction aActionToTriggerAfterCreation, ILcdGXYController aControllerToSetToView, ILcyLucyEnv aLucyEnv)
      Constructor that creates a new TLcyNewController2ActiveSettable given a TLcdGXYNewController2, a view and an action.
      Parameters:
      aGXYNewController - The new controller to set active. Its property setActionToTriggerAfterCommit is modified to have the special double click behavior (see class comment).
      aGXYView - The view where the controller will be set in
      aActionToTriggerAfterCreation - The action that is triggered after a new instance has been
      aControllerToSetToView - The controller that is actually set to the ILcdGXYView using setGXYController. It can be different from aNewController to allow wrapping the controller, for example by using combineWithNavigateController.
      aLucyEnv - The current Lucy environment
  • Method Details

    • isKeepActiveTrigger

      protected boolean isKeepActiveTrigger(MouseEvent aEvent)
      Determines if the controller should be kept active after the given mouse event. Keeping the controller active allows the user to create multiple instances in a row.
      Parameters:
      aEvent - the mouse event
      Returns:
      True if the controller should keep active.