Modifier and Type | Class and Description |
---|---|
protected class |
MapImage.MapImageBoxProvider |
Modifier and Type | Field and Description |
---|---|
int |
alpha |
boolean |
autoRescale |
private BufferedImage |
disabledImgCache |
int |
height |
private BufferedImage |
img
ImageIcon can change while the image is loading.
|
private static int |
MAX_SIZE |
String |
name |
int |
offsetX |
int |
offsetY |
StyleSource |
source |
private boolean |
temporary |
int |
width |
Constructor and Description |
---|
MapImage(String name,
StyleSource source) |
MapImage(String name,
StyleSource source,
boolean autoRescale) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
float |
getAlphaFloat() |
BoxTextElement.BoxProvider |
getBoxProvider() |
private BufferedImage |
getDisabled() |
int |
getHeight() |
private BufferedImage |
getImage() |
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(Image image) |
private Image |
rescale(Image image)
Rescale excessively large images.
|
String |
toString() |
private static final int MAX_SIZE
private BufferedImage img
public int alpha
public StyleSource source
public boolean autoRescale
public int width
public int height
public int offsetX
public int offsetY
private boolean temporary
private BufferedImage disabledImgCache
public MapImage(String name, StyleSource source)
public MapImage(String name, StyleSource source, boolean autoRescale)
public BufferedImage getImage(boolean disabled)
disabled
- true to request disabled version, false
for the standard versionprivate BufferedImage getDisabled()
private 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 Image rescale(Image image)
image
- the unscaled imageprivate boolean mustRescale(Image image)