public abstract class StyleSource extends SourceEntry
Modifier and Type | Field and Description |
---|---|
private static ImageIcon |
defaultIcon |
private List<Throwable> |
errors |
String |
icon
The following fields is additional information found in the header
of the source file.
|
private ImageIcon |
imageIcon |
private long |
lastMTime |
File |
zipIcons |
active, isZip, name, title, url, zipEntryPath
Constructor and Description |
---|
StyleSource(SourceEntry entry) |
StyleSource(String url,
String name,
String title) |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(MultiCascade mc,
OsmPrimitive osm,
double scale,
OsmPrimitive multipolyOuterWay,
boolean pretendWayIsClosed) |
void |
closeSourceInputStream(InputStream is)
Closes the source input stream previously returned by
getSourceInputStream() and other linked resources, if applicable. |
Color |
getBackgroundColorOverride() |
private static ImageIcon |
getDefaultIcon() |
Collection<Throwable> |
getErrors() |
ImageIcon |
getIcon() |
long |
getLastMTime() |
protected ImageIcon |
getSourceIcon() |
abstract InputStream |
getSourceInputStream()
Returns a new
InputStream to the style source. |
String |
getToolTipText() |
protected void |
init() |
abstract void |
loadStyleSource() |
void |
logError(Throwable e) |
void |
setLastMTime(long lastMTime) |
equals, getDisplayString, getFileNamePart, getLocalSourceDir, getPrefName, getZipEntryDirName, hashCode, isLocal, toString
private long lastMTime
public String icon
private static ImageIcon defaultIcon
public StyleSource(String url, String name, String title)
public StyleSource(SourceEntry entry)
public abstract void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed)
public abstract void loadStyleSource()
public abstract InputStream getSourceInputStream() throws IOException
InputStream
to the style source. When finished, closeSourceInputStream(InputStream)
must be called.InputStream
to the style source that must be closed by the callerIOException
- if any I/O error occurs.closeSourceInputStream(InputStream)
public void closeSourceInputStream(InputStream is)
getSourceInputStream()
and other linked resources, if applicable.is
- The source input stream that must be closedgetSourceInputStream()
public Collection<Throwable> getErrors()
protected void init()
private static ImageIcon getDefaultIcon()
protected ImageIcon getSourceIcon()
public String getToolTipText()
public Color getBackgroundColorOverride()
public long getLastMTime()
public void setLastMTime(long lastMTime)