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)
MapViewSettings
addMapViewSettingsListener
in interface MapViewSettings
listener
- MapViewSettingsListener to registerpublic void removeMapViewSettingsListener(@NotNull @NotNull MapViewSettingsListener listener)
MapViewSettings
removeMapViewSettingsListener
in interface MapViewSettings
listener
- MapViewSettingsListener to unregisterpublic boolean isGridVisible()
MapViewSettings
isGridVisible
in interface MapViewSettings
true
for visible, false
for invisible)public void setGridVisible(boolean gridVisible)
MapViewSettings
setGridVisible
in interface MapViewSettings
gridVisible
- new visibility of the grid (true
for making
the grid visible, false
for invisible)public boolean isLightVisible()
MapViewSettings
isLightVisible
in interface MapViewSettings
true
for visible, false
for invisible)public void setLightVisible(boolean lightVisible)
MapViewSettings
setLightVisible
in interface MapViewSettings
lightVisible
- new visibility of the light (true
for making
the light visible, false
for invisible)public boolean isSmoothing()
MapViewSettings
isSmoothing
in interface MapViewSettings
public void setSmoothing(boolean smoothing)
MapViewSettings
setSmoothing
in interface MapViewSettings
smoothing
- the new smoothing settingpublic boolean isTileStretching()
MapViewSettings
isTileStretching
in interface MapViewSettings
public void setTileStretching(boolean tileStretching)
MapViewSettings
setTileStretching
in interface MapViewSettings
tileStretching
- the new tile-stretching settingpublic boolean isDoubleFaces()
MapViewSettings
isDoubleFaces
in interface MapViewSettings
true
if double faces are drawn double height, otherwise
false
public void setDoubleFaces(boolean doubleFaces)
MapViewSettings
setDoubleFaces
in interface MapViewSettings
doubleFaces
- whether double faces should be drawn double heightpublic boolean isAlphaType(int v)
MapViewSettings
isAlphaType
in interface MapViewSettings
v
- edit type to checktrue
if to be displayed transparent, otherwise false
public void setAlphaType(int v, boolean state)
MapViewSettings
setAlphaType
in interface MapViewSettings
v
- edit type to setstate
- state, true
to make edit type true
transparent, false
for opaquepublic void clearAlpha()
MapViewSettings
clearAlpha
in interface MapViewSettings
public int getEditType()
MapViewSettings
getEditType
in interface MapViewSettings
public void unsetEditType(int editType)
MapViewSettings
unsetEditType
in interface MapViewSettings
editType
- edit type bitmask of types to hidepublic boolean isEditType(int editType)
MapViewSettings
isEditType
in interface MapViewSettings
editType
- are squares of this type displayed?true
if these squares are currently displayedpublic boolean isEditType(@NotNull @NotNull BaseObject<?,?,?,?> gameObject)
MapViewSettings
isEditType
in interface MapViewSettings
gameObject
- are squares of this type displayed?public boolean isEditTypeSet()
MapViewSettings
isEditTypeSet
in interface MapViewSettings
true
if a editType value is set, otherwise false
.public void toggleEditType(int editType)
MapViewSettings
toggleEditType
in interface MapViewSettings
editType
- the edit type to togglepublic boolean isAutojoin()
MapViewSettings
isAutojoin
in interface MapViewSettings
public void setAutojoin(boolean autojoin)
MapViewSettings
setAutojoin
in interface MapViewSettings
autojoin
- 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