at.lcm.x2c.scilab.xcos.xcosAdapter
Class XcosAdapter_Diagram

java.lang.Object
  extended by at.lcm.x2c.scilab.xcos.xcosAdapter.XcosAdapter_Diagram

public class XcosAdapter_Diagram
extends java.lang.Object

Adapter to effectively access Xcos diagrams and models for the purpose of Xcos to x2c transformation. This adapter encapsulates one Xcos diagram and some corresponding x2c model.

Author:
Martin Hochwallner

Constructor Summary
XcosAdapter_Diagram(com.mxgraph.model.mxGraphModel xcos_model)
           
XcosAdapter_Diagram(com.mxgraph.model.mxGraphModel xcos_model, X2cAdapter_Model x2c_model)
           
XcosAdapter_Diagram(org.scilab.modules.types.ScilabMList diagram_Mlist)
           
XcosAdapter_Diagram(org.scilab.modules.types.ScilabMList diagram_Mlist, X2cAdapter_Model x2c_model)
           
XcosAdapter_Diagram(org.scilab.modules.xcos.block.SuperBlock block)
           
XcosAdapter_Diagram(org.scilab.modules.xcos.block.SuperBlock block, X2cAdapter_Model x2c_model)
           
XcosAdapter_Diagram(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram)
           
XcosAdapter_Diagram(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram, X2cAdapter_Model x2c_model)
           
 
Method Summary
 java.util.Set<org.scilab.modules.xcos.block.BasicBlock> getAllBasicBlocks_X2c()
          Deprecated. 
 java.util.Set<org.scilab.modules.xcos.block.BasicBlock> getAllBasicBlocks()
          Deprecated. 
 java.util.Set<java.lang.Object> getAllCells()
          Return all cells from the model.
 java.util.Set<java.lang.Object> getAllCellsWithType(java.lang.Class<?> cl)
          Return all cells that are an instanceof the given class (MyClass.class).
 java.util.Set<java.lang.Object> getAllCellsWithType(java.lang.String className)
          Return all cells the specified type.
 void setModelIdentification(java.lang.String modelIdentification)
           
 void walk()
          Walk through the xcos model and add every x2c block to the x2c model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.xcos.block.SuperBlock block,
                           X2cAdapter_Model x2c_model)
                    throws java.lang.Exception
Throws:
java.lang.Exception

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.xcos.block.SuperBlock block)
                    throws java.lang.Exception
Throws:
java.lang.Exception

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram,
                           X2cAdapter_Model x2c_model)
                    throws java.lang.Exception
Throws:
java.lang.Exception

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram)
                    throws java.lang.Exception
Throws:
java.lang.Exception

XcosAdapter_Diagram

public XcosAdapter_Diagram(com.mxgraph.model.mxGraphModel xcos_model,
                           X2cAdapter_Model x2c_model)

XcosAdapter_Diagram

public XcosAdapter_Diagram(com.mxgraph.model.mxGraphModel xcos_model)

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.types.ScilabMList diagram_Mlist,
                           X2cAdapter_Model x2c_model)
                    throws org.scilab.modules.xcos.io.scicos.ScicosFormatException
Throws:
org.scilab.modules.xcos.io.scicos.ScicosFormatException

XcosAdapter_Diagram

public XcosAdapter_Diagram(org.scilab.modules.types.ScilabMList diagram_Mlist)
                    throws org.scilab.modules.xcos.io.scicos.ScicosFormatException
Throws:
org.scilab.modules.xcos.io.scicos.ScicosFormatException
Method Detail

getAllCells

public java.util.Set<java.lang.Object> getAllCells()
Return all cells from the model.

Returns:
all cells from the model

getAllCellsWithType

public java.util.Set<java.lang.Object> getAllCellsWithType(java.lang.String className)
Return all cells the specified type.

Returns:
all cells the specified type

getAllCellsWithType

public java.util.Set<java.lang.Object> getAllCellsWithType(java.lang.Class<?> cl)
Return all cells that are an instanceof the given class (MyClass.class).

Returns:
all cells that are an instanceof the given class (MyClass.class).

getAllBasicBlocks

@Deprecated
public java.util.Set<org.scilab.modules.xcos.block.BasicBlock> getAllBasicBlocks()
Deprecated. 

Returns:
set of all BasicBlocks

getAllBasicBlocks_X2c

@Deprecated
public java.util.Set<org.scilab.modules.xcos.block.BasicBlock> getAllBasicBlocks_X2c()
Deprecated. 

Returns:
set to all BasicBlocks which are X2C blocks

walk

public void walk()
          throws java.lang.Exception
Walk through the xcos model and add every x2c block to the x2c model.

Throws:
java.lang.Exception

setModelIdentification

public void setModelIdentification(java.lang.String modelIdentification)


Copyright 2013 LCM. All rights reserved.