Interface MapViewSettings
-
- All Known Implementing Classes:
AbstractMapViewSettings
,DefaultMapViewSettings
public interface MapViewSettings
Container for settings that affect the rendering of maps.
-
-
Method Summary
All Methods Instance Methods Abstract 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.void
removeMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
Unregister a MapViewSettingsListener.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.
-
-
-
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 (
true
for visible,false
for invisible)
-
setGridVisible
void setGridVisible(boolean gridVisible)
Set the visibility of the grid.- Parameters:
gridVisible
- new visibility of the grid (true
for making the grid visible,false
for invisible)
-
isLightVisible
boolean isLightVisible()
Get the visibility of the light.- Returns:
- visibility of the light (
true
for visible,false
for invisible)
-
setLightVisible
void setLightVisible(boolean lightVisible)
Set the visibility of the light.- Parameters:
lightVisible
- new visibility of the light (true
for making the light visible,false
for 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:
true
if 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:
true
if 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,true
to make edit typetrue
transparent,false
for 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:
true
if 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:
true
if 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
-
-