Package org.opentrafficsim.editor
package org.opentrafficsim.editor
The OTS editor allows visual editing for a simulation in OTS. It is designed to be flexible. The editor reads the OTS XML
Schema (xsd) and builds a visible tree for the user from the elements as defined in the schema. Everything in the schema can
be specified as such, including future changes. The editor is responsive to data types, and the use of keys and keyrefs in
the schema. Keys define that values need to be unique, whereas keyrefs define the value of some element or attribute to be
one of the values as specified for a referred key. For example, node id's are a key because they need to be unique, and the
start and end node attributes of a link refer to one of the node id's with a keyref. The editor will not only check this, but
also give the existing values in for example a pick list.
The editor is further decorated with a number of functions. There are many string functions, which supply information in the names of the nodes in the tree, reflecting the specific element. There are also various validators that look at specific constraints of nodes. For example that an attribute referring to a parent of the same type, does not create a cyclical dependency. Finally there are extensions, which provide alternative methods to visually specify input. They use tabs in the main window that each extension fills as appropriate. The extensions read and write the specified information in the tree.
All decorations interact with the tree using events, including the creation and deletion of nodes, and attribute value changes.
The editor is further decorated with a number of functions. There are many string functions, which supply information in the names of the nodes in the tree, reflecting the specific element. There are also various validators that look at specific constraints of nodes. For example that an attribute referring to a parent of the same type, does not create a cyclical dependency. Finally there are extensions, which provide alternative methods to visually specify input. They use tabs in the main window that each extension fills as appropriate. The extensions read and write the specified information in the tree.
All decorations interact with the tree using events, including the creation and deletion of nodes, and attribute value changes.
Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
ClassDescriptionPrevents the TreeTable from showing appearance background color.Stores preferences, recently opened files, etc.Model for a
JTable
to display the attributes of aXsdTreeNode
.Utility class to read XSD or XML from URI.Wraps an evaluator for the editor.Interface for listeners that need to know when evaluation results may have changed.This class houses actions that can be performed on tree nodes.Editor window to load, edit and save OTS XML files.Simulation runner for when running from editor.The simulation model.Runs the editor with default decoration and built-in XML schema.Wraps a scenario node as an item in the dropdown menu.Reads the XML Schema in XSD format for OTS.Status label with fixed font color irrespective of GUI appearance.Undo unit for the OTS editor.Type of actions for undo.Singleton atXiIncludeNode.XI_INCLUDE
to use for xi:include nodes in anXsdTreeNode
.Class that groups some information on an option for a choice node, relevant to show to the user.Class where static fields define paths in the XML.Underlying data structure object of the editor.ExtendsXsdTreeNode
with event producer capabilities.This class exists to keepXsdTreeNode
at manageable size.Defines the columns in theJTreeTable
.