public class MapImage extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
MapImage.MapImageBoxProvider |
Modifier and Type | Field and Description |
---|---|
int |
alpha |
boolean |
autoRescale |
private java.awt.image.BufferedImage |
disabledImgCache |
int |
height |
private java.awt.image.BufferedImage |
img
ImageIcon can change while the image is loading.
|
private static int |
MAX_SIZE |
java.lang.String |
name |
int |
offsetX |
int |
offsetY |
StyleSource |
source |
private boolean |
temporary |
int |
width |
Constructor and Description |
---|
MapImage(java.lang.String name,
StyleSource source) |
MapImage(java.lang.String name,
StyleSource source,
boolean autoRescale) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
float |
getAlphaFloat() |
BoxTextElement.BoxProvider |
getBoxProvider() |
private java.awt.image.BufferedImage |
getDisabled() |
int |
getHeight() |
private java.awt.image.BufferedImage |
getImage() |
java.awt.image.BufferedImage |
getImage(boolean disabled)
Get the image associated with this MapImage object.
|
int |
getWidth() |
int |
hashCode() |
boolean |
isTemporary()
Determines if image is not completely loaded and
getImage() returns a temporary image. |
private boolean |
mustRescale(java.awt.Image image) |
private java.awt.Image |
rescale(java.awt.Image image)
Rescale excessively large images.
|
java.lang.String |
toString() |
private static final int MAX_SIZE
private java.awt.image.BufferedImage img
public int alpha
public java.lang.String name
public StyleSource source
public boolean autoRescale
public int width
public int height
public int offsetX
public int offsetY
private boolean temporary
private java.awt.image.BufferedImage disabledImgCache
public MapImage(java.lang.String name, StyleSource source)
public MapImage(java.lang.String name, StyleSource source, boolean autoRescale)
public java.awt.image.BufferedImage getImage(boolean disabled)
disabled
- true to request disabled version, false
for the standard versionprivate java.awt.image.BufferedImage getDisabled()
private java.awt.image.BufferedImage getImage()
public int getWidth()
public int getHeight()
public float getAlphaFloat()
public boolean isTemporary()
getImage()
returns a temporary image.true
if image is not completely loaded and getImage() returns a temporary imagepublic BoxTextElement.BoxProvider getBoxProvider()
private java.awt.Image rescale(java.awt.Image image)
image
- the unscaled imageprivate boolean mustRescale(java.awt.Image image)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object