Groovy Documentation

org.jdesktop.swingx.mapviewer
[Java] Class Tile

java.lang.Object
  org.jdesktop.beans.AbstractBean
      org.jdesktop.swingx.mapviewer.Tile

public class Tile
extends org.jdesktop.beans.AbstractBean

The Tile class represents a particular square image piece of the world bitmap at a particular zoom level.

Authors:
joshy


Nested Class Summary
enum Tile.Priority

 
Field Summary
private static Logger LOG

private TileFactory dtf

private Throwable error

If an error occurs while loading a tile, store the exception here.

SoftReference image

private boolean isLoading

private boolean loaded

The zoom level this tile is for

private Tile.Priority priority

The Tile class represents a particular square image piece of the world bitmap at a particular zoom level.

private PropertyChangeListener uniqueListener

Adds a single property change listener.

private String url

private int x

private int y

private int zoom

The image loaded for this Tile

 
Constructor Summary
Tile(int x, int y, int zoom)

Tile(int x, int y, int zoom, String url, Tile.Priority priority, TileFactory dtf)

Create a new Tile that loads its data from the given URL.

 
Method Summary
void addUniquePropertyChangeListener(String propertyName, PropertyChangeListener listener)

void firePropertyChangeOnEDT(String propertyName, Object oldValue, Object newValue)

Throwable getError()

@param error the error to set

BufferedImage getImage()

Throwable getLoadingError()

Tile.Priority getPriority()

Set the loading priority of this tile.

String getURL()

Throwable getUnrecoverableError()

Returns the last error in a possible chain of errors that occured during the loading of the tile

int getX()

int getY()

int getZoom()

@return the location in the world at this zoom level that this tile should be placed

boolean isLoaded()

Indicates if this tile's underlying image has been successfully loaded yet.

boolean isLoading()

@param isLoading the isLoading to set

private static void p(String string)

@return the error

void setError(Throwable error)

@return the isLoading

void setLoaded(boolean loaded)

void setLoading(boolean isLoading)

Gets the loading priority of this tile.

void setPriority(Tile.Priority priority)

Tile valueOf(String name)

Returns the enum constant of this type with the specified name.

Tile[] values()

Returns an array containing the constants of this enum type, in the order they are declared.

 
Methods inherited from class org.jdesktop.beans.AbstractBean
org.jdesktop.beans.AbstractBean#clone(), org.jdesktop.beans.AbstractBean#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#addPropertyChangeListener(java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#removePropertyChangeListener(java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#getPropertyChangeListeners(java.lang.String), org.jdesktop.beans.AbstractBean#getPropertyChangeListeners(), org.jdesktop.beans.AbstractBean#addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#addVetoableChangeListener(java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#removeVetoableChangeListener(java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#getVetoableChangeListeners(java.lang.String), org.jdesktop.beans.AbstractBean#getVetoableChangeListeners(), org.jdesktop.beans.AbstractBean#wait(), org.jdesktop.beans.AbstractBean#wait(long), org.jdesktop.beans.AbstractBean#wait(long, int), org.jdesktop.beans.AbstractBean#equals(java.lang.Object), org.jdesktop.beans.AbstractBean#toString(), org.jdesktop.beans.AbstractBean#hashCode(), org.jdesktop.beans.AbstractBean#getClass(), org.jdesktop.beans.AbstractBean#notify(), org.jdesktop.beans.AbstractBean#notifyAll()
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

LOG

private static final Logger LOG


dtf

private TileFactory dtf


error

private Throwable error
If an error occurs while loading a tile, store the exception here.


image

SoftReference image


isLoading

private boolean isLoading


loaded

private boolean loaded
The zoom level this tile is for


priority

private Tile.Priority priority
The Tile class represents a particular square image piece of the world bitmap at a particular zoom level.
Authors:
joshy


uniqueListener

private PropertyChangeListener uniqueListener
Adds a single property change listener. If a listener has been previously added then it will be replaced by the new one.
Parameters:
propertyName
listener


url

private String url


x

private int x


y

private int y


zoom

private int zoom
The image loaded for this Tile


 
Constructor Detail

Tile

public Tile(int x, int y, int zoom)


Tile

Tile(int x, int y, int zoom, String url, Tile.Priority priority, TileFactory dtf)
Create a new Tile that loads its data from the given URL. The URL must resolve to an image


 
Method Detail

addUniquePropertyChangeListener

public void addUniquePropertyChangeListener(String propertyName, PropertyChangeListener listener)


firePropertyChangeOnEDT

void firePropertyChangeOnEDT(String propertyName, Object oldValue, Object newValue)


getError

public Throwable getError()
Parameters:
error - the error to set


getImage

public BufferedImage getImage()


getLoadingError

public Throwable getLoadingError()


getPriority

public Tile.Priority getPriority()
Set the loading priority of this tile.
Parameters:
priority - the priority to set


getURL

public String getURL()


getUnrecoverableError

public Throwable getUnrecoverableError()
Returns the last error in a possible chain of errors that occured during the loading of the tile


getX

public int getX()


getY

public int getY()


getZoom

public int getZoom()
Returns:
the location in the world at this zoom level that this tile should be placed


isLoaded

public boolean isLoaded()
Indicates if this tile's underlying image has been successfully loaded yet.
returns:
true if the Tile has been loaded
Returns:


isLoading

public boolean isLoading()
Parameters:
isLoading - the isLoading to set


p

private static void p(String string)
Returns:
the error


setError

public void setError(Throwable error)
Returns:
the isLoading


setLoaded

void setLoaded(boolean loaded)


setLoading

public void setLoading(boolean isLoading)
Gets the loading priority of this tile.
Returns:


setPriority

public void setPriority(Tile.Priority priority)


valueOf

Tile valueOf(String name)
Returns the enum constant of this type with the specified name.


values

Tile[] values()
Returns an array containing the constants of this enum type, in the order they are declared.


 

Groovy Documentation