Examples of Formatter


Examples of org.jbpm.formapi.shared.api.Formatter

                labelValue.setWidth("200px");
                InputData data = new InputData();
                data.setName(input.getName());
                data.setValue(input.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
                    public Map<String, Object> getDataMap() {
                        return new HashMap<String, Object>();
                    }
                });
                labelValue.setInput(data);
                labelValue.setValue("{variable}");
                tableOfInputs.setElement(index, 1, labelValue);
            }
            LabelRepresentation labelInputs = new LabelRepresentation();
            labelInputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
            labelInputs.setEffectClasses(labelEffects);
            labelInputs.setValue("Inputs:");
            form.addFormItem(labelInputs);
            form.addFormItem(tableOfInputs);
        }
        List<TaskPropertyRef> outputs = task.getOutputs();
        if (outputs != null && !outputs.isEmpty()) {
            TableRepresentation tableOfOutputs = new TableRepresentation();
            tableOfOutputs.setRows(outputs.size());
            tableOfOutputs.setColumns(2);
            tableOfOutputs.setHeight("" + (outputs.size() * 30) + "px");
            tableOfOutputs.setEffectClasses(tableEffects);
            tableOfOutputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
            for (int index = 0; index < outputs.size(); index++) {
                TaskPropertyRef output = outputs.get(index);
                LabelRepresentation labelName = new LabelRepresentation();
                labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelName.setEffectClasses(labelEffects);
                labelName.setValue(output.getName());
                labelName.setWidth("100px");
                tableOfOutputs.setElement(index, 0, labelName);
                TextFieldRepresentation textField = new TextFieldRepresentation();
                textField.setEventActions(asMapOfNull(textfieldActions, FBScript.class));
                textField.setWidth("200px");
                textField.setEffectClasses(textfieldEffects);
                OutputData data = new OutputData();
                data.setName(output.getName());
                data.setValue(output.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
View Full Code Here

Examples of org.jzonic.jlo.formatter.Formatter

    }
   
    public LogConfiguration parseConfiguration(String name) throws ReaderException {
        LogConfiguration lc = new LogConfiguration("Test");
        Handler handler = new MockHandler("Test");
        Formatter simpleFormatter = new SimpleFormatter("Test");        
        LogGenerator lg = new LogGenerator("org.jzonic.jlo", handler, simpleFormatter);
        Logger logger = new Logger("org.jzonic.jlo", Target.parse("ALL"),"Test");
        logger.addLogGenerator(lg);
        lc.addLogger( logger );
        Logger seclogger = new Logger("org.jzonic", Target.parse("ALL,!INIT"),"Test");
View Full Code Here

Examples of org.jzonic.jlo.formatter.Formatter

        defaultChannel = channel;
    }
   
    private LogGenerator getDefaultLogGenerator() {
        Handler consoleHandler = new ConsoleHandler("Default");
        Formatter defaultFormatter = new DefaultFormatter("Default");
        LogGenerator lg = new LogGenerator("Default", consoleHandler, defaultFormatter);
        return lg;
    }
View Full Code Here

Examples of org.jzonic.jlo.formatter.Formatter

        lc = new LogConfiguration("Test");
    }
   
    public void testAddLogger() {
        Handler fileHandler = new MockHandler("Test");
        Formatter simpleFormatter = new SimpleFormatter("Test");       
        LogGenerator lg = new LogGenerator("TestGenerator", fileHandler, simpleFormatter);
        Logger logger = new Logger("org.jzonic.jlo", Target.parse("ALL"),"Default");
        logger.addLogGenerator(lg);
        lc.addLogger(logger);
        assertEquals(1,lc.getLoggerCount());
View Full Code Here

Examples of org.jzonic.jlo.formatter.Formatter

        assertNotNull(lc.getLogger("org.jzonic.jlo"));
    }
   
    public void testAddLogGenerator() {
        Handler fileHandler = new MockHandler("Test");
        Formatter simpleFormatter = new SimpleFormatter("Test");       
        LogGenerator lg = new LogGenerator("TestGenerator", fileHandler, simpleFormatter);       
        lc.addLogGenerator(lg);
        assertEquals(1,lc.getLogGeneratorCount());
    }
View Full Code Here

Examples of org.librebiz.pureport.run.Formatter

                    ReportContext context = new ReportContext();
                    context.define("items", items);
                    PdfGenerator.generatePdf(context, report, new File("out4.pdf"));
                    PageStore pageStore = new PageStore();
                    FontRenderContext frc = new FontRenderContext(null, true, true);
                    Formatter fmt = new Formatter(report, context, frc, pageStore);
                    long tm = System.currentTimeMillis();
                    tm = System.currentTimeMillis()-tm;
                    System.out.println("Time for formatting: " + tm + "ms");
                    PreviewDialog frame = new PreviewDialog(null, fmt, pageStore);
                    frame.setTitle("Print preview");
View Full Code Here

Examples of org.lilyproject.indexer.model.indexerconf.Formatter

        LRepository repository = indexUpdateBuilder.getRepository();
        if (valueDef.extractContent()) {
            return extractContent(table, indexValues, repository);
        }

        Formatter formatter = conf.getFormatters().getFormatter(valueDef.getFormatter());

        return formatter.format(indexValues, repository);
    }
View Full Code Here

Examples of org.olat.core.util.Formatter

  }


  private String getPlaintextContent(Locale locale) {
    Translator trans = Util.createPackageTranslator(SubscriptionInfo.class, locale);
    Formatter form = Formatter.getInstance(locale);
    StringBuilder sb = new StringBuilder();
    String datePart = trans.translate("subscription.listitem.dateprefix", new String [] { form.formatDateAndTime(date) } ) ;
    sb.append("- ");
    sb.append(description.trim());
    sb.append(" ").append(datePart.trim());
    if (StringHelper.containsNonWhitespace(link)) sb.append("\n").append("  ").append(link);
    return sb.toString();
View Full Code Here

Examples of org.opencustomer.framework.webapp.util.html.Formatter

       
        NodeList nodes = node.getChildNodes();
        for(int i=0; i<nodes.getLength(); i++) {
            if(nodes.item(i).getNodeType() == Node.ELEMENT_NODE) {
                if("format".equals(nodes.item(i).getNodeName())) {
                    Formatter format = parseFormat(nodes.item(i));
                    if(format == null) {
                        format = new DefaultFormatter();
                    }
                    property.setFormatter(format);
                } else if("search".equals(nodes.item(i).getNodeName())) {
View Full Code Here

Examples of org.openntf.formula.Formatter

        numParams--;
    }
    try {
      FormulaParser parser = Formulas.getParser();
      ASTNode ast = parser.parse(msgString, true);
      Formatter formatter = Formulas.getFormatter(loc);
      FormulaContext ctx = Formulas.createContext(map, formatter, parser);
      // ctx.useBooleans(false);
      for (int i = 0; i < numParams; i++)
        ctx.setParam(Integer.toString(i + 1), args[i]);
      List<?> resultList = ast.solve(ctx);
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.