public abstract class ConsoleLayer extends AbstractConsolePlugin implements IConsoleLayer
Constructor and Description |
---|
ConsoleLayer() |
Modifier and Type | Method and Description |
---|---|
org.dom4j.Element |
asElement(java.lang.String rootElement)
Save the configurations of this layer as XML
|
void |
clean()
This layer has been removed or the MapPanel was closed.
|
abstract void |
cleanLayer() |
java.awt.AlphaComposite |
getComposite() |
float |
getOpacity()
Retrieve the opacity for this layer - 0 means fully transparent and 1 means opaque.
|
abstract void |
initLayer() |
protected void |
initPlugin(ConsoleLayout console)
Use this to setup your plugin before the register of
the IPeriodicUpdates and Message callbacks.
|
boolean |
isVisible() |
void |
paint(java.awt.Graphics2D g,
StateRenderer2D renderer) |
void |
parseXmlElement(org.dom4j.Element elem)
Load configuration from a partial XML tree
|
void |
setOpacity(float opacity)
Set layer opacity
|
void |
setVisible(boolean visible) |
abstract boolean |
userControlsOpacity()
Should the user be able to control the opacity of this layer?
|
getConsole, getIcon, getName, getProperties, getPropertiesDialogTitle, getPropertiesErrors, getState, init, propertiesChanged, setProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIcon, getName, init
getProperties, getPropertiesDialogTitle, getPropertiesErrors, setProperties
public abstract boolean userControlsOpacity()
IConsoleLayer
userControlsOpacity
in interface IConsoleLayer
true
for allowing the user to control this layer visibility or
false
if opacity should be controlled only via code.public abstract void initLayer()
public abstract void cleanLayer()
public float getOpacity()
IConsoleLayer
getOpacity
in interface IConsoleLayer
public void setVisible(boolean visible)
public boolean isVisible()
public void setOpacity(float opacity)
IConsoleLayer
setOpacity
in interface IConsoleLayer
opacity
- The opacity of this layerprotected final void initPlugin(ConsoleLayout console)
AbstractConsolePlugin
initPlugin
in class AbstractConsolePlugin
public final void clean()
IConsoleLayer
clean
in interface IConsoleLayer
clean
in class AbstractConsolePlugin
public java.awt.AlphaComposite getComposite()
public void paint(java.awt.Graphics2D g, StateRenderer2D renderer)
paint
in interface Renderer2DPainter
public org.dom4j.Element asElement(java.lang.String rootElement)
IConsoleLayer
asElement
in interface IConsoleLayer
asElement
in class AbstractConsolePlugin
rootElement
- The name of the root XML tag to use when savingpublic void parseXmlElement(org.dom4j.Element elem)
IConsoleLayer
parseXmlElement
in interface IConsoleLayer
parseXmlElement
in class AbstractConsolePlugin
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.