public abstract class DynFormBase
extends java.lang.Object
DynForm
.DynForm
Modifier and Type | Field and Description |
---|---|
protected AgentStartConfiguration |
agentStartConfiguration
Constructor parameter
|
protected java.util.Vector<AgentStartArgument> |
currOntologyClassReferenceList
Based on this vector the user interface will be created
|
protected boolean |
debug
For debugging purposes
|
protected KeyAdapter4Numbers |
numWatcherFloat
The KeyAdapter for float values
|
protected KeyAdapter4Numbers |
numWatcherInteger
The KeyAdapter for Integer values
|
protected javax.swing.tree.DefaultTreeModel |
objectTree
The TreeModel for the class hierarchy of the current ontology configuration
|
protected java.lang.Object[] |
ontoArgsInstance
The instances that are to be created by the DynForm
|
protected java.lang.String[] |
ontoArgsXML
The XML strings that are to be created by the DynForm
|
protected OntologyVisualizationHelper |
ontologyVisualisationHelper
Necessary parameter that comes from the constructor
|
Constructor and Description |
---|
DynFormBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract javax.swing.tree.DefaultMutableTreeNode |
addSingleMultipleNode(javax.swing.tree.DefaultMutableTreeNode currNode,
boolean isInnerClass)
This method has to create a copy of the passed JPanel and adds it.
|
protected java.lang.Object |
getInstanceOfXML(java.lang.String xmlString,
java.lang.String className,
jade.content.onto.Ontology ontology)
This method translates an XML String to an object instance by the
given instance of the current ontology.
|
protected java.lang.Object[] |
getInstancesFromXML(java.lang.String[] ontoArgsXML)
This method reads the given XML configuration of the arguments, fills
the form and creates the instances.
|
protected javax.swing.tree.DefaultTreeModel |
getObjectTree()
Returns the object tree with all elements to display.
|
java.util.Vector<AgentStartArgument> |
getOntologyClassReferenceList()
Gets the ontology class reference list.
|
OntologyClassWidget |
getOntologyClassWidget(javax.swing.tree.DefaultMutableTreeNode node)
Returns the form component for a OntologyClassVisualisation.
|
java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,OntologyClassWidget> |
getOntologyClassWidgets()
Returns the OntologyClassWidget's for all current OntologyClassVisualisation's.
|
protected javax.swing.tree.DefaultMutableTreeNode |
getRootNode()
Returns the root node of the object tree.
|
javax.swing.tree.DefaultMutableTreeNode |
getTreeNodeByDynType(DynType dynType)
Returns a tree node, specified by the user object (
DynType ). |
java.util.HashMap<DynType,javax.swing.tree.DefaultMutableTreeNode> |
getTreeNodesByDynType()
Returns the HshMap of tree nodes by DynType.
|
javax.swing.JComponent |
getVisualComponent(java.lang.String valueType)
This method creates the JComponent, which will be
displayed for an ontology slot.
|
boolean |
isEmptyForm()
Indicates if the created form is empty.
|
protected boolean |
isRawType(java.lang.String valueType)
This method checks if the type of the field is a raw type
(String, int, float, ...)
|
protected abstract void |
removeMultiple(javax.swing.tree.DefaultMutableTreeNode delNode)
This method has to remove the JPanel passed with the given tree node.
|
protected void |
resetValuesOnForm()
Resets the form values.
|
void |
save(boolean fromForm)
This method can be invoked to generate the instance of the current configuration.
|
protected void |
setFormState(java.lang.Object object,
javax.swing.tree.DefaultMutableTreeNode node)
This method sets the object state to the form.
|
protected void |
setInstancesFromForm()
This methods reads the current form configuration and creates
the instances and the XML form of that configuration.
|
protected void |
setInstancesFromXML()
This method reads the current XML configuration of the
arguments, fills the form and creates the instances.
|
protected void |
setIsEmptyForm(boolean isEmptyForm)
Sets the indicator if the DynForm is empty.
|
protected void |
setXMLFromInstances()
This method creates the XML form from the instances.
|
protected void |
showObjectTree()
Shows the object tree in a visual way in a JDialog, if the internal debug value is set to be true.
|
protected OntologyVisualizationHelper ontologyVisualisationHelper
protected AgentStartConfiguration agentStartConfiguration
protected java.util.Vector<AgentStartArgument> currOntologyClassReferenceList
protected boolean debug
protected KeyAdapter4Numbers numWatcherFloat
protected KeyAdapter4Numbers numWatcherInteger
protected javax.swing.tree.DefaultTreeModel objectTree
protected java.lang.Object[] ontoArgsInstance
protected java.lang.String[] ontoArgsXML
public java.util.Vector<AgentStartArgument> getOntologyClassReferenceList()
protected javax.swing.tree.DefaultTreeModel getObjectTree()
protected javax.swing.tree.DefaultMutableTreeNode getRootNode()
getObjectTree()
protected void showObjectTree()
public java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,OntologyClassWidget> getOntologyClassWidgets()
public OntologyClassWidget getOntologyClassWidget(javax.swing.tree.DefaultMutableTreeNode node)
node
- the current nodepublic java.util.HashMap<DynType,javax.swing.tree.DefaultMutableTreeNode> getTreeNodesByDynType()
public javax.swing.tree.DefaultMutableTreeNode getTreeNodeByDynType(DynType dynType)
DynType
).dynType
- the DynTypepublic boolean isEmptyForm()
protected void setIsEmptyForm(boolean isEmptyForm)
isEmptyForm
- the indicator if the DynForm is empty or notprotected boolean isRawType(java.lang.String valueType)
valueType
- the value typepublic javax.swing.JComponent getVisualComponent(java.lang.String valueType)
valueType
- the value typepublic void save(boolean fromForm)
fromForm
- the from formprotected void setXMLFromInstances()
protected void setInstancesFromXML()
protected java.lang.Object[] getInstancesFromXML(java.lang.String[] ontoArgsXML)
ontoArgsXML
- the ontology arguments as String array containing XMLprotected java.lang.Object getInstanceOfXML(java.lang.String xmlString, java.lang.String className, jade.content.onto.Ontology ontology)
xmlString
- the xml stringontology
- the ontologyprotected void setInstancesFromForm()
protected void setFormState(java.lang.Object object, javax.swing.tree.DefaultMutableTreeNode node)
object
- the objectnode
- the nodeprotected abstract void removeMultiple(javax.swing.tree.DefaultMutableTreeNode delNode)
delNode
- the nodeprotected abstract javax.swing.tree.DefaultMutableTreeNode addSingleMultipleNode(javax.swing.tree.DefaultMutableTreeNode currNode, boolean isInnerClass)
currNode
- the current nodeisInnerClass
- the is inner classprotected void resetValuesOnForm()