Examples of Linkable


Examples of com.webdeninteractive.xbotts.Mapping.compiler.Linkable

          String argName = transformer.getInputArguments()[i];
          TransformerArgument ta = getTransformer().getTransferArgument(argName);

         
          for(int j=0; j<ta.getHardLinkSources().length; j++){
            Linkable source = ta.getHardLinkSources()[j];

                        getTransformer().getLinkPanel().removeLink(source, ta);

          }
       
        }

        for(int i=0; i<transformer.getOutputArguments().length; i++){
          String argName = transformer.getOutputArguments()[i];
          TransformerArgument ta = getTransformer().getTransferArgument(argName);
         
          for(int j=0; j<ta.getHardLinkTargets().length; j++){
            Linkable target = ta.getHardLinkTargets()[j];

                        getTransformer().getLinkPanel().removeLink(ta, target);
          }
        }
       
View Full Code Here

Examples of com.webdeninteractive.xbotts.Mapping.compiler.Linkable

  @Override
  public void afterAdded() {
    SchemaTreeModel stm = (SchemaTreeModel) (getLinkPanel().getTargetTree().getModel());

    Linkable dummyNode = (Linkable) stm.getNodesIndexedByName().get("dummy1");
   
    for(int i=0; i<getOutputArguments().length; i++){
      TransformerArgument outputTA = getTransferArgument(getOutputArguments()[i]);
     
      getLinkPanel().addLink(outputTA, dummyNode);
View Full Code Here

Examples of com.webdeninteractive.xbotts.Mapping.compiler.Linkable

        JMenuItem menuItem = new JMenuItem("Unlink");
        menuItem.addActionListener(new ActionListener(){

      public void actionPerformed(ActionEvent e) {
        if(getHardLinkSources().length>0){
          Linkable source = getHardLinkSources()[0];
          getTransformer().getArgumentSourceMap().remove(getName());
          getTransformer().getLinkPanel().removeLink(source, TransformerArgument.this);
        }else if(getHardLinkTargets().length>0){
          Linkable target = getHardLinkTargets()[0];
          getTransformer().getLinkPanel().removeLink(TransformerArgument.this, target);         
        }
      }
         
        });
View Full Code Here

Examples of com.webdeninteractive.xbotts.Mapping.compiler.Linkable

          if(t!=null){
           
            try {
              DataFlavor[] flavors = t.getTransferDataFlavors( );
              if (flavors[0].equals(Linkable.LINKABLE_FLAVOR)) {
                Linkable src = (Linkable) t.getTransferData( Linkable.LINKABLE_FLAVOR );
                transformer.getLinkPanel().addLink(src, this);
              }
            } catch(Exception ufe) {
            }
          }
View Full Code Here

Examples of com.webdeninteractive.xbotts.Mapping.compiler.Linkable

          if(name.startsWith("@")){//strip attribute token ()
              name=name.substring((name.indexOf("@")+1), name.length( ));
          }
           */
          Iterator iter = children.iterator( );
          Linkable child = null;
          if(name.indexOf("[")==-1){
              while(iter.hasNext( )){
                  child = (Linkable) iter.next( );
                  if(child.getName( ).equals(name)){
                      return child;
                  }
              }
              return null;
          }else{
              int index = Integer.parseInt(name.substring(name.indexOf("[")+1, name.indexOf("]")));
              String n = name.substring(0, name.indexOf("["));
              int current=0;
              while(iter.hasNext( )){
                  Linkable l =(Linkable) iter.next( );
                  if(l.getName( ).equals(n)){
                      if(current==index) return l;
                      current++;
                  }
              }
          }
View Full Code Here

Examples of jsynoptic.base.Linkable

                AbstractShape abs = (AbstractShape) it.next();
                abs.addListener( (ShapeListener)sc.getComponent());
                if (!(abs instanceof Linkable)) {
                    continue;
                }
                Linkable l = (Linkable) abs;
                // Now trying to restore absolute file
                File parent = f.getParentFile();
                if (parent == null) {
                    parent = new File("./");
                }
                String link = l.getLink();
                if ((link != null) && (!link.equals(""))) {
                    File nl = new File(parent, link);
                    l.setLink(nl.getCanonicalPath());
                }
            } catch (ClassCastException cce) {
            }
        }
    }
View Full Code Here

