Class AbstractMapViewSettings

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addMapViewSettingsListener​(@NotNull MapViewSettingsListener listener)
      Register a MapViewSettingsListener.
      void clearAlpha()
      Clear the transparency.
      int getEditType()
      Returns the currently set edit type.
      boolean isAlphaType​(int v)
      Returns whether the specified edit type is to be shown transparent.
      boolean isAutojoin()
      Returns whether "autojoin" is enabled.
      boolean isDoubleFaces()
      Get whether double faces are drawn double height.
      boolean isEditType​(int editType)
      Get information on the current state of edit type.
      boolean isEditType​(@NotNull BaseObject<?,​?,​?,​?> gameObject)
      Get information whether the gameObject is edited.
      boolean isEditTypeSet()
      Returns whether a editType value is set so that not all squares are displayed.
      boolean isGridVisible()
      Get the visibility of the grid.
      boolean isLightVisible()
      Get the visibility of the light.
      boolean isSmoothing()
      Returns the smoothing setting.
      boolean isTileStretching()
      Returns the tile-stretching setting.
      protected abstract int loadAlphaType()
      Loads the default value for alphaType.
      protected abstract boolean loadAutojoin()
      Loads the default value for autojoin.
      protected abstract boolean loadDoubleFaces()
      Loads the default value for doubleFaces.
      protected abstract int loadEditType()
      Loads the default value for editType.
      protected abstract boolean loadGridVisible()
      Loads the default value for gridVisible.
      protected abstract boolean loadLightVisible()
      Loads the default value for lightVisible.
      protected abstract boolean loadSmoothing()
      Loads the default value for smoothing.
      protected abstract boolean loadTileStretching()
      Loads the default value for tileStretching.
      void removeMapViewSettingsListener​(@NotNull MapViewSettingsListener listener)
      Unregister a MapViewSettingsListener.
      protected abstract void saveAlphaType​(int alphaType)
      Saves the alphaType value.
      protected abstract void saveAutojoin​(boolean autojoin)
      Saves the autojoin value.
      protected abstract void saveDoubleFaces​(boolean doubleFaces)
      Saves the doubleFaces value.
      protected abstract void saveGridVisible​(boolean gridVisible)
      Saves the gridVisible value.
      protected abstract void saveLightVisible​(boolean lightVisible)
      Saves the lightVisible value.
      protected abstract void saveSmoothing​(boolean smoothing)
      Saves the smoothing value.
      protected abstract void saveTileStretching​(boolean tileStretching)
      Saves the tileStretching value.
      void setAlphaType​(int v, boolean state)
      Sets whether the specified edit type is to be shown transparent.
      void setAutojoin​(boolean autojoin)
      Sets the "autojoin" state.
      void setDoubleFaces​(boolean doubleFaces)
      Sets whether double faces should be drawn double height.
      void setGridVisible​(boolean gridVisible)
      Set the visibility of the grid.
      void setLightVisible​(boolean lightVisible)
      Set the visibility of the light.
      void setSmoothing​(boolean smoothing)
      Sets the smoothing setting.
      void setTileStretching​(boolean tileStretching)
      Sets the tile-stretching setting.
      void toggleEditType​(int editType)
      Toggle an edit type.
      void unsetEditType​(int editType)
      Set the map view to hide squares of the given type.
      • Methods inherited from class java.lang.Object

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

      • AbstractMapViewSettings

        public AbstractMapViewSettings()
    • Method Detail

      • isGridVisible

        public boolean isGridVisible()
        Description copied from interface: MapViewSettings
        Get the visibility of the grid.
        Specified by:
        isGridVisible in interface MapViewSettings
        Returns:
        visibility of the grid (true for visible, false for invisible)
      • setGridVisible

        public void setGridVisible​(boolean gridVisible)
        Description copied from interface: MapViewSettings
        Set the visibility of the grid.
        Specified by:
        setGridVisible in interface MapViewSettings
        Parameters:
        gridVisible - new visibility of the grid (true for making the grid visible, false for invisible)
      • isLightVisible

        public boolean isLightVisible()
        Description copied from interface: MapViewSettings
        Get the visibility of the light.
        Specified by:
        isLightVisible in interface MapViewSettings
        Returns:
        visibility of the light (true for visible, false for invisible)
      • setLightVisible

        public void setLightVisible​(boolean lightVisible)
        Description copied from interface: MapViewSettings
        Set the visibility of the light.
        Specified by:
        setLightVisible in interface MapViewSettings
        Parameters:
        lightVisible - new visibility of the light (true for making the light visible, false for invisible)
      • isSmoothing

        public boolean isSmoothing()
        Description copied from interface: MapViewSettings
        Returns the smoothing setting.
        Specified by:
        isSmoothing in interface MapViewSettings
        Returns:
        the smoothing setting
      • setSmoothing

        public void setSmoothing​(boolean smoothing)
        Description copied from interface: MapViewSettings
        Sets the smoothing setting.
        Specified by:
        setSmoothing in interface MapViewSettings
        Parameters:
        smoothing - the new smoothing setting
      • isTileStretching

        public boolean isTileStretching()
        Description copied from interface: MapViewSettings
        Returns the tile-stretching setting.
        Specified by:
        isTileStretching in interface MapViewSettings
        Returns:
        the tile-stretching setting
      • setTileStretching

        public void setTileStretching​(boolean tileStretching)
        Description copied from interface: MapViewSettings
        Sets the tile-stretching setting.
        Specified by:
        setTileStretching in interface MapViewSettings
        Parameters:
        tileStretching - the new tile-stretching setting
      • isDoubleFaces

        public boolean isDoubleFaces()
        Description copied from interface: MapViewSettings
        Get whether double faces are drawn double height.
        Specified by:
        isDoubleFaces in interface MapViewSettings
        Returns:
        true if double faces are drawn double height, otherwise false
      • setDoubleFaces

        public void setDoubleFaces​(boolean doubleFaces)
        Description copied from interface: MapViewSettings
        Sets whether double faces should be drawn double height.
        Specified by:
        setDoubleFaces in interface MapViewSettings
        Parameters:
        doubleFaces - whether double faces should be drawn double height
      • isAlphaType

        public boolean isAlphaType​(int v)
        Description copied from interface: MapViewSettings
        Returns whether the specified edit type is to be shown transparent.
        Specified by:
        isAlphaType in interface MapViewSettings
        Parameters:
        v - edit type to check
        Returns:
        true if to be displayed transparent, otherwise false
      • setAlphaType

        public void setAlphaType​(int v,
                                 boolean state)
        Description copied from interface: MapViewSettings
        Sets whether the specified edit type is to be shown transparent.
        Specified by:
        setAlphaType in interface MapViewSettings
        Parameters:
        v - edit type to set
        state - state, true to make edit type true transparent, false for opaque
      • getEditType

        public int getEditType()
        Description copied from interface: MapViewSettings
        Returns the currently set edit type.
        Specified by:
        getEditType in interface MapViewSettings
        Returns:
        the currently set edit type
      • unsetEditType

        public void unsetEditType​(int editType)
        Description copied from interface: MapViewSettings
        Set the map view to hide squares of the given type. (If no edit type is set, everything is displayed)
        Specified by:
        unsetEditType in interface MapViewSettings
        Parameters:
        editType - edit type bitmask of types to hide
      • isEditType

        public boolean isEditType​(int editType)
        Description copied from interface: MapViewSettings
        Get information on the current state of edit type. Are squares of type 'editType' displayed?
        Specified by:
        isEditType in interface MapViewSettings
        Parameters:
        editType - are squares of this type displayed?
        Returns:
        true if these squares are currently displayed
      • isEditType

        public boolean isEditType​(@NotNull
                                  @NotNull BaseObject<?,​?,​?,​?> gameObject)
        Description copied from interface: MapViewSettings
        Get information whether the gameObject is edited. Are squares of type 'v' displayed?
        Specified by:
        isEditType in interface MapViewSettings
        Parameters:
        gameObject - are squares of this type displayed?
        Returns:
        true if these squares are currently displayed
      • isEditTypeSet

        public boolean isEditTypeSet()
        Description copied from interface: MapViewSettings
        Returns whether a editType value is set so that not all squares are displayed.
        Specified by:
        isEditTypeSet in interface MapViewSettings
        Returns:
        true if a editType value is set, otherwise false.
      • toggleEditType

        public void toggleEditType​(int editType)
        Description copied from interface: MapViewSettings
        Toggle an edit type.
        Specified by:
        toggleEditType in interface MapViewSettings
        Parameters:
        editType - the edit type to toggle
      • isAutojoin

        public boolean isAutojoin()
        Description copied from interface: MapViewSettings
        Returns whether "autojoin" is enabled.
        Specified by:
        isAutojoin in interface MapViewSettings
        Returns:
        the autojoin state
      • setAutojoin

        public void setAutojoin​(boolean autojoin)
        Description copied from interface: MapViewSettings
        Sets the "autojoin" state.
        Specified by:
        setAutojoin in interface MapViewSettings
        Parameters:
        autojoin - if set, enable autojoining
      • loadGridVisible

        protected abstract boolean loadGridVisible()
        Loads the default value for gridVisible.
        Returns:
        the default value
      • saveGridVisible

        protected abstract void saveGridVisible​(boolean gridVisible)
        Saves the gridVisible value.
        Parameters:
        gridVisible - the grid visible value
      • loadLightVisible

        protected abstract boolean loadLightVisible()
        Loads the default value for lightVisible.
        Returns:
        the default value
      • saveLightVisible

        protected abstract void saveLightVisible​(boolean lightVisible)
        Saves the lightVisible value.
        Parameters:
        lightVisible - the light visible value
      • loadSmoothing

        protected abstract boolean loadSmoothing()
        Loads the default value for smoothing.
        Returns:
        the default value
      • saveSmoothing

        protected abstract void saveSmoothing​(boolean smoothing)
        Saves the smoothing value.
        Parameters:
        smoothing - the smoothing value
      • loadTileStretching

        protected abstract boolean loadTileStretching()
        Loads the default value for tileStretching.
        Returns:
        the default value
      • saveTileStretching

        protected abstract void saveTileStretching​(boolean tileStretching)
        Saves the tileStretching value.
        Parameters:
        tileStretching - the smoothing value
      • loadDoubleFaces

        protected abstract boolean loadDoubleFaces()
        Loads the default value for doubleFaces.
        Returns:
        the default value
      • saveDoubleFaces

        protected abstract void saveDoubleFaces​(boolean doubleFaces)
        Saves the doubleFaces value.
        Parameters:
        doubleFaces - the double faces value
      • loadAlphaType

        protected abstract int loadAlphaType()
        Loads the default value for alphaType.
        Returns:
        the default value
      • saveAlphaType

        protected abstract void saveAlphaType​(int alphaType)
        Saves the alphaType value.
        Parameters:
        alphaType - the alpha type value
      • loadEditType

        protected abstract int loadEditType()
        Loads the default value for editType.
        Returns:
        the default value
      • loadAutojoin

        protected abstract boolean loadAutojoin()
        Loads the default value for autojoin.
        Returns:
        the default value
      • saveAutojoin

        protected abstract void saveAutojoin​(boolean autojoin)
        Saves the autojoin value.
        Parameters:
        autojoin - the autojoin value