Examples of Param


Examples of de.sciss.util.Param

        if( ggLockLen.isLocked() ) {
          n2  = n + span.getLength();
          if( n2 > doc.timeline.getLength() ) {
            n2  = doc.timeline.getLength();
            n  = n2 - span.getLength();
            ggTimelineStart.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n, n2 );
          ggTimelineStop.setValue( new Param( n2, ParamSpace.spcTimeSmps.unit ));
        } else {
          n2 = span.getStop();
          if( n > n2 ) {
            n = n2;
            ggTimelineStart.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n, n2 );
          ggTimelineLen.setValue( new Param( span.getLength(), ParamSpace.spcTimeSmps.unit ));
        }
      // ----- stop was adjusted -----
      } else if( e.getSource() == ggTimelineStop ) {
        if( ggLockLen.isLocked() ) {
          n2    = n - span.getLength();
          if( n2 < 0 ) {
            n2  = 0;
            n  = n2 + span.getLength();
            ggTimelineStop.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          if( n > doc.timeline.getLength() ) {
            n  = doc.timeline.getLength();
            n2  = n - span.getLength();
            ggTimelineStop.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n2, n );
          ggTimelineStart.setValue( new Param( n2, ParamSpace.spcTimeSmps.unit ));
        } else {
          n2    = span.getStart();
          if( n < n2 ) {
            n  = n2;
            ggTimelineStop.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          if( n > doc.timeline.getLength() ) {
            n  = doc.timeline.getLength();
            ggTimelineStop.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n2, n );
          ggTimelineLen.setValue( new Param( span.getLength(), ParamSpace.spcTimeSmps.unit ));
        }
      // ----- len was adjusted -----
      } else {
        if( ggLockStop.isLocked() ) {
          n2    = span.getStop() - n;
          if( n2 < 0 ) {
            n2  = 0;
            n  = span.getStop();
            ggTimelineLen.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n2, n2 + n );
          ggTimelineStart.setValue( new Param( n2, ParamSpace.spcTimeSmps.unit ));
        } else {
          n2    = span.getStart() + n;
          if( n2 > doc.timeline.getLength() ) {
            n2  = doc.timeline.getLength();
            n  = n2 - span.getStart();
            ggTimelineLen.setValue( new Param( n, ParamSpace.spcTimeSmps.unit ));
          }
          span  = new Span( n2 - n, n2 );
          ggTimelineStop.setValue( new Param( n2, ParamSpace.spcTimeSmps.unit ));
        }
      }
      doc.timeline.editSelect( this, span );
    }
  }
View Full Code Here

Examples of de.sciss.util.Param

   
  public void setFolderAndCapacity( File folder, int capacity )
  {
    super.setFolderAndCapacity( folder, capacity );
    prefs.put( KEY_FOLDER, folder.getPath() );
    prefs.put( KEY_CAPACITY, new Param( capacity, ParamSpace.NONE | ParamSpace.ABS ).toString() );
  }
View Full Code Here

Examples of de.sciss.util.Param

   
    instance    = this;
 
    this.prefs    = prefs;
   
    defaultPortParam = new Param( defaultPort, ParamSpace.NONE | ParamSpace.ABS );
   
    if( prefs.get( KEY_PORT, null ) == null ) {  // create defaults
      prefs.putBoolean( KEY_ACTIVE, false );
      prefs.put( KEY_PORT, defaultPortParam.toString() );
    }
View Full Code Here

