public class DisplayModel extends Observable
Constructor and Description |
---|
DisplayModel() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getBackgroundColor()
Returns the background color.
|
static float |
getDefaultUserScaleFactor()
Get the default scale factor for all newly created DisplayModels.
|
static float |
getDeviceScaleFactor()
Returns the device scale factor.
|
org.mapsforge.core.graphics.Filter |
getFilter()
Color filtering in map rendering.
|
int |
getMaxTextWidth()
Returns the maximum width of text beyond which the text is broken into lines.
|
float |
getScaleFactor()
Returns the overall scale factor.
|
ThemeCallback |
getThemeCallback()
Theme callback.
|
int |
getTileSize()
Width and height of a map tile in pixel after system and user scaling is applied.
|
int |
getTileSizeMultiple()
Gets the tile size multiple.
|
float |
getUserScaleFactor()
Returns the user scale factor.
|
int |
hashCode() |
void |
setBackgroundColor(int color)
Set the background color.
|
static void |
setDefaultUserScaleFactor(float scaleFactor)
Set the default scale factor for all newly created DisplayModels, so can be used to apply user settings from a
device.
|
static void |
setDeviceScaleFactor(float scaleFactor)
Set the device scale factor.
|
void |
setFilter(org.mapsforge.core.graphics.Filter filter)
Color filtering in map rendering.
|
void |
setFixedTileSize(int tileSize)
Forces the tile size to a fixed value
|
void |
setMaxTextWidthFactor(float maxTextWidthFactor)
Sets the factor to compute the maxTextWidth
|
void |
setThemeCallback(ThemeCallback themeCallback)
Theme callback.
|
void |
setTileSizeMultiple(int multiple)
Clamps the tile size to a multiple of the supplied value.
|
void |
setUserScaleFactor(float scaleFactor)
Set the user scale factor.
|
addObserver, notifyObservers, removeObserver
public static float getDefaultUserScaleFactor()
public static float getDeviceScaleFactor()
public static void setDefaultUserScaleFactor(float scaleFactor)
scaleFactor
- the default scale factor to be applied to all new DisplayModels.public static void setDeviceScaleFactor(float scaleFactor)
scaleFactor
- the device scale factor.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int getBackgroundColor()
public org.mapsforge.core.graphics.Filter getFilter()
public int getMaxTextWidth()
public float getScaleFactor()
public ThemeCallback getThemeCallback()
public int getTileSize()
public int getTileSizeMultiple()
public float getUserScaleFactor()
public int hashCode()
hashCode
in class java.lang.Object
public void setBackgroundColor(int color)
color
- the color to use.public void setFilter(org.mapsforge.core.graphics.Filter filter)
public void setFixedTileSize(int tileSize)
tileSize
- the fixed tile size to use if != 0, if 0 the tile size will be calculatedpublic void setMaxTextWidthFactor(float maxTextWidthFactor)
maxTextWidthFactor
- to compute maxTextWidthpublic void setThemeCallback(ThemeCallback themeCallback)
public void setTileSizeMultiple(int multiple)
multiple
- tile size multiplepublic void setUserScaleFactor(float scaleFactor)
scaleFactor
- the user scale factor to use.