public abstract class AbstractMapViewSettings extends java.lang.Object implements MapViewSettings
MapViewSettings implementations.| Constructor and Description |
|---|
AbstractMapViewSettings() |
| Modifier and Type | Method and 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(@NotNull BaseObject<?,?,?,?> gameObject)
Get information whether the gameObject is edited.
|
boolean |
isEditType(int editType)
Get information on the current state of edit type.
|
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.
|
public void addMapViewSettingsListener(@NotNull
@NotNull MapViewSettingsListener listener)
MapViewSettingsaddMapViewSettingsListener in interface MapViewSettingslistener - MapViewSettingsListener to registerpublic void removeMapViewSettingsListener(@NotNull
@NotNull MapViewSettingsListener listener)
MapViewSettingsremoveMapViewSettingsListener in interface MapViewSettingslistener - MapViewSettingsListener to unregisterpublic boolean isGridVisible()
MapViewSettingsisGridVisible in interface MapViewSettingstrue for visible, false
for invisible)public void setGridVisible(boolean gridVisible)
MapViewSettingssetGridVisible in interface MapViewSettingsgridVisible - new visibility of the grid (true for making
the grid visible, false for invisible)public boolean isLightVisible()
MapViewSettingsisLightVisible in interface MapViewSettingstrue for visible, false
for invisible)public void setLightVisible(boolean lightVisible)
MapViewSettingssetLightVisible in interface MapViewSettingslightVisible - new visibility of the light (true for making
the light visible, false for invisible)public boolean isSmoothing()
MapViewSettingsisSmoothing in interface MapViewSettingspublic void setSmoothing(boolean smoothing)
MapViewSettingssetSmoothing in interface MapViewSettingssmoothing - the new smoothing settingpublic boolean isTileStretching()
MapViewSettingsisTileStretching in interface MapViewSettingspublic void setTileStretching(boolean tileStretching)
MapViewSettingssetTileStretching in interface MapViewSettingstileStretching - the new tile-stretching settingpublic boolean isDoubleFaces()
MapViewSettingsisDoubleFaces in interface MapViewSettingstrue if double faces are drawn double height, otherwise
falsepublic void setDoubleFaces(boolean doubleFaces)
MapViewSettingssetDoubleFaces in interface MapViewSettingsdoubleFaces - whether double faces should be drawn double heightpublic boolean isAlphaType(int v)
MapViewSettingsisAlphaType in interface MapViewSettingsv - edit type to checktrue if to be displayed transparent, otherwise falsepublic void setAlphaType(int v,
boolean state)
MapViewSettingssetAlphaType in interface MapViewSettingsv - edit type to setstate - state, true to make edit type true
transparent, false for opaquepublic void clearAlpha()
MapViewSettingsclearAlpha in interface MapViewSettingspublic int getEditType()
MapViewSettingsgetEditType in interface MapViewSettingspublic void unsetEditType(int editType)
MapViewSettingsunsetEditType in interface MapViewSettingseditType - edit type bitmask of types to hidepublic boolean isEditType(int editType)
MapViewSettingsisEditType in interface MapViewSettingseditType - are squares of this type displayed?true if these squares are currently displayedpublic boolean isEditType(@NotNull
@NotNull BaseObject<?,?,?,?> gameObject)
MapViewSettingsisEditType in interface MapViewSettingsgameObject - are squares of this type displayed?public boolean isEditTypeSet()
MapViewSettingsisEditTypeSet in interface MapViewSettingstrue if a editType value is set, otherwise false.public void toggleEditType(int editType)
MapViewSettingstoggleEditType in interface MapViewSettingseditType - the edit type to togglepublic boolean isAutojoin()
MapViewSettingsisAutojoin in interface MapViewSettingspublic void setAutojoin(boolean autojoin)
MapViewSettingssetAutojoin in interface MapViewSettingsautojoin - if set, enable autojoiningprotected abstract boolean loadGridVisible()
gridVisible.protected abstract void saveGridVisible(boolean gridVisible)
gridVisible value.gridVisible - the grid visible valueprotected abstract boolean loadLightVisible()
lightVisible.protected abstract void saveLightVisible(boolean lightVisible)
lightVisible value.lightVisible - the light visible valueprotected abstract boolean loadSmoothing()
smoothing.protected abstract void saveSmoothing(boolean smoothing)
smoothing value.smoothing - the smoothing valueprotected abstract boolean loadTileStretching()
tileStretching.protected abstract void saveTileStretching(boolean tileStretching)
tileStretching value.tileStretching - the smoothing valueprotected abstract boolean loadDoubleFaces()
doubleFaces.protected abstract void saveDoubleFaces(boolean doubleFaces)
doubleFaces value.doubleFaces - the double faces valueprotected abstract int loadAlphaType()
alphaType.protected abstract void saveAlphaType(int alphaType)
alphaType value.alphaType - the alpha type valueprotected abstract int loadEditType()
editType.protected abstract boolean loadAutojoin()
autojoin.protected abstract void saveAutojoin(boolean autojoin)
autojoin - the autojoin value