Interface MapViewSettings
-
- All Known Implementing Classes:
AbstractMapViewSettings,DefaultMapViewSettings
public interface MapViewSettingsContainer for settings that affect the rendering of maps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMapViewSettingsListener(@NotNull MapViewSettingsListener listener)Register a MapViewSettingsListener.voidclearAlpha()Clear the transparency.intgetEditType()Returns the currently set edit type.booleanisAlphaType(int v)Returns whether the specified edit type is to be shown transparent.booleanisAutojoin()Returns whether "autojoin" is enabled.booleanisDoubleFaces()Get whether double faces are drawn double height.booleanisEditType(int editType)Get information on the current state of edit type.booleanisEditType(@NotNull BaseObject<?,?,?,?> gameObject)Get information whether the gameObject is edited.booleanisEditTypeSet()Returns whether a editType value is set so that not all squares are displayed.booleanisGridVisible()Get the visibility of the grid.booleanisLightVisible()Get the visibility of the light.booleanisSmoothing()Returns the smoothing setting.booleanisTileStretching()Returns the tile-stretching setting.voidremoveMapViewSettingsListener(@NotNull MapViewSettingsListener listener)Unregister a MapViewSettingsListener.voidsetAlphaType(int v, boolean state)Sets whether the specified edit type is to be shown transparent.voidsetAutojoin(boolean autojoin)Sets the "autojoin" state.voidsetDoubleFaces(boolean doubleFaces)Sets whether double faces should be drawn double height.voidsetGridVisible(boolean gridVisible)Set the visibility of the grid.voidsetLightVisible(boolean lightVisible)Set the visibility of the light.voidsetSmoothing(boolean smoothing)Sets the smoothing setting.voidsetTileStretching(boolean tileStretching)Sets the tile-stretching setting.voidtoggleEditType(int editType)Toggle an edit type.voidunsetEditType(int editType)Set the map view to hide squares of the given type.
-
-
-
Method Detail
-
addMapViewSettingsListener
void addMapViewSettingsListener(@NotNull @NotNull MapViewSettingsListener listener)Register a MapViewSettingsListener.- Parameters:
listener- MapViewSettingsListener to register
-
removeMapViewSettingsListener
void removeMapViewSettingsListener(@NotNull @NotNull MapViewSettingsListener listener)Unregister a MapViewSettingsListener.- Parameters:
listener- MapViewSettingsListener to unregister
-
isGridVisible
boolean isGridVisible()
Get the visibility of the grid.- Returns:
- visibility of the grid (
truefor visible,falsefor invisible)
-
setGridVisible
void setGridVisible(boolean gridVisible)
Set the visibility of the grid.- Parameters:
gridVisible- new visibility of the grid (truefor making the grid visible,falsefor invisible)
-
isLightVisible
boolean isLightVisible()
Get the visibility of the light.- Returns:
- visibility of the light (
truefor visible,falsefor invisible)
-
setLightVisible
void setLightVisible(boolean lightVisible)
Set the visibility of the light.- Parameters:
lightVisible- new visibility of the light (truefor making the light visible,falsefor invisible)
-
isSmoothing
boolean isSmoothing()
Returns the smoothing setting.- Returns:
- the smoothing setting
-
setSmoothing
void setSmoothing(boolean smoothing)
Sets the smoothing setting.- Parameters:
smoothing- the new smoothing setting
-
isTileStretching
boolean isTileStretching()
Returns the tile-stretching setting.- Returns:
- the tile-stretching setting
-
setTileStretching
void setTileStretching(boolean tileStretching)
Sets the tile-stretching setting.- Parameters:
tileStretching- the new tile-stretching setting
-
isDoubleFaces
boolean isDoubleFaces()
Get whether double faces are drawn double height.- Returns:
trueif double faces are drawn double height, otherwisefalse
-
setDoubleFaces
void setDoubleFaces(boolean doubleFaces)
Sets whether double faces should be drawn double height.- Parameters:
doubleFaces- whether double faces should be drawn double height
-
isAlphaType
boolean isAlphaType(int v)
Returns whether the specified edit type is to be shown transparent.- Parameters:
v- edit type to check- Returns:
trueif to be displayed transparent, otherwisefalse
-
setAlphaType
void setAlphaType(int v, boolean state)Sets whether the specified edit type is to be shown transparent.- Parameters:
v- edit type to setstate- state,trueto make edit typetruetransparent,falsefor opaque
-
clearAlpha
void clearAlpha()
Clear the transparency.
-
getEditType
int getEditType()
Returns the currently set edit type.- Returns:
- the currently set edit type
-
unsetEditType
void unsetEditType(int editType)
Set the map view to hide squares of the given type. (If no edit type is set, everything is displayed)- Parameters:
editType- edit type bitmask of types to hide
-
isEditType
boolean isEditType(int editType)
Get information on the current state of edit type. Are squares of type 'editType' displayed?- Parameters:
editType- are squares of this type displayed?- Returns:
trueif these squares are currently displayed
-
isEditType
boolean isEditType(@NotNull @NotNull BaseObject<?,?,?,?> gameObject)Get information whether the gameObject is edited. Are squares of type 'v' displayed?- Parameters:
gameObject- are squares of this type displayed?- Returns:
- true if these squares are currently displayed
-
isEditTypeSet
boolean isEditTypeSet()
Returns whether a editType value is set so that not all squares are displayed.- Returns:
trueif a editType value is set, otherwisefalse.
-
toggleEditType
void toggleEditType(int editType)
Toggle an edit type.- Parameters:
editType- the edit type to toggle
-
isAutojoin
boolean isAutojoin()
Returns whether "autojoin" is enabled.- Returns:
- the autojoin state
-
setAutojoin
void setAutojoin(boolean autojoin)
Sets the "autojoin" state.- Parameters:
autojoin- if set, enable autojoining
-
-