Class ChartUIModel
java.lang.Object
com.inductiveautomation.sfc.uimodel.ChartUIModel
This is the root of the object hierarchy which is serialized into the project resource, it represents the chart as it
 is displayed in the UI.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionChartUIModel(ChartUIModel parentModel) Creates a chart UI model that is part of a parallel section
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddChartElement(ChartUIElement element) voidaddChartUIModelListener(ChartUIModelListener listener) voidvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) static ChartUIModelCreates a new chart with a begin step at x=5, y=1com.google.common.base.Optional<ChartUIElement>find(int x, int y) com.google.common.base.Optional<ChartUIElement>find(int x, int y, ElementType type) com.google.common.base.Optional<ChartUIElement>findElementsAt(int x, int y) Find the Begin Step elements that start the parallel branches.protected voidfireElementAdded(ChartUIElement element) protected voidfireElementRemoved(ChartUIElement element) protected voidstatic ChartUIModelfromXml(InputStream xmlInput, StepRegistry registry) Parses the input stream as XML which should represent a ChartUIModelstatic ChartUIModelfromXml(Element sfcElement, StepRegistry registry) Return an iterable view of all chart elements.static LinkDirectiongetConnectivity(ChartUIElement element, Edge direction) getConnectivityAt(int x, int y, Edge direction) Tests whether the element at the given location is connectable on the given edge, and if so, what direction the connection should becom.google.common.base.Optional<ChartUIModel>Deprecated.Deprecated.floatgetZoom()Returns the zoom amount.inthashCode()booleanbooleanbooleanbooleanstatic DimensionparseDimension(String attributeValue) voidvoidvoidvoidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) voidsetCanvasSize(Dimension canvasSize) voidsetExecutionMode(ChartExecutionMode executionMode) voidsetHotEditable(boolean hotEditable) voidsetOnAbortScript(String onAbortScript) voidsetOnCancelScript(String onCancelScript) voidsetOnRedundantFailoverScript(String onRedundantFailoverScript) voidsetOnStartScript(String onStartScript) voidsetOnStopScript(String onStopScript) voidsetParentModelSerializer(ChartUIModel parentModel) Deprecated.voidsetPersistState(boolean persistState) voidsetRedundantSync(boolean redundantSync) voidsetResourcePath(ResourcePath resourcePath) voidsetSFCElements(List<ChartUIElement> elements) Deprecated.voidsetZoom(float zoom) toXml(StepRegistry registry) voidtoXml(XMLStreamWriter writer, StepRegistry registry) Outputs this chart UI model to the XML stream.
- 
Field Details- 
RESOURCE_TYPE
- 
RESOURCE_NAME- See Also:
 
- 
SCOPEpublic static final int SCOPE- See Also:
 
 
- 
- 
Constructor Details- 
ChartUIModelpublic ChartUIModel()
- 
ChartUIModelCreates a chart UI model that is part of a parallel section
 
- 
- 
Method Details- 
createNewCreates a new chart with a begin step at x=5, y=1
- 
setResourcePath
- 
getResourcePath
- 
toXml- Throws:
- Exception
 
- 
toXmlOutputs this chart UI model to the XML stream. Expects that the <sfc> (or <parallel>) element has already been written.- Throws:
- XMLStreamException
 
- 
fromXmlpublic static ChartUIModel fromXml(InputStream xmlInput, StepRegistry registry) throws XmlParseException Parses the input stream as XML which should represent a ChartUIModel- Throws:
- XmlParseException
 
- 
fromXmlpublic static ChartUIModel fromXml(Element sfcElement, StepRegistry registry) throws XmlParseException - Throws:
- XmlParseException
 
- 
parseDimension
- 
fireStructureChangedprotected void fireStructureChanged()
- 
fireElementAdded
- 
fireElementRemoved
- 
isParallelSectionModelpublic boolean isParallelSectionModel()
- 
getParentModel
- 
getParentModelSerializerDeprecated.Do not call - for serialization
- 
setParentModelSerializerDeprecated.Do not call - for serialization
- 
getChartElementsReturn an iterable view of all chart elements. Note that the iterator generated will be unmodifiable. Also, note that this iterator will be fail-fast, and will throw a ConcurrentModificationException if the model is altered while iterating.
- 
find
- 
find
- 
find
- 
findElementsAt
- 
findParallelBeginsFind the Begin Step elements that start the parallel branches. These elements will not be present in the main elements list within this model, but instead can be accessed through the terminal elements list to be used for serializing and persisting chart instances.
- 
getConnectivityAtTests whether the element at the given location is connectable on the given edge, and if so, what direction the connection should be
- 
getConnectivity
- 
addChartElement
- 
removeChartElement
- 
getZoompublic float getZoom()Returns the zoom amount. Standard resolution is 1.0f, zoomed in double is 2.0f, etc.
- 
setZoompublic void setZoom(float zoom) 
- 
getCanvasSize
- 
setCanvasSize
- 
hashCodepublic int hashCode()
- 
getSFCElementsDeprecated.For serialization. do not call.
- 
setSFCElementsDeprecated.For serialization. do not call.
- 
addChartUIModelListener
- 
removeChartUIModelListener
- 
addPropertyChangeListener
- 
removePropertyChangeListener
- 
addPropertyChangeListener
- 
removePropertyChangeListener
- 
getExecutionMode
- 
setExecutionMode
- 
isHotEditablepublic boolean isHotEditable()
- 
setHotEditablepublic void setHotEditable(boolean hotEditable) 
- 
isPersistStatepublic boolean isPersistState()
- 
setPersistStatepublic void setPersistState(boolean persistState) 
- 
isRedundantSyncpublic boolean isRedundantSync()
- 
setRedundantSyncpublic void setRedundantSync(boolean redundantSync) - Parameters:
- redundantSync- Set to True to allow a chart's data model to be synchronized between a redundant master and backup during chart state changes and during step transitions.
 
- 
getOnStartScript
- 
setOnStartScript
- 
getOnStopScript
- 
setOnStopScript
- 
getOnCancelScript
- 
setOnCancelScript
- 
getOnAbortScript
- 
setOnAbortScript
- 
getOnRedundantFailoverScript
- 
setOnRedundantFailoverScript- Parameters:
- onRedundantFailoverScript- the script that will fire when a gateway becomes the active node in a redundant cluster
 
 
-