Examples of Input


Examples of org.stjs.javascript.dom.Input

  public static void main(String[] args) {
    window.onload = new Callback1<DOMEvent>() {
      public void $invoke(DOMEvent ev) {
        Form form = window.document.forms.$get(0);
        Element button = form.elements.$get("say");
        final Input text = form.elements.$get("to");
        button.onclick = new Function1<DOMEvent, Boolean>() {
          public Boolean $invoke(DOMEvent ev) {
            alert("Hello me to " + text.value);
            return true;
          }
View Full Code Here

Examples of org.terasology.input.Input

    @In
    private InputSystem inputSystem;

    @Command(shortDescription = "Maps a key to a function")
    public String bindKey(@CommandParam("key") String key, @CommandParam("function") String bind) {
        Input keyInput = Keyboard.Key.find(key);
        if (keyInput != null) {
            inputSystem.linkBindButtonToKey(keyInput.getId(), new SimpleUri(bind));
            StringBuilder builder = new StringBuilder();
            builder.append("Mapped ").append(keyInput.getDisplayName()).append(" to action ");
            builder.append(bind);
            return builder.toString();
        }
        throw new IllegalArgumentException("Unknown key: " + key);
    }
View Full Code Here

Examples of org.useware.kernel.model.structure.Input

            );

        }
        else if("input".equals(name))
        {
            unit = new Input(id.getNamespaceURI(), id.getLocalPart(),
                    label);

        }
        else if("output".equals(name))
        {
View Full Code Here

Examples of org.wso2.carbon.business.messaging.paypal.mediator.Input

   * @return an instance of Input.
   */
  @SuppressWarnings("unchecked")
  private Input createInput(OMElement inputElement) {

    Input input = new Input();
    OMAttribute typeAttr = inputElement.getAttribute(ATTR_TYPE);
    if (null == typeAttr || null == typeAttr.getAttributeValue()) {
      input.setName(inputElement.getAttribute(ATTR_NAME)
          .getAttributeValue());
    } else {
      input.setType(typeAttr.getAttributeValue());
      for (Iterator<OMElement> itr = inputElement
          .getChildrenWithName(ELEM_INPUT); itr.hasNext();) {
        input.getSubInputs().add(createInput(itr.next()));
      }
    }

    return input;
  }
View Full Code Here

Examples of org.wso2.carbon.business.messaging.paypal.mediator.ui.Input

            String key = input.getName();
            if (null != parentType) {
                key = parentType + "_" + key;
            }
            if (inputsMap.containsKey(key)) {
                Input fetchedInput = inputsMap.get(key);
                input.setSourceValue(fetchedInput.getSourceValue());
                input.setSourceXPath(fetchedInput.getSourceXPath());
                System.out.println(key + "--> " + input.getName());
            }
        } else {
            for (Input subInput : input.getSubInputs()) {
                populateInput(subInput, input.getType());
View Full Code Here

Examples of org.wso2.carbon.cep.core.Input

*/
public class InputHelper {
    public static Input fromOM(OMElement inputElement)
            throws CEPConfigurationException {

        Input input = new Input();
        String topic = inputElement.getAttributeValue(new QName(CEPConstants.CEP_CONF_ELE_TOPIC));
        input.setTopic(topic);

        String brokerProxy =
                inputElement.getAttributeValue(new QName(CEPConstants.CEP_CONF_ELE_BROKER_NAME));
        input.setBrokerName(brokerProxy);

        OMElement mappingElement =
                inputElement.getFirstChildWithName(new QName(CEPConstants.CEP_CONF_NAMESPACE,
                        CEPConstants.CEP_CONF_ELE_MAPPING));

        if (mappingElement == null) {
            throw new CEPConfigurationException("no mapping element for topic " + topic);
        }

        input.setMapping(
                MappingHelper.fromOM(mappingElement));

        return input;
    }
View Full Code Here

Examples of org.wso2.carbon.mediator.transform.Input

        OMElement inputElement = omElement.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "input"));
        if (inputElement != null) {
            smooks.setInput(createInput(inputElement));
        } else {
            smooks.setInput(new Input());
        }

        OMElement outputElement = omElement.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "output"));
        if (inputElement != null) {
View Full Code Here

Examples of presage.Input

      // This line gets the agents datamodel
      // Just trust me on that one :P
      final PublicAgentDataModel am = ((AbstractAgent)sim.getPlayer(actorID)).getDataModel();
      if (am.getHuntingTeam() == null)
      {
        Input result;
        if (food.getHuntersRequired() <= 1)
        {
          result = new HuntResult(actorID, food.getNutrition(),
                  food.getNutrition(), dmodel.getTime());
        }
View Full Code Here

Examples of puppyeyes.engine.Settings.Input

        public void run(){
         
          gameWindow.getContentPane().remove(level);
          GameWindow.level=level;
          gameWindow.getContentPane().add(level, BorderLayout.CENTER);
              new Input(level);
              level.requestFocusInWindow(); //Make the level be what gets events
        }
      });
    } catch (InvocationTargetException | InterruptedException e1) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of se.rupy.http.Input

  public static Item save(Event event, Item item) throws Event, IOException {
    String type = event.query().header("content-type");
    String boundary = "--" + unquote(type.substring(type.indexOf("boundary=") + 9));

    Input in = event.input();
    String line = in.line();

    while(line != null) {
      /*
       * find boundary
       */

      if(line.equals(boundary + "--")) {
        Sprout.redirect(event, "/");
      }

      if(line.equals(boundary)) {
        line = in.line();

        /*
         * read headers; parse filename and content-type
         */

        while(line != null && !line.equals("")) {
          int colon = line.indexOf(":");

          if (colon > -1) {
            String name = line.substring(0, colon).toLowerCase();
            String value = line.substring(colon + 1).trim();

            if(name.equals("content-disposition")) {
              item.name = unpath(unquote(value.substring(value.indexOf("filename=") + 9).trim()));
            }

            if(name.equals("content-type")) {
              item.type = value;
            }
          }

          line = in.line();
        }

        if(item.name == null || item.name.length() == 0) {
          Sprout.redirect(event, "/");
        }

        /*
         * create path and file
         */

        java.io.File path = new java.io.File(Sprout.ROOT + "/" + item.path);

        if(!path.exists()) {
          path.mkdirs();
        }

        item.file = new java.io.File(Sprout.ROOT + "/" + item.path + "/" + item.name);
        FileOutputStream out = new FileOutputStream(item.file);

        /*
         * stream data
         */

        Boundary bound = new Boundary();
        bound.value = ("\r\n" + boundary).getBytes();

        byte[] data = new byte[SIZE];
        int read = in.read(data);

        while(read > -1) {
          try {
            out.write(data, 0, bound.find(read, data, out));
          }
          catch(Boundary.EOB eob) {
            out.write(data, 0, eob.index);
            out.flush();
            out.close();

            // only handles one file for now,
            // need to rewind the stream for
            // multiple files.
            return item;
          }

          read = in.read(data);
        }

        throw new IOException("Boundary not found. (trailing)");
      }

      line = in.line();
    }

    throw new IOException("Boundary not found. (initing)");
  }
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.