Package org.jxmapviewer.viewer
Class Tile
java.lang.Object
org.jxmapviewer.beans.AbstractBean
org.jxmapviewer.viewer.Tile
public class Tile extends AbstractBean
The Tile class represents a particular square image piece of the world bitmap at a particular zoom level.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTile.PriorityThe loading priority -
Constructor Summary
Constructors Constructor Description Tile(int x, int y, int zoom)Create a new Tile at the specified tile point and zoom level -
Method Summary
Modifier and Type Method Description java.awt.image.BufferedImagegetImage()Tile.PrioritygetPriority()Gets the loading priority of this tile.java.lang.StringgetURL()Gets the URL of this tile.intgetX()intgetY()intgetZoom()booleanisLoaded()Indicates if this tile's underlying image has been successfully loaded yet.booleanisLoading()booleanloadingFailed()Indicates if this tile's underlying image failed loading.voidsetLoading(boolean isLoading)voidsetPriority(Tile.Priority priority)Set the loading priority of this tile.Methods inherited from class org.jxmapviewer.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Constructor Details
-
Tile
public Tile(int x, int y, int zoom)Create a new Tile at the specified tile point and zoom level- Parameters:
x- the x valuey- the y valuezoom- the zoom level
-
-
Method Details
-
isLoaded
public boolean isLoaded()Indicates if this tile's underlying image has been successfully loaded yet.- Returns:
- true if the Tile has been loaded
-
loadingFailed
public boolean loadingFailed()Indicates if this tile's underlying image failed loading.- Returns:
- true if the Tile has been loaded
-
getImage
public java.awt.image.BufferedImage getImage()- Returns:
- the Image associated with this Tile. This is a read only property This may return null at any time, however if this returns null, a load operation will automatically be started for it.
-
getZoom
public int getZoom()- Returns:
- the zoom level that this tile belongs in
-
isLoading
public boolean isLoading()- Returns:
- the isLoading
-
setLoading
public void setLoading(boolean isLoading)- Parameters:
isLoading- the isLoading to set
-
getPriority
Gets the loading priority of this tile.- Returns:
- the priority
-
setPriority
Set the loading priority of this tile.- Parameters:
priority- the priority to set
-
getURL
public java.lang.String getURL()Gets the URL of this tile.- Returns:
- the url
-
getX
public int getX()- Returns:
- the x value
-
getY
public int getY()- Returns:
- the y value
-