public abstract class Maneuver extends java.lang.Object implements XmlOutputMethods, PropertiesProvider, java.lang.Comparable<Maneuver>
Modifier and Type | Field and Description |
---|---|
static double |
circleDiam |
protected static java.awt.Color |
COLOR_HELP |
static java.lang.String |
CT_BOOLEAN |
static java.lang.String |
CT_NUMBER |
static java.lang.String |
CT_STRING |
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> |
customSettings |
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> |
customSettingsTypeHint |
protected static java.lang.String |
DEFAULT_ROOT_ELEMENT |
protected PlanActions |
endActions |
java.lang.String |
id |
protected PlanActions |
startActions |
protected static int |
T |
protected java.util.ArrayList<VehicleType> |
vehicles |
protected static int |
X |
protected static int |
Y |
protected static int |
Z |
Constructor and Description |
---|
Maneuver()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Vector<com.l2fprod.common.propertysheet.DefaultProperty> |
additionalProperties() |
void |
addTransition(java.lang.String target,
java.lang.String condition) |
org.dom4j.Document |
asDocument() |
org.dom4j.Document |
asDocument(java.lang.String rootElementName)
Get all maneuver data as XML document.
|
org.dom4j.Element |
asElement() |
org.dom4j.Element |
asElement(java.lang.String rootElementName) |
java.lang.String |
asXML()
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
java.lang.String |
asXML(java.lang.String rootElementName)
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
java.lang.Object |
clone()
Clone this maneuver
|
java.lang.Object |
clone(Maneuver clone) |
void |
cloneActions(Maneuver otherMan) |
int |
compareTo(Maneuver o) |
static Maneuver |
createFromXML(java.lang.String xml) |
void |
endManeuver()
When the maneuver has ended, this function must be called to end the iteration
|
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getCustomSettings() |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getCustomSettingsTypeHint() |
PlanActions |
getEndActions() |
javax.swing.ImageIcon |
getIcon() |
java.lang.String |
getId() |
abstract org.dom4j.Document |
getManeuverAsDocument(java.lang.String rootElementName)
Get each maneuver specific data.
|
java.lang.String |
getManeuverXml() |
int |
getMaxTime() |
int |
getMinTime() |
MissionType |
getMissionType() |
com.l2fprod.common.propertysheet.DefaultProperty[] |
getProperties() |
java.lang.String |
getPropertiesDialogTitle() |
java.lang.String[] |
getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties) |
java.lang.String[] |
getReacheableManeuvers() |
Maneuver[] |
getSamePositionManeuvers(PlanType plan,
boolean includeThisManeuver)
Looks for other maneuvers that are located in the same position as this maneuver (only considers the horizontal
distance)
|
PlanActions |
getStartActions() |
java.lang.String |
getTooltipText() |
java.lang.String |
getTransitionCondition(java.lang.String targetManeuver) |
java.lang.String |
getType()
The extending classes should provide a type name that will be shown to the user related to that maneuver.
|
int |
getXPosition() |
int |
getYPosition() |
boolean |
hasEnded()
Verifies if the execution of this maneuver has ended...
|
double |
interpolate(double currentValue,
double desiredValue,
double maxStep) |
boolean |
isInitialManeuver() |
void |
loadFromXMLExtraParameters(org.dom4j.Element maneuver)
Loads data excepts maneuver specific data (this is the parent note from maneuver
specific data from
loadManeuverFromXML(String) ) |
void |
loadFromXMLExtraParameters(java.lang.String xml) |
abstract void |
loadManeuverFromXML(java.lang.String xml)
Expects only maneuver specific data.
|
void |
loadManeuverXml(java.lang.String manXml) |
boolean |
loadXMLWithSettings(org.dom4j.Document doc)
Load XML from
asDocument() |
boolean |
loadXMLWithSettings(org.dom4j.Element rootElm)
Load XML from
asElement() |
boolean |
loadXMLWithSettings(java.lang.String xml)
Load XML from
asXML() |
void |
paintOnMap(java.awt.Graphics2D g2d,
PlanElement planElement,
StateRenderer2D renderer) |
void |
removeTransition(java.lang.String target) |
void |
setCustomSettings(java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettings) |
void |
setCustomSettingsTypeHint(java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettingsTypeHint) |
void |
setId(java.lang.String id) |
void |
setInitialManeuver(boolean initialManeuver) |
void |
setMaxTime(int maxTime) |
void |
setMinTime(int minTime) |
void |
setMissionType(MissionType missionType) |
void |
setProperties(com.l2fprod.common.propertysheet.Property[] properties) |
void |
setVehicle(VehicleType vehicle) |
void |
setVehicles(java.util.List<VehicleType> vehicles) |
void |
setXPosition(int position) |
void |
setYPosition(int position) |
java.lang.String |
toString()
By default the class name is returned, redefine it if that is not the desired thing.
|
protected static final java.awt.Color COLOR_HELP
protected static final int X
protected static final int Y
protected static final int Z
protected static final int T
protected java.util.ArrayList<VehicleType> vehicles
public static final java.lang.String CT_STRING
public static final java.lang.String CT_NUMBER
public static final java.lang.String CT_BOOLEAN
public static final double circleDiam
public java.lang.String id
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettings
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettingsTypeHint
protected static final java.lang.String DEFAULT_ROOT_ELEMENT
protected PlanActions startActions
protected PlanActions endActions
public Maneuver[] getSamePositionManeuvers(PlanType plan, boolean includeThisManeuver)
plan
- The plan to look for maneuversincludeThisManeuver
- If this maneuvers is to be included in the returned arraypublic void paintOnMap(java.awt.Graphics2D g2d, PlanElement planElement, StateRenderer2D renderer)
public static Maneuver createFromXML(java.lang.String xml)
public boolean loadXMLWithSettings(java.lang.String xml)
asXML()
xml
- public boolean loadXMLWithSettings(org.dom4j.Document doc)
asDocument()
doc
- public boolean loadXMLWithSettings(org.dom4j.Element rootElm)
asElement()
rootElm
- public void loadFromXMLExtraParameters(java.lang.String xml)
xml
- public void loadFromXMLExtraParameters(org.dom4j.Element maneuver)
loadManeuverFromXML(String)
)maneuver
- public PlanActions getStartActions()
public PlanActions getEndActions()
public java.lang.String getType()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Object clone(Maneuver clone)
public void endManeuver()
public boolean hasEnded()
public void addTransition(java.lang.String target, java.lang.String condition)
public void removeTransition(java.lang.String target)
public java.lang.String[] getReacheableManeuvers()
public java.lang.String getTransitionCondition(java.lang.String targetManeuver)
public java.lang.String getManeuverXml()
public void loadManeuverXml(java.lang.String manXml)
manXml
- loadManeuverFromXML(String)
public java.lang.String asXML()
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public java.lang.String asXML(java.lang.String rootElementName)
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public org.dom4j.Element asElement()
asElement
in interface XmlOutputMethods
public org.dom4j.Element asElement(java.lang.String rootElementName)
asElement
in interface XmlOutputMethods
public org.dom4j.Document asDocument()
asDocument
in interface XmlOutputMethods
public org.dom4j.Document asDocument(java.lang.String rootElementName)
getManeuverAsDocument(String)
and integrates it in the document.asDocument
in interface XmlOutputMethods
XmlOutputMethods.asDocument(java.lang.String)
public abstract org.dom4j.Document getManeuverAsDocument(java.lang.String rootElementName)
rootElementName
- public abstract void loadManeuverFromXML(java.lang.String xml)
xml
- public java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.ImageIcon getIcon()
public java.lang.String getId()
public void setId(java.lang.String id)
public boolean isInitialManeuver()
public void setInitialManeuver(boolean initialManeuver)
public int getXPosition()
public void setXPosition(int position)
public int getYPosition()
public void setYPosition(int position)
public int getMaxTime()
public void setMaxTime(int maxTime)
public int getMinTime()
public void setMinTime(int minTime)
public java.util.LinkedHashMap<java.lang.String,java.lang.String> getCustomSettings()
public void setCustomSettings(java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettings)
customSettings
- the customSettings to setpublic java.util.LinkedHashMap<java.lang.String,java.lang.String> getCustomSettingsTypeHint()
public void setCustomSettingsTypeHint(java.util.LinkedHashMap<java.lang.String,java.lang.String> customSettingsTypeHint)
customSettingsTypeHint
- the customSettingsTypeHint to setpublic double interpolate(double currentValue, double desiredValue, double maxStep)
public MissionType getMissionType()
public void setMissionType(MissionType missionType)
public final void setVehicles(java.util.List<VehicleType> vehicles)
vehicle
- the vehicle to setpublic final void setVehicle(VehicleType vehicle)
public com.l2fprod.common.propertysheet.DefaultProperty[] getProperties()
getProperties
in interface PropertiesProvider
protected java.util.Vector<com.l2fprod.common.propertysheet.DefaultProperty> additionalProperties()
public void setProperties(com.l2fprod.common.propertysheet.Property[] properties)
setProperties
in interface PropertiesProvider
public java.lang.String[] getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties)
getPropertiesErrors
in interface PropertiesProvider
public java.lang.String getPropertiesDialogTitle()
getPropertiesDialogTitle
in interface PropertiesProvider
public void cloneActions(Maneuver otherMan)
public java.lang.String getTooltipText()
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.