Examples of jsynoptic.base.Linkable

        for (Iterator it = sc.iterator(); it.hasNext();) {
            Object o = it.next();
            if (!(o instanceof Linkable)) {
                continue;
            }
            Linkable l = (Linkable) o;
            String link = l.getLink();
            if (link != null) {
                File flink = new File(link);
                String sf = f.getCanonicalPath();
                String sl = flink.getCanonicalPath();
                int i = -1, lastOK = -1;
                while ((i < sl.length()) && (i < sf.length())
                        && ((i == -1) || sf.substring(0, i).equals(sl.substring(0, i)))) {
                    lastOK = i;
                    i = sl.indexOf(File.separator, i + 1);
                    if (i == -1) {
                        break;
                    }
                }
                String subf = sf.substring(lastOK + 1, sf.length());
                String subl = sl.substring(lastOK + 1, sl.length());
                String prefix = "";
                i = -1;
                while (true) {
                    i = subf.indexOf(File.separator, i + 1);
                    if (i == -1) {
                        break;
                    }
                    prefix += "../";
                }
                link = prefix + subl;
                link = link.replaceAll("\\\\", "/"); // regexp black magic
                // incantation
                // Set the relative link
                l.setLink(link);
            }
        }

    }
View Full Code Here

Examples of jsynoptic.base.Linkable

                        AbstractShape abs = (AbstractShape) it.next();
                        abs.addListener( (ShapeListener)sc.getComponent());
                        if (!(abs instanceof Linkable)) {
                            continue;
                        }
                        Linkable l = (Linkable) abs;
                        // Now trying to restore absolute file
                        File parent = f.getParentFile();
                        if (parent == null) {
                            parent = new File("./");
                        }
                        String link = l.getLink();
                        if ((link != null) && (!link.equals(""))) {
                            File nl = new File(parent, link);
                            l.setLink(nl.getCanonicalPath());
                        }
                    } catch (ClassCastException cce) {
                    }
                }
                if (JSynoptic.gui != null) {
View Full Code Here

Examples of jsynoptic.base.Linkable

        for (Iterator it = sc.iterator(); it.hasNext();) {
            Object o = it.next();
            if (!(o instanceof Linkable)) {
                continue;
            }
            Linkable l = (Linkable) o;
            String link = l.getLink();
            if (link != null) {
                File flink = new File(link);
                String sf = f.getCanonicalPath();
                String sl = flink.getCanonicalPath();
                int i = -1, lastOK = -1;
                while ((i < sl.length()) && (i < sf.length())
                        && ((i == -1) || sf.substring(0, i).equals(sl.substring(0, i)))) {
                    lastOK = i;
                    i = sl.indexOf(File.separator, i + 1);
                    if (i == -1) {
                        break;
                    }
                }
                String subf = sf.substring(lastOK + 1, sf.length());
                String subl = sl.substring(lastOK + 1, sl.length());
                String prefix = "";
                i = -1;
                while (true) {
                    i = subf.indexOf(File.separator, i + 1);
                    if (i == -1) {
                        break;
                    }
                    prefix += "../";
                }
                link = prefix + subl;
                link = link.replaceAll("\\\\", "/"); // regexp black magic
                // incantation
                // Set the relative link
                l.setLink(link);
            }
        }
        FileOutputStream fos = new FileOutputStream(f);
        // ZipOutputStream zos = new ZipOutputStream(fos);
        // zos.setComment(resources.getStringValue("zipComment"));
        ObjectOutputStream os = new ObjectOutputStream(fos);
        // os.writeObject(resources.getStringValue("fileComment"));
        os.writeObject(sc);
        os.writeObject(null); // for ascending compatibility
        os.writeObject(null); // for ascending compatibility
        os.writeObject(null); // for ascending compatibility
        os.flush();
        os.close();
        fos.close(); // also closes the file
        String name = f.getName();
        String myExt = resources.getStringValue("jsynopticFilterExtension");
        if (name.endsWith(myExt)) {
            name = name.substring(0, name.length() - myExt.length() - 1);
        }
        sc.getComponent().setName(name);
        // Restoring absolute links
        for (Iterator it = sc.iterator(); it.hasNext();) {
            try {
                AbstractShape abs = (AbstractShape) it.next();
                abs.addListener( (ShapeListener)sc.getComponent());
                if (!(abs instanceof Linkable)) {
                    continue;
                }
                Linkable l = (Linkable) abs;
                // Now trying to restore absolute file
                File parent = f.getParentFile();
                if (parent == null) {
                    parent = new File("./");
                }
                String link = l.getLink();
                if ((link != null) && (!link.equals(""))) {
                    File nl = new File(parent, link);
                    l.setLink(nl.getCanonicalPath());
                }
            } catch (ClassCastException cce) {
            }
        }
        if (JSynoptic.gui != null) {
View Full Code Here

Examples of org.structr.web.entity.Linkable

    final SecurityContext securityContext = getWebSocket().getSecurityContext();
    String sourceId                       = webSocketData.getId();
    Map<String, Object> properties        = webSocketData.getNodeData();
    String targetId                       = (String) properties.get("targetId");
    final LinkSource sourceNode           = (LinkSource) getNode(sourceId);
    final Linkable targetNode             = (Linkable) getNode(targetId);

    if ((sourceNode != null) && (targetNode != null)) {

      try {
        sourceNode.setProperty(LinkSource.linkable, targetNode);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.