Package fbench.graph.model

Examples of fbench.graph.model.GraphModel


        if (ltn == null)
            return false;
        File fl = ltn.getFile();
        if (fl.isDirectory())
            return false;
        GraphModel mdl = ((GraphView) comp).getModel();
        //System.out.println("canImport: " + mdl);
        if (!(mdl instanceof GraphModel))
            return false;
        return mdl.canAccept(fl.getName());
    }
View Full Code Here


  }

  private Vector<String> getFBTypeComponentList( String fbName,
      boolean isEvent, boolean isInput){
    boolean isResource = getElement().getParentNode().getNodeName().equalsIgnoreCase("Resource");
    GraphModel model = GraphModel.forElement(isResource ?
        (Element) getElement().getParentNode() : getElement());
    Vector<String> fbTypeComponentList = new Vector<String>();

    String connectionType = new String();
    if(isEvent && isInput)
      connectionType = "EventInputs";
    else if(isEvent && !isInput)
      connectionType = "EventOutputs";
    else if(!isEvent && isInput)
      connectionType = "InputVars";
    else if(!isEvent&& !isInput)
      connectionType = "OutputVars";

    for ( Enumeration els = model.getGraph().elements(); els.hasMoreElements();) {
      GraphElement ge = (GraphElement) els.nextElement();
      if(ge instanceof FB){
        FB fb = (FB)ge;
        if(fb.getMainLabel().getText().equals(fbName)){
          Document fbDocument = Library.getDocument(fb.getFBType() + ".fbt");
View Full Code Here

  private void drawFBPreviewPane(String filename){
    typeField.setText(filename);
    Element docElement = Library.getDocument(filename).getDocumentElement();

    fbPreviewPane.removeAll();
    GraphModel model = GraphModel.forElement(docElement);
    if (model != null) {
      for ( Enumeration els = model.getGraph().elements(); els.hasMoreElements();) {
        GraphElement ge = (GraphElement) els.nextElement();
        fbPreviewPane.add(ge);
      }
    }
    Dimension fbPaneSize =
View Full Code Here

      String sourceFBName = sourceFBBox.getSelectedItem().toString();
      String destinationFBName = destinationFBBox.getSelectedItem().toString();
      int connectionStartPt = 0;
      int connectionEndPt = 0;
      GraphModel model = GraphModel.forElement(getElement());
      for ( Enumeration els = model.getGraph().elements(); els.hasMoreElements();) {
        GraphElement ge = (GraphElement) els.nextElement();
        if(ge instanceof FB){
          FB fb = (FB)ge;
          if(fb.getMainLabel().getText().equals(sourceFBName))
            connectionStartPt = fb.getPreferredBounds().x;
View Full Code Here

TOP

Related Classes of fbench.graph.model.GraphModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.