public class SourceButton extends Object
Modifier and Type | Field and Description |
---|---|
private int |
barWidth |
private int |
barX |
private int |
barY |
private int |
currentMap |
private ImageIcon |
enlargeImage |
static int |
HIDE_OR_SHOW |
private boolean |
isEnlarged |
private int |
layerHeight |
private ImageIcon |
shrinkImage |
private TileSource[] |
sources |
Constructor and Description |
---|
SourceButton(Collection<TileSource> sources) |
Modifier and Type | Method and Description |
---|---|
int |
hit(Point point) |
TileSource |
hitToTileSource(int hit) |
void |
paint(Graphics2D g) |
void |
setCurrentMap(TileSource tileSource) |
void |
setSources(Collection<TileSource> sources)
Set the tile sources.
|
void |
toggle() |
private int barX
private int barY
private int barWidth
private int layerHeight
private TileSource[] sources
private ImageIcon enlargeImage
private ImageIcon shrinkImage
private boolean isEnlarged
private int currentMap
public static final int HIDE_OR_SHOW
public SourceButton(Collection<TileSource> sources)
public final void setSources(Collection<TileSource> sources)
sources
- The tile sources to displaypublic void paint(Graphics2D g)
public void toggle()
public TileSource hitToTileSource(int hit)
public void setCurrentMap(TileSource tileSource)