public abstract class SV_DocumentLoader extends Object
Base class for an SVG document loader.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isLoaded
Flag indicating if a document is loaded or not.
|
protected HashMap<String,Integer> |
layers
List of layers with identifier and index.
|
| Constructor and Description |
|---|
SV_DocumentLoader() |
| Modifier and Type | Method and Description |
|---|---|
HashMap<String,Integer> |
getLayers()
Returns the map of layers (layer name to index), empty if no layers found.
|
boolean |
hasInkscapeLayers()
Tests if the loaded document has Inkscape layers.
|
boolean |
isLoaded()
Returns the status of the loader.
|
abstract String |
load(String fn)
Loads the SVG file.
|
abstract void |
switchOffAllLayers()
Switch all layers off.
|
abstract void |
switchOnAllLayers()
Switch all layers off.
|
abstract void |
switchOnLayer(String layer)
Switches the given layer on, nothing happens if the layer was blank or not in the layer list.
|
public abstract String load(String fn)
Loads the SVG file. This method will not re-load an SVG file once the loader already has a document loaded.
fn - the file name for the SVG documentNullPointerException - if argument was nullIllegalArgumentException - if argument was blankpublic boolean isLoaded()
Returns the status of the loader.
public boolean hasInkscapeLayers()
Tests if the loaded document has Inkscape layers.
public abstract void switchOnAllLayers()
Switch all layers off.
public abstract void switchOffAllLayers()
Switch all layers off.
public abstract void switchOnLayer(String layer)
Switches the given layer on, nothing happens if the layer was blank or not in the layer list.
layer - the layer to be switched onCopyright © 2012–2017. All rights reserved.