Examples of AttributeMap


Examples of org.jfree.layouting.util.AttributeMap

        if (linkTarget == null)
        {
            return;
        }

        final AttributeMap image = new AttributeMap();
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.NAMESPACE_ATTRIBUTE, JFreeReportInfo.REPORT_NAMESPACE);
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.TYPE_ATTRIBUTE, OfficeToken.IMAGE);
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, OfficeToken.SCALE, String.valueOf(scale));
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, OfficeToken.PRESERVE_IRI, String.valueOf(preserveIri));
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "image-context", createContext());
        image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, OfficeToken.IMAGE_DATA, linkTarget);
        target.startElement(image);
        target.endElement(image);
    }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

    {
        final ObjectOleElement element = (ObjectOleElement) getNode();
        final String url = element.getUrl();
        if (url != null)
        {
            final AttributeMap ole = new AttributeMap();
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.NAMESPACE_ATTRIBUTE, JFreeReportInfo.REPORT_NAMESPACE);
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.TYPE_ATTRIBUTE, OfficeToken.OBJECT_OLE);
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "href", url);
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "class-id", element.getClassid());
            final List masterfields = element.getMasterfields();
            final List values = new ArrayList();
            final DataRow view = getFlowController().getMasterRow().getGlobalView();
            for (final Iterator iter = masterfields.iterator(); iter.hasNext();)
            {
                final String master = (String) iter.next();
                try
                {
                    final DataFlags flags = view.getFlags(master);
                    if (flags != null)
                    {
                        values.add(flags.getValue());
                    }
                }
                catch (DataSourceException e)
                {
                // ignore .. assume that the reference has not changed.
                }
            }
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_COLUMNS, masterfields);
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_VALUES, values);
            ole.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.DETAIL_COLUMNS, element.getDetailfields());

            target.startElement(ole);
            target.endElement(ole);
        }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

      return vlc;
    }


    final Element node = (Element) getNode();
    final AttributeMap vdSection = node.getAttributeMap();
    target.startElement(vdSection);

    final FormattedTextElement[] variables = collection.getVariables();
    for (int i = 0; i < variables.length; i++)
    {
      final FormattedTextElement variable = variables[i];
      final String varName = collection.getNamePrefix() + (i + 1);
      final AttributeMap map = generateVariableSetSection(variable);
      map.setAttribute(OfficeNamespaces.TEXT_NS, "name", varName);
      target.startElement(map);
      target.endElement(map);

    }
    target.endElement(vdSection);
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

  }

  private AttributeMap generateVariableSetSection(final FormattedTextElement variable)
      throws DataSourceException
  {
    final AttributeMap variableSection = new AttributeMap();
    variableSection.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
    variableSection.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.TYPE_ATTRIBUTE, "variable-set");
    variableSection.setAttribute(OfficeNamespaces.TEXT_NS, "display", "none");

    final FormulaExpression valueExpression = variable.getValueExpression();
    final Object value = LayoutControllerUtil.evaluateExpression(getFlowController(), variable, valueExpression);
    String formula = FormatValueUtility.applyValueForVariable(value, variableSection);
    if ( formula == null )
        formula = "" + value;
    if (value instanceof Date)
    {
        final Date date = (Date)value;
        final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy;MM;dd");
        formula = "Date(" + dateFormat.format(date) + ")";
    }
    variableSection.setAttribute(OfficeNamespaces.TEXT_NS, "formula", "ooow:" + formula);
    return variableSection;
  }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

  }

  protected AttributeMap computeAttributes(final FlowController fc, final Element element, final ReportTarget target)
      throws DataSourceException
  {
    final AttributeMap map = new AttributeMap( super.computeAttributes(fc, element, target) );
    map.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "iteration-count", new Integer(getIterationCount()));
    map.makeReadOnly();
    return map;
  }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

  {
  }

  protected AttributeMap computeAttributes(final FlowController flowController, final Element element, final ReportTarget reportTarget) throws DataSourceException
  {
    final AttributeMap map = super.computeAttributes(flowController, element, reportTarget);
    map.setAttribute(OfficeNamespaces.INTERNAL_NS, "role", "spreadsheet-section");
    return map;
  }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

    final FormattedTextElement element = (FormattedTextElement) getNode();
    final VariablesCollection vc = getVariablesCollection();
    if (vc != null)
    {
      final String name = vc.addVariable(element);
      final AttributeMap variablesGet = new AttributeMap();
      variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
          Element.TYPE_ATTRIBUTE, "variable-get");
      variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
          Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
      variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name);
      //variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "display", "value");
     
      final String dataStyleName = computeValueStyle();
      if (dataStyleName != null)
      {
        variablesGet.setAttribute(OfficeNamespaces.STYLE_NS, "data-style-name", dataStyleName);
      }

      final String valueType = computeValueType();
      variablesGet.setAttribute(OfficeNamespaces.OFFICE_NS, "value-type", valueType);
      target.startElement(variablesGet);

      target.endElement(variablesGet);
    }
    else
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

  }

  protected AttributeMap computeAttributes(final FlowController fc, final Element element, final ReportTarget target)
      throws DataSourceException
  {
    final AttributeMap map = super.computeAttributes(fc, element, target);
    map.setAttribute(OfficeNamespaces.INTERNAL_NS, "iteration-count", new Integer(getIterationCount()));
    return map;
  }
View Full Code Here

Examples of org.jfree.layouting.util.AttributeMap

    if (linkTarget == null)
    {
      return;
    }

    final AttributeMap image = new AttributeMap();
    image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.INTERNAL_NS);
    image.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, Element.TYPE_ATTRIBUTE, "image");
    image.setAttribute(OfficeNamespaces.INTERNAL_NS, "scale", String.valueOf(scale));
    image.setAttribute(OfficeNamespaces.INTERNAL_NS, "preserve-IRI", String.valueOf(preserveIri));
    image.setAttribute(OfficeNamespaces.INTERNAL_NS, "image-context", createContext());
    image.setAttribute(OfficeNamespaces.INTERNAL_NS, "image-data", linkTarget);
    target.startElement(image);
    target.endElement(image);
  }
View Full Code Here

Examples of org.jgraph.graph.AttributeMap

    cell.add(new DefaultPort());
    return cell;
  }

  private AttributeMap getEdgeAttributes(DefaultEdge edge) {
    AttributeMap eMap = new AttributeMap();
    GraphConstants.setLineEnd(eMap, GraphConstants.ARROW_TECHNICAL);
    GraphConstants.setEndFill(eMap, true);
    GraphConstants.setEndSize(eMap, 10);
    GraphConstants.setForeground(eMap, Color.decode("#25507C"));
    GraphConstants.setFont(eMap,
        GraphConstants.DEFAULTFONT.deriveFont(Font.BOLD, 12));
    GraphConstants.setLineColor(eMap, Color.decode("#7AA1E6"));
    AttributeMap map = new AttributeMap();
    map.put(edge, eMap);
    return map;
  }
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.