Examples of Binding


Examples of com.xmlcalabash.model.Binding

        Hashtable<QName,RuntimeValue> globals = inScopeOptions;
        XdmNode doc = null;

        try {
            if (var.getBinding().size() > 0) {
                Binding binding = var.getBinding().firstElement();

                ReadablePipe pipe = null;
                if (binding.getBindingType() == Binding.ERROR_BINDING) {
                    pipe = ((XCatch) this).errorPipe;
                } else {
                    pipe = getPipeFromBinding(binding);
                }
                doc = pipe.read();
View Full Code Here

Examples of darkyenus.dipt.binding.Binding

public class bind implements Command{

    @Override
    public String execute(Reference reference, String[] arguments) {
        try {
            Binding binding = null;
            if(arguments[0].equalsIgnoreCase("key") || arguments[0].equalsIgnoreCase("+key")){
                final int identifier = Integer.parseInt(arguments[1]);
                binding = new Binding(reference,arguments[2]) {

                    boolean keyPressed = false;

                    @Override
                    public boolean isValid(BindManager.InputSnapshot snapshot) {
                        if(snapshot.isKeyPressed(identifier)){
                            if(!keyPressed){
                                keyPressed = true;
                                return true;
                            }
                        }else{
                            keyPressed = false;
                        }
                        return false;
                    }
                };
            }else if(arguments[0].equalsIgnoreCase("-key")){
                final int identifier = Integer.parseInt(arguments[1]);
                binding = new Binding(reference,arguments[2]) {

                    boolean keyPressed = false;

                    @Override
                    public boolean isValid(BindManager.InputSnapshot snapshot) {
                        if(!snapshot.isKeyPressed(identifier)){
                            if(keyPressed){
                                keyPressed = false;
                                return true;
                            }
                        }else{
                            keyPressed = true;
                        }
                        return false;
                    }
                };
            }else if(arguments[0].equalsIgnoreCase("mouse") || arguments[0].equalsIgnoreCase("+mouse")){
                final int identifier = Integer.parseInt(arguments[1]);
                binding = new Binding(reference,arguments[2]) {

                    boolean buttonPressed = false;

                    @Override
                    public boolean isValid(BindManager.InputSnapshot snapshot) {
                        if(snapshot.isMouseButtonPressed(identifier)){
                            if(!buttonPressed){
                                buttonPressed = true;
                                return true;
                            }
                        }
                        return false;
                    }
                };
            }else if(arguments[0].equalsIgnoreCase("-mouse")){
                final int identifier = Integer.parseInt(arguments[1]);
                binding = new Binding(reference,arguments[2]) {

                    boolean buttonPressed = false;

                    @Override
                    public boolean isValid(BindManager.InputSnapshot snapshot) {
                        if(!snapshot.isMouseButtonPressed(identifier)){
                            if(buttonPressed){
                                buttonPressed = false;
                                return true;
                            }
                        }else{
                            buttonPressed = true;
                        }
                        return false;
                    }
                };
            }else if(arguments[0].equalsIgnoreCase("wheel")){
                final boolean positiveTrigger = "+".equals(arguments[1]);
                final boolean negativeTrigger = "-".equals(arguments[1]);
                int exactValueTemp = 0;
                if(!positiveTrigger && !negativeTrigger){
                    exactValueTemp = Integer.parseInt(arguments[1]);
                }
                final int exactValue = exactValueTemp;

                binding = new Binding(reference,arguments[2]) {

                    @Override
                    public boolean isValid(BindManager.InputSnapshot snapshot) {
                        if(snapshot.isWheelEvent()){
                            if(positiveTrigger){
View Full Code Here

Examples of edu.cmu.cs.fusion.Binding

  public void testFindLabelsOneOption() {
    FusionEnvironment<?> env = new FusionEnvironment<TestAliasContext>(aliases, null, null, testH, new InferenceEnvironment(null), Variant.PRAGMATIC_VARIANT);
    FreeVars fv = new FreeVars().addVar(new SpecVar("a"), "Foo").addVar(new SpecVar("b"), "Bar");
    ConsList<Binding> list = ConsList.empty();
   
    list = ConsList.cons(new Binding(new SpecVar("a"), vars[0]), list);
    list = ConsList.cons(new Binding(new SpecVar("b"), vars[1]), list);
   
    List<Substitution> subs = env.findLabels(list, fv);
   
    assertEquals(1, subs.size());
   
View Full Code Here

Examples of edu.cmu.relativelayout.Binding

    bf = new BindingFactory(10, 10, 10, 10, 10, 10);
    dim = Toolkit.getDefaultToolkit().getScreenSize();
  }

  public void initializeLayout() {
    Binding leftEdge = bf.leftEdge();
    Binding topEdge = bf.topEdge();
    Binding aboveInputField = bf.above(inputField);

    // PAINT CANVAS
    // paintCanvas properties
    paintCanvas.setBorder(BorderFactory.createLineBorder(new Color(161,
        112, 23), 3));
    paintCanvas.setSize(200, 500);
    paintCanvas.setBackground(new Color(204, 204, 204));
    // paintCanvas.setCursor(Cursor.getPredefinedCursor(Cursor.));

    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Image image = toolkit.getImage("images/Brush.png");
    Cursor c = toolkit.createCustomCursor(image,
        new Point(paintCanvas.getX(), paintCanvas.getY()), "img");
    paintCanvas.setCursor(c);

    paintCanvas.addMouseMotionListener(new MouseMotionListener() {

      @Override
      public void mouseMoved(MouseEvent arg0) {
      }

      @Override
      public void mouseDragged(MouseEvent e) {
        x2 = e.getX();
        y2 = e.getY();

        try {
          serverObj.setPoints(roomNo, x1, y1, x2, y2);
        } catch (RemoteException e1) {
          e1.printStackTrace();
        }

        x1 = e.getX();
        y1 = e.getY();
      }
    });

    paintCanvas.addMouseListener(new MouseListener() {

      @Override
      public void mouseReleased(MouseEvent e) {
      }

      @Override
      public void mousePressed(MouseEvent e) {
        x1 = e.getX();
        y1 = e.getY();
      }

      @Override
      public void mouseExited(MouseEvent e) {
      }

      @Override
      public void mouseEntered(MouseEvent e) {
      }

      @Override
      public void mouseClicked(MouseEvent e) {
      }
    });

    Binding leftOfUserList = bf.leftOf(userList);
    paintCanvasConstraints = new RelativeConstraints(leftEdge,
        leftOfUserList, topEdge, aboveInputField);

    // User List
    userList.setBackground(new Color(102, 255, 153));
    userList.setPreferredSize(new Dimension(200, userList.getHeight()));
    users.setEditable(false);
    Binding rightEdge = bf.rightEdge();
    userListConstraints = new RelativeConstraints(topEdge, rightEdge,
        aboveInputField);

    // Input Field
    inputField.setEnabled(true);
    inputField.setVisible(true);
    inputField.setPreferredSize(new Dimension(700, 30));
    Binding bottomEdge = bf.bottomEdge();
    Binding leftOfSendButton = bf.leftOf(sendButton);
    Binding aboveChatPane = bf.above(chatPane);
    inputFieldConstraints = new RelativeConstraints(leftEdge,
        aboveChatPane, leftOfSendButton);

    // Send Button
    sendButton.setEnabled(true);
    sendButton.addActionListener(this);
    sendButton.setPreferredSize(new Dimension(150, 30));
    Binding ver = bf.verticallyCenterAlignedWith(inputField);
    sendButtonConstrains = new RelativeConstraints(rightEdge, ver);
    chatPane.setBackground(new Color(255, 255, 153));
    chatPane.setPreferredSize(new Dimension(1000, 100));
    chatPaneConstraints = new RelativeConstraints(leftEdge, bottomEdge,
        rightEdge);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.bcp.Binding

        CFG cfg = classContext.getCFG(method);


        // Get the variable referenced in the pattern instance.
        BindingSet bindingSet = match.getBindingSet();
        Binding binding = bindingSet.lookup("f");

        // Look up the field as an XField.
        // If it is volatile, then the instance is not a bug.
        FieldVariable field = (FieldVariable) binding.getVariable();
        XField xfield = Hierarchy.findXField(field.getClassName(), field.getFieldName(), field.getFieldSig(),
                field.isStatic());
        if (!xfield.isResolved()) {
            return;
        }
View Full Code Here

Examples of fit.Binding

      // next evaluate output params
      for (int column = 0; column < accessors.length; column++, cell = cell.more) {
        int direction = accessors[column].getDirection();
        if (direction == DbParameterAccessor.OUTPUT || direction == DbParameterAccessor.RETURN_VALUE
            || direction == DbParameterAccessor.SEQUENCE) {
          Binding binding = columnBindings[column];
          if (binding instanceof SymbolAccessQueryBinding) {
            String keyName = accessors[column].getName();
            ((SymbolAccessQueryBinding) binding).doCell(this, cell, keyName, rowNum);
          } else {
            columnBindings[column].doCell(this, cell);
View Full Code Here

Examples of groovy.lang.Binding

        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

        final Console console = new Console(Console.class.getClassLoader());
        console.setBeforeExecution(new Closure(null) {
          public void doCall() {
            console.setShell(new GroovyShell(Console.class.getClassLoader(), new Binding()) {
              public Object run(String scriptText, String fileName, String[] args) throws org.codehaus.groovy.control.CompilationFailedException {
                return super.run(IMPORTS + scriptText, fileName, args);
              };
            });
          }
View Full Code Here

Examples of javax.naming.Binding

    Binding[] res = new Binding[records.size()];
    for (int i = 0; i < records.size(); i++) {
      Record r = (Record)records.elementAt(i);
      if (r instanceof ObjectRecord) {
        ObjectRecord or = (ObjectRecord)r;       
        res[i] = new Binding(
          or.getName(),
          getClassName(or.getObject()),
          or.getObject(),
          true);
      } else if (r instanceof ContextRecord) {
        res[i] = new Binding(
          r.getName(),
          Context.class.getName(),
          null,
          true);
      }
View Full Code Here

Examples of javax.wsdl.Binding

        Service service = definition.getService(new QName(namespace, name));
        assertNotNull(service);
        assertEquals(namespace, service.getQName().getNamespaceURI());
        // The service name should be equal to th
        assertEquals(name, service.getQName().getLocalPart());
        Binding binding = definition.getBinding(new QName(namespace, "EchoServiceHttpBinding"));
        assertNotNull(binding);
        SOAPBinding soapBinding = (SOAPBinding) binding.getExtensibilityElements().get(0);
        assertNotNull(soapBinding);
        assertEquals(SoapConstants.STYLE_DOCUMENT, soapBinding.getStyle());
    }
View Full Code Here

Examples of javax.xml.ws.Binding

        ClientBinding clientBinding = factory.createClientBinding(address);
        assertNotNull(clientBinding);
        assertTrue(SOAPClientBinding.class.isInstance(clientBinding));
       
        SOAPClientBinding soapClientBinding = (SOAPClientBinding)clientBinding;
        Binding b = soapClientBinding.getBinding();
        assertNotNull(b);
        assertTrue(SOAPBindingImpl.class.isInstance(b));
              
        bus.shutdown(true);      
    }
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.