Interface ObjectChooser<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Detail

      • isPickmapActive

        boolean isPickmapActive()
        Return if the Pickmap Chooser is active.
        Returns:
        true if the Pickmap Chooser is active, or false if the Archetype Chooser is active.
      • moveArchetypeChooserToFront

        void moveArchetypeChooserToFront()
        Move the Archetype Chooser in front of the Pickmap Chooser.
      • movePickmapChooserToFront

        void movePickmapChooserToFront()
        Move the Pickmap Chooser in front of the Archetype Chooser.
      • getCursorSelection

        @Nullable
        @Nullable BaseObject<G,​A,​R,​?> getCursorSelection()
        Returns the selected archetype (if the archetype chooser is active) or the game object selected by the map cursor (if the pickmap chooser) is active.
        Returns:
        the selection or null
      • getSelection

        @Nullable
        @Nullable BaseObject<G,​A,​R,​?> getSelection()
        Returns the active arch in the left-side panel. This can either be a default arch from the archetype set, or a custom game object from a pickmap. IMPORTANT: The returned BaseObject is not a clone. A copy must be generated before inserting such an object to the map.
        Returns:
        the active arch in the left-side panel
      • getSelections

        @NotNull
        @NotNull java.util.List<? extends BaseObject<G,​A,​R,​?>> getSelections()
        Returns the selected arches in the left-side panel. This can either be default arches, or custom arches from a pickmap. IMPORTANT: The returned GameObject list contains no clone. A copy must be generated before inserting such arches to the map.
        Returns:
        the selected arches in the left-side panel
      • isMatching

        boolean isMatching​(@NotNull
                           G gameObject)
        Returns whether the current selection matches a given game object.
        Parameters:
        gameObject - the game object to match
        Returns:
        whether the game object matches the selection
      • addObjectChooserListener

        void addObjectChooserListener​(@NotNull
                                      @NotNull ObjectChooserListener<G,​A,​R> listener)
        Adds a listener to be notified.
        Parameters:
        listener - the listener to add
      • removeObjectChooserListener

        void removeObjectChooserListener​(@NotNull
                                         @NotNull ObjectChooserListener<G,​A,​R> listener)
        Removes a listener to be notified.
        Parameters:
        listener - the listener to remove