Examples of ParameterContext


Examples of com.pcmsolutions.device.EMU.E4.parameter.ParameterContext

        }
    };
*/
    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(cp.getEditableParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
View Full Code Here

Examples of com.pcmsolutions.device.EMU.E4.parameter.ParameterContext

        makeVoicePanel(expansionMemory);
        voicePanel.addComponentListener(this);
    }

    private JList makeVoiceIdSelectionList(List userIds) throws ZDeviceNotRunningException, IllegalParameterIdException {
        ParameterContext vc = preset.getDeviceParameterContext().getVoiceContext();
        Set ids = vc.getIds();
        List dispList = new ArrayList();
        for (Iterator i = ids.iterator(); i.hasNext();) {
            Object next = i.next();
            int idv = ((Integer) next).intValue();
            if ((idv < 37 || idv > 56) && idv != 85 && idv != 86)
                dispList.add(next);
        }

        for (int i = 0,j = dispList.size(); i < j; i++)
            dispList.set(i, vc.getParameterDescriptor((Integer) dispList.get(i)));

        JList vidsl = new JList(dispList.toArray());
        for (int i = 0,j = dispList.size(); i < j; i++)
            if (userIds.contains(dispList.get(i)))
                vidsl.addSelectionInterval(i, i);
View Full Code Here

Examples of com.pcmsolutions.device.EMU.E4.parameter.ParameterContext

        makeGlobalPanel();
        globalPanel.addComponentListener(this);
    }

    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        globalTables = new PresetParameterTable[cats.size()];
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }

        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(preset.getParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
View Full Code Here

Examples of com.pholser.junit.quickcheck.internal.ParameterContext

            .thenReturn(0);
        when(constraint.value()).thenReturn("#_ > 0");
    }

    @Test public void whenDiscardRatioExceededEvenWithSomeSuccesses() {
        ParameterContext parameter = new ParameterContext(int.class);
        parameter.addQuantifier(quantifier);
        parameter.addConstraint(constraint);

        GenerationContext generation =
            new GenerationContext(parameter, new GeneratorRepository(random).register(generator));

        thrown.expect(GenerationContext.DiscardRatioExceededException.class);
        thrown.expectMessage(String.format(
            GenerationContext.DiscardRatioExceededException.MESSAGE_TEMPLATE,
            parameter.discardRatio(),
            30,
            10,
            3D));

        while (generation.shouldContinue())
View Full Code Here

Examples of com.pholser.junit.quickcheck.internal.ParameterContext

        Object[] args = new Object[parameterTypes.length];

        for (int i = 0; i < args.length; ++i) {
            AnnotatedConstructorParameter ctorParameter = new AnnotatedConstructorParameter(parameterAnnotations[i]);
            ParameterContext parameter = new ParameterContext(parameterTypes[i]).annotate(ctorParameter);
            args[i] = generatorFor(parameter).generate(random, status);
        }

        return args;
    }
View Full Code Here

Examples of com.pholser.junit.quickcheck.internal.ParameterContext

            repository.register(auxiliarySource);

        RandomTheoryParameterGenerator generator =
            new RandomTheoryParameterGenerator(randomForParameterGenerator, repository);

        ParameterContext context = new ParameterContext(parameterType());
        context.addQuantifier(quantifier);
        context.addConstraint(constraint);
        if (explicitGenerators.value() != null)
            context.addGenerators(explicitGenerators);
        for (Map.Entry<Class<? extends Annotation>, Annotation> each : configurations().entrySet())
            context.addConfiguration(each.getKey(), each.getValue());

        theoryParameters = generator.generate(context);
    }
View Full Code Here

Examples of com.pholser.junit.quickcheck.internal.ParameterContext

    @Override public T generate(SourceOfRandomness random, GenerationStatus status) {
        Class<T> type = types().get(0);
        Object generated = Reflection.instantiate(type);

        for (Field each : allDeclaredFieldsOf(type)) {
            ParameterContext parameter = new ParameterContext(each.getGenericType()).annotate(each);
            setField(each, generated, generatorFor(parameter).generate(random, status), true);
        }

        return type.cast(generated);
    }
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.param.ParameterContext

  }

  private void changeParameters(Map<Integer, Object> changedParameters) {
    for (Map.Entry<Integer, Object> entry : changedParameters.entrySet()) {
      // ע�⣺SQL�����DZ߰󶨲�����0��ʼ�����������Ҫ��1��
      ParameterContext context = parameterSettings.get(entry.getKey() + 1);
      if (context.getParameterMethod() != ParameterMethod.setNull1
          && context.getParameterMethod() != ParameterMethod.setNull2) {
        context.getArgs()[1] = entry.getValue();
      }
    }
  }
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.param.ParameterContext

  public ParameterMetaData getParameterMetaData() throws SQLException {
    throw new UnsupportedOperationException("getParameterMetaData");
  }

  public void setArray(int i, Array x) throws SQLException {
    parameterSettings.put(i, new ParameterContext(ParameterMethod.setArray, new Object[] {i, x}));
  }
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.param.ParameterContext

  public void setArray(int i, Array x) throws SQLException {
    parameterSettings.put(i, new ParameterContext(ParameterMethod.setArray, new Object[] {i, x}));
  }

  public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
    parameterSettings.put(parameterIndex, new ParameterContext(ParameterMethod.setAsciiStream, new Object[] {parameterIndex, x, length}));
  }
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.