Examples of eu.planets_project.ifr.core.wee.api.workflow.generated.WorkflowConf.Services.Service.Parameters.Param

        service.setEndpoint(sb.getServiceEndpoint());
       
        Parameters parameters = new Parameters();
        //3. iterate over all parameters that have been created/altered
        for(ServiceParameter param : sb.getServiceParameters()){
          Param parameter = new Param();
          parameter.setName(param.getName());
          parameter.setValue(param.getValue());
          parameters.getParam().add(parameter);
        }
        if(parameters.getParam().size()>0){
          //there needs to be a Parameter element only if there's a param for being xsd compliant
          service.setParameters(parameters);
View Full Code Here

Examples of greed.model.Param

        StringBuilder sb = new StringBuilder();
        sb.append("{    \n");
        sb.append("\"Abcde\"\n, \"12345\", \n\n\n");
        sb.append("\"Hello\"\n");
        sb.append(", \"world\"    }");
        String[] parsedValueList = trait.parseValue(sb.toString(), new Param("arg", Type.STRING_ARRAY_TYPE, 0)).getValueList();
        for (String pv : parsedValueList)
            System.out.println(pv);
        Assert.assertArrayEquals("Parsed value is " + Arrays.toString(parsedValueList), parsedValueList,
                new String[]{"\"Abcde\"", "\"12345\"", "\"Hello\"", "\"world\""});
    }
View Full Code Here

Examples of juzu.Param

              String path = (String)annotation.get("value");
              Integer priority = (Integer)annotation.get("priority");
              HashMap<String, ParamDescriptor> parameters = null;
              ExecutableElement exe = metaModel.processingContext.get(method.getMethod());
              for (VariableElement ve : exe.getParameters()) {
                Param param = ve.getAnnotation(Param.class);
                if (param != null) {
                  if (parameters == null) {
                    parameters = new HashMap<String, ParamDescriptor>();
                  }
                  String name = ve.getSimpleName().toString();
                  ParameterMetaModel a = method.parameterBy(name);
                  if (a instanceof PhaseParameterMetaModel) {
                    PhaseParameterMetaModel b = (PhaseParameterMetaModel)a;
                    String pattern = param.pattern().length() == 0 ? null : param.pattern();
                    parameters.put(b.getMappedName(), new ParamDescriptor(pattern,  param.preservePath(),  param.captureGroup()));
                  } else {
                    throw new UnsupportedOperationException("Handle me gracefully");
                  }
                }
              }
View Full Code Here

Examples of net.hasor.mvc.Param

    /**/
    protected Object resolveParam(Class<?> paramClass, Annotation pAnno, Call call) {
        if (pAnno instanceof Param == false) {
            return null;
        }
        Param param = (Param) pAnno;
        String paramName = param.value();
        return call.getParam(paramName);
    }
View Full Code Here

Examples of org.apache.commons.scxml.model.Param

            b.append(" srcexpr=\"").append(srcexpr).append("\"");
        }
        b.append(">\n");
        List params = i.params();
        for (Iterator iter = params.iterator(); iter.hasNext();) {
            Param p = (Param) iter.next();
            b.append(indent).append(INDENT).append("<param name=\"").
                append(p.getName()).append("\" expr=\"").
                append(p.getExpr()).append("\"/>\n");
        }
        Finalize f = i.getFinalize();
        if (f != null) {
            b.append(indent).append(INDENT).append("<finalize>\n");
            serializeActions(b, f.getActions(), indent + INDENT + INDENT);
View Full Code Here

Examples of org.apache.commons.scxml2.model.Param

     */
    private static void readParam(final XMLStreamReader reader, final Configuration configuration,
                                  final Invoke parent)
            throws XMLStreamException, ModelException {

        Param param = new Param();
        param.setName(readRequiredAV(reader, ELEM_PARAM, ATTR_NAME));
        param.setExpr(readAV(reader, ATTR_EXPR));
        readNamespaces(configuration, param);
        parent.addParam(param);
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.IriDecoderHelper.Param

       
        List<Param> p = IriDecoderHelper.decodeIri("http://host:8192/service/392/4?name=nodet",
                "http://host:8192/service/{id}/{nb}");
        assertNotNull(p);
        //assertEquals(3, p.size());
        assertEquals(new Param("id", "392"), p.get(0));
        assertEquals(new Param("nb", "4"), p.get(1));
        assertEquals(new Param("name", "nodet"), p.get(2));
    }
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.