Uses of Class
org.opentrafficsim.editor.XsdTreeNode
Package
Description
The OTS editor allows visual editing for a simulation in OTS.
Decorators enhance the basic flexible functionality of the editor.
String functions provide additional information in the name of nodes in the tree.
Validators validate either a node value or attribute value.
Extensions provide additional methods of providing user input, other than via the tree.
The map editor allows visual specification of the network.
Listeners for user interaction.
-
Uses of XsdTreeNode in org.opentrafficsim.editor
Modifier and TypeClassDescriptionclass
ExtendsXsdTreeNode
with event producer capabilities.Modifier and TypeFieldDescription(package private) XsdTreeNode
XsdTreeNode.choice
Choice node, represents an xsd:choice of which 1 option is shown.(package private) XsdTreeNode
XsdTreeNode.parent
Parent node.(package private) XsdTreeNode
XsdTreeNode.selected
Currently selection option in the choice node.Modifier and TypeFieldDescription(package private) List<XsdTreeNode>
XsdTreeNode.children
Children nodes.(package private) List<XsdTreeNode>
XsdTreeNode.options
Option nodes.Modifier and TypeMethodDescriptionXsdTreeNode.add()
Adds a node of similar type next to this node under the parent.XsdOption.choice()
Returns the value of thechoice
record component.XsdTreeNode.duplicate()
Creates a full copy of this node, next to this node under the same parent.XsdTreeNode.duplicate
(XsdTreeNode newParent) Duplicates this node, but under the given parent node.XsdTreeNode.emptyCopy()
Creates an empty copy of this node, i.e. without children, options, attributes.XsdTreeNode.getChild
(int index) Returns the child at given index; directly for anXsdTreeTableModel
.OtsEditor.getChoiceNode()
Returns the node that is the currently selected choice.OtsEditor.getClipboard()
Returns the clipboard node.XsdTreeNode.getCoupledKeyrefNodeAttribute
(int index) Returns the node to which an attribute refers via a KeyValidator.XsdTreeNode.getCoupledKeyrefNodeAttribute
(String attribute) Returns the node to which an attribute refers via a KeyValidator.XsdTreeNode.getCoupledKeyrefNodeValue()
Returns the node to which the value refers via a KeyValidator.XsdTreeNode.getFirstChild
(String name) Returns the first child with given name.AttributesTableModel.getNode()
Returns the underlying node for which attributes are shown.XsdTreeNode.getOption()
Returns the selected option.XsdTreeNode.getParent()
Returns the parent node.ScenarioWrapper.getScenarioNode()
Returns the scenario node.XsdOption.optionNode()
Returns the value of theoptionNode
record component.Modifier and TypeMethodDescriptionXsdTreeNode.getChildren()
Returns a list of the child nodes.XsdTreeNode.getPath()
Returns the path from root to this node.Modifier and TypeMethodDescriptionvoid
NodeActions.add
(XsdTreeNode node) Add node.(package private) static void
XsdTreeNodeUtil.addChildren
(Node node, XsdTreeNode parentNode, List<XsdTreeNode> children, org.djutils.immutablecollections.ImmutableList<Node> hiddenNodes, Schema schema, boolean flattenSequence, int skip) Main expansion algorithm.static void
XsdTreeNodeUtil.addXsdAllValidator
(XsdTreeNode shared, XsdTreeNode node) Add xsd all validator to the given node.boolean
XsdTreeNode.canContain
(XsdTreeNode copied) Returns whether this node can contain the information of the given node.boolean
OtsEditor.confirmNodeRemoval
(XsdTreeNode node) Requests the user to confirm the deletion of a node.void
NodeActions.copy
(XsdTreeNode node) Copy node.void
XsdTreeNode.copyInto
(XsdTreeNode copyNode) Copies the active status, value, choice, attributes and children of this node in to the given node.void
NodeActions.cut
(XsdTreeNode node) Cut node.void
NodeActions.duplicate
(XsdTreeNode node) Duplicate node.XsdTreeNode.duplicate
(XsdTreeNode newParent) Duplicates this node, but under the given parent node.void
NodeActions.expand
(XsdTreeNode node, TreePath path, boolean expanded) Expand, or collapse, node.protected static void
XsdTreeNodeUtil.fireCreatedEventOnExistingNodes
(XsdTreeNode node, org.djutils.event.EventListener listener) Recursively throws creation events for all current nodes in the tree.(package private) static boolean
XsdTreeNodeUtil.haveSameType
(XsdTreeNode node1, XsdTreeNode node2) Returns whether nodes are of the same type.void
NodeActions.insert
(XsdTreeNode node) Insert node.(package private) void
XsdTreeNode.invalidateAll
(XsdTreeNode node) Invalidates entire tree in a nested manner.boolean
ScenarioWrapper.isScenario
(XsdTreeNode node) Returns whether this wraps the given node.void
NodeActions.move
(XsdTreeNode node, int down) Move node.void
EvalWrapper.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
EvalWrapper.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.void
NodeActions.paste
(XsdTreeNode node) Paste node.void
NodeActions.remove
(XsdTreeNode node) Remove node.void
NodeActions.revolveOption
(XsdTreeNode node, List<XsdOption> options) Revolve to the next option of the node.void
OtsEditor.saveFileAs
(XsdTreeNode root) Shows a dialog to define a file and saves in to it.void
XsdTreeNode.setChild
(int index, XsdTreeNode child) Sets the given node as child of this node.void
OtsEditor.setChoiceNode
(XsdTreeNode choiceNode) Sets the node that is the currently selected choice.void
OtsEditor.setClipboard
(XsdTreeNode clipboard, boolean cut) Sets a node in the clipboard.void
OtsEditor.setCoupledNode
(XsdTreeNode coupledNode, XsdTreeNode backNode, String backAttribute) Sets coupled node from user action, i.e. the node that contains the key value to which a user selected node with keyref refers to.void
XsdTreeNode.setOption
(XsdTreeNode node) Sets the node as newly selected option.void
Undo.setPostActionShowNode
(XsdTreeNode node) Sets the node to show in the tree after the action.void
OtsEditor.show
(XsdTreeNode node, String attribute) Shows and selects the given node in the tree.void
Undo.startAction
(Undo.ActionType type, XsdTreeNode node, String attribute) Starts a new action, which groups all sub-actions until a new action is started.Modifier and TypeMethodDescription(package private) static void
XsdTreeNodeUtil.addChildren
(Node node, XsdTreeNode parentNode, List<XsdTreeNode> children, org.djutils.immutablecollections.ImmutableList<Node> hiddenNodes, Schema schema, boolean flattenSequence, int skip) Main expansion algorithm.void
XsdTreeNode.addConsumer
(String menuItem, Consumer<XsdTreeNode> consumer) A consumer can be set externally and will receive this node when its menu item is selected.void
XsdTreeNode.addNodeValidator
(Function<XsdTreeNode, String> validator) Adds a validator for the node.void
XsdTreeNode.setStringFunction
(Function<XsdTreeNode, String> stringFunction, boolean overwrite) This function can be set externally and supplies an additionalString
to clarify this node in the tree.ModifierConstructorDescriptionAttributesTableModel
(XsdTreeNode node, de.javagl.treetable.JTreeTable treeTable) Constructor.ScenarioWrapper
(XsdTreeNode scenarioNode) Constructor.XsdOption
(XsdTreeNode optionNode, XsdTreeNode choice, boolean firstInGroup, boolean selected) Creates an instance of aXsdOption
record class.(package private)
XsdTreeNode
(XsdTreeNode parent, Node xsdNode, org.djutils.immutablecollections.ImmutableList<Node> hiddenNodes) Construct a node without referring node.(package private)
XsdTreeNode
(XsdTreeNode parent, Node xsdNode, org.djutils.immutablecollections.ImmutableList<Node> hiddenNodes, Node referringXsdNode) Constructor with referring node for extended types. -
Uses of XsdTreeNode in org.opentrafficsim.editor.decoration
Modifier and TypeFieldDescriptionprotected final Predicate<XsdTreeNode>
AbstractNodeDecoratorAttribute.predicate
Predicate to accept nodes that should have this attribute decorator.Modifier and TypeMethodDescriptionvoid
LayoutCustomizer.accept
(XsdTreeNode node) abstract void
AbstractNodeDecoratorAttribute.notifyAttributeChanged
(XsdTreeNode node, String attribute) Notified when a node has been removed.void
AutomaticConnectorId.notifyAttributeChanged
(XsdTreeNode node, String attribute) Notified when a node has been removed.void
AutomaticLinkId.notifyAttributeChanged
(XsdTreeNode node, String attribute) Notified when a node has been removed.abstract void
AbstractNodeDecorator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
AbstractNodeDecoratorAttribute.notifyCreated
(XsdTreeNode node) Notified when a node has been created.abstract void
AbstractNodeDecoratorRemove.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.ModifierConstructorDescriptionAbstractNodeDecoratorAttribute
(OtsEditor editor, Predicate<XsdTreeNode> predicate, String... attributes) Constructor.protected
AutomaticLinkId
(OtsEditor editor, Predicate<XsdTreeNode> predicate, String... attributes) Constructor for sub classes. -
Uses of XsdTreeNode in org.opentrafficsim.editor.decoration.string
Modifier and TypeMethodDescriptionabstract Function<XsdTreeNode,
String> AbstractStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.AttributesStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.ClassNameTypeStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.CorrelationStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.OdOptionsItemStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.XiIncludeStringFunction.getStringFunction()
Returns the string function that produces the right string from the contents of a node.Modifier and TypeMethodDescriptionvoid
AbstractStringFunction.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
ChoiceNodeStringFunction.notifyCreated
(XsdTreeNode node) Notified when a node has been created.ModifierConstructorDescriptionAbstractStringFunction
(OtsEditor editor, Predicate<XsdTreeNode> predicate) Constructor. -
Uses of XsdTreeNode in org.opentrafficsim.editor.decoration.validation
Modifier and TypeMethodDescriptionprotected XsdTreeNode
XPathValidator.getContext
(XsdTreeNode node) Returns a node that represent the proper context.CoupledValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.KeyrefValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.RoadLayoutElementValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.TrafficLightValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.Modifier and TypeMethodDescriptionprotected Map<XsdTreeNode,
List<String>> KeyValidator.getAllValueSets
(XsdTreeNode node) Returns the present values of the fields for each node within the given context.Modifier and TypeMethodDescriptionvoid
KeyrefValidator.addNode
(XsdTreeNode node) Adds node to this key, if applicable.void
KeyValidator.addNode
(XsdTreeNode node) Adds node to this key, if applicable.abstract void
XPathValidator.addNode
(XsdTreeNode node) Adds node to this key, if applicable.void
XsdAllValidator.addNode
(XsdTreeNode node) Add node to this validator.NoDuplicateChildrenValidator.apply
(XsdTreeNode node) XsdAllValidator.apply
(XsdTreeNode node) XPathValidator.gatherFieldValues
(XsdTreeNode node) Gathers all the field values, i.e. attribute, child element value, or own value.protected Map<XsdTreeNode,
List<String>> KeyValidator.getAllValueSets
(XsdTreeNode node) Returns the present values of the fields for each node within the given context.protected XsdTreeNode
XPathValidator.getContext
(XsdTreeNode node) Returns a node that represent the proper context.CoupledValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.KeyrefValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.RoadLayoutElementValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.TrafficLightValidator.getCoupledKeyrefNode
(XsdTreeNode node) Returns the coupled node.KeyrefValidator.getOptions
(XsdTreeNode node, Object field) Returns the options that a validator allows, typically an xsd:keyref returning defined values under the referred xsd:key or xsd:unique.RoadLayoutElementValidator.getOptions
(XsdTreeNode node, Object field) Returns the options that a validator allows, typically an xsd:keyref returning defined values under the referred xsd:key or xsd:unique.TrafficLightValidator.getOptions
(XsdTreeNode node, Object field) Returns the options that a validator allows, typically an xsd:keyref returning defined values under the referred xsd:key or xsd:unique.ValueValidator.getOptions
(XsdTreeNode node, Object field) Returns the options that a validator allows, typically an xsd:keyref returning defined values under the referred xsd:key or xsd:unique.int
XPathValidator.Field.getValidPathIndex
(XsdTreeNode node) Returns which field path is valid for the given node.XPathValidator.Field.getValue
(XsdTreeNode node) Returns the field value of the given node.protected boolean
XPathValidator.isSelectedInContext
(XsdTreeNode node) Returns whether the given node is of the correct type and in the correct context for this validator.void
AttributesNotEqualValidator.notifyAttributeChanged
(XsdTreeNode node, String attribute) Notified when a node has been removed.void
AttributesNotEqualValidator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
NoDuplicateChildrenValidator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
ParentValidator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
RoadLayoutElementValidator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
TrafficLightValidator.notifyCreated
(XsdTreeNode node) Notified when a node has been created.void
NoDuplicateChildrenValidator.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.void
ParentValidator.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.void
RoadLayoutElementValidator.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.void
TrafficLightValidator.notifyRemoved
(XsdTreeNode node) Notified when a node has been removed.void
KeyrefValidator.removeNode
(XsdTreeNode node) Remove node.void
KeyValidator.removeNode
(XsdTreeNode node) Remove node.abstract void
XPathValidator.removeNode
(XsdTreeNode node) Remove node.static void
CoupledValidator.setAttributeIfNotNull
(XsdTreeNode node, String attribute, String value) Sets the given value on the attribute of the node, if the current value is notnull
.static void
CoupledValidator.setValueIfNotNull
(XsdTreeNode node, String value) Sets the given value on the node, if the current value is notnull
.void
KeyrefValidator.updateFieldValue
(XsdTreeNode node, int fieldIndex, String newValue) Update value as it was changed at the key.AttributesNotEqualValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.KeyrefValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.KeyValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.ParentValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.RoadLayoutElementValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.TrafficLightValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid.ValueValidator.validate
(XsdTreeNode node) Returns message why a value is invalid, ornull
if the value is valid. -
Uses of XsdTreeNode in org.opentrafficsim.editor.extensions
Modifier and TypeMethodDescriptionvoid
DefinitionsSaver.accept
(XsdTreeNode node) void
RoadLayoutEditor.accept
(XsdTreeNode t) void
RouteEditor.accept
(XsdTreeNode t) void
TrafCodEditor.accept
(XsdTreeNode t) -
Uses of XsdTreeNode in org.opentrafficsim.editor.extensions.map
Modifier and TypeMethodDescriptionChangeListener.getNode()
Returns the main node.MapData.getNode()
Returns the tree node.Modifier and TypeMethodDescription(package private) Map<XsdTreeNode,
RoadLayoutOffsets.CseData> RoadLayoutListener.calculateData()
Returns the offsets of the layout this listener is listening to.Modifier and TypeMethodDescriptionvoid
MapLinkData.addCoordinate
(XsdTreeNode node) The map was notified a new coordinate node was added.protected boolean
ChangeListener.canBeIgnored
(XsdTreeNode node) Returns whether the node may be ignored.protected boolean
RoadLayoutListener.canBeIgnored
(XsdTreeNode node) Returns whether the node may be ignored.EditorMap.getData
(XsdTreeNode node) Returns the map data of the given XSD node.(package private) RoadLayoutListener
EditorMap.getRoadLayoutListener
(XsdTreeNode node) Returns the road layout listener from which aMapLinkData
can obtain offsets.void
MapLinkData.notifyNodeIdChanged
(XsdTreeNode node) Notification from the Map that a node (Ots.Network.Node) id was changed.void
EditorMap.reinitialize
(XsdTreeNode node) Reinitialize animation on object who's animator stores static information that depends on something that was changed.void
MapLinkData.removeCoordinate
(XsdTreeNode node) The map was notified a coordinate node was removed.protected void
MapLaneBasedObjectData.setLinkNode
(XsdTreeNode linkNode) Sets a node as link.protected <T> void
MapData.setValue
(Consumer<T> setter, ExpressionAdapter<T, ?> adapter, XsdTreeNode node, String attribute) Generic method to set a value based on a changed attribute.ModifierConstructorDescriptionChangeListener
(XsdTreeNode node, Supplier<org.djutils.eval.Eval> eval) Constructor.FlattenerListener
(XsdTreeNode flattenerNode, Supplier<org.djutils.eval.Eval> eval) Constructor.MapCrossSectionData
(XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor.MapData
(EditorMap map, XsdTreeNode node, OtsEditor editor) Constructor.MapGeneratorData
(EditorMap map, XsdTreeNode node, OtsEditor editor) Constructor.MapLaneBasedObjectData
(EditorMap map, XsdTreeNode node, OtsEditor editor) Constructor.MapLaneData
(String id, XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor.MapLinkData
(EditorMap map, XsdTreeNode linkNode, OtsEditor editor) Constructor.MapNodeData
(EditorMap map, XsdTreeNode nodeNode, OtsEditor editor) Constructor.MapShoulderData
(org.djunits.value.vdouble.scalar.Length startOffset, XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor.MapSinkData
(EditorMap map, XsdTreeNode node, OtsEditor editor) Constructor.MapStripeData
(StripeAnimation.StripeData.Type type, org.djunits.value.vdouble.scalar.Length width, org.djunits.value.vdouble.scalar.Length startOffset, XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor.MapTrafficLightData
(EditorMap map, XsdTreeNode node, OtsEditor editor) Constructor.RoadLayoutListener
(XsdTreeNode layoutNode, Supplier<org.djutils.eval.Eval> eval) Constructor. -
Uses of XsdTreeNode in org.opentrafficsim.editor.listeners
ModifierConstructorDescriptionChoiceListener
(XsdTreeNode choiceNode, XsdTreeNode option, int reselectionRow, OtsEditor editor, de.javagl.treetable.JTreeTable treeTable, JTable attributesTable) Constructor.