Examples of StyleSheet


Examples of org.graphstream.ui.graphicGraph.stylesheet.StyleSheet

  protected void outputStyle(String styleSheet) {
    String style = null;

    if (styleSheet != null) {
      StyleSheet ssheet = new StyleSheet();

      try {
        if (styleSheet.startsWith("url(")) {
          styleSheet = styleSheet.substring(5);

          int pos = styleSheet.lastIndexOf(')');

          styleSheet = styleSheet.substring(0, pos);

          ssheet.parseFromFile(styleSheet);
        } else {
          ssheet.parseFromString(styleSheet);
        }

        style = styleSheetToSVG(ssheet);
      } catch (IOException e) {
        e.printStackTrace();
View Full Code Here

Examples of org.jfree.layouting.input.style.StyleSheet

      {
        final JFreeReport realReport = (JFreeReport) report;
        final int size = realReport.getStyleSheetCount();
        for (int i = 0; i < size; i++)
        {
          final StyleSheet styleSheet = realReport.getStyleSheet(i);
          feed.startMetaNode();
          feed.setMetaNodeAttribute("type", "style");
          feed.setMetaNodeAttribute("#content", styleSheet);
          feed.endMetaNode();
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

    if (box.getStaticBoxLayoutProperties().isVisible() == false)
    {
      return false;
    }

    final StyleSheet styleSheet = box.getStyleSheet();
    final Color textColor = (Color) styleSheet.getStyleProperty(ElementStyleKeys.PAINT);
    final String fontName = (String) styleSheet.getStyleProperty(TextStyleKeys.FONT);
    final short fontSize = (short) styleSheet.getIntStyleProperty(TextStyleKeys.FONTSIZE, 0);
    final boolean bold = styleSheet.getBooleanStyleProperty(TextStyleKeys.BOLD);
    final boolean italic = styleSheet.getBooleanStyleProperty(TextStyleKeys.ITALIC);
    final boolean underline = styleSheet.getBooleanStyleProperty(TextStyleKeys.UNDERLINED);
    final boolean strikethrough = styleSheet.getBooleanStyleProperty(TextStyleKeys.STRIKETHROUGH);
    final HSSFFontWrapper wrapper = new HSSFFontWrapper
        (fontName, fontSize, bold, italic, underline, strikethrough, colorProducer.getNearestColor(textColor));
    final RichTextFormat rtf = new RichTextFormat(getTextLength(), wrapper);

    // Check the style.
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

    if (box.getBoxDefinition().getBorder().isEmpty() == false)
    {
      return MARKER_DEFINITION;
    }

    final StyleSheet styleSheet = box.getStyleSheet();
    if (styleSheet.getStyleProperty(ElementStyleKeys.BACKGROUND_COLOR) != null)
    {
      return MARKER_DEFINITION;
    }

    if (styleSheet.getStyleProperty(ElementStyleKeys.ANCHOR_NAME) != null)
    {
      return MARKER_DEFINITION;
    }
    return null;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

    {
      return null;
    }
    final RenderableReplacedContentBox contentBox = (RenderableReplacedContentBox) box;

    final StyleSheet styleSheet = box.getStyleSheet();
    final RenderableReplacedContent rpc = contentBox.getContent();
    final Object rawContentObject = rpc.getRawObject();
    if (rawContentObject instanceof DrawableWrapper == false)
    {
      return null;
    }
    final DrawableWrapper wrapper = (DrawableWrapper) rawContentObject;
    final Object rawbackend = wrapper.getBackend();
    if (rawbackend instanceof ShapeDrawable == false)
    {
      return null;
    }
    final ShapeDrawable drawable = (ShapeDrawable) rawbackend;
    final Shape rawObject = drawable.getShape();

    final boolean draw = styleSheet.getBooleanStyleProperty(ElementStyleKeys.DRAW_SHAPE);
    if (draw && rawObject instanceof Line2D)
    {
      final int lineType;
      final long coordinate;
      final Line2D line = (Line2D) rawObject;

      final boolean vertical = line.getX1() == line.getX2();
      final boolean horizontal = line.getY1() == line.getY2();
      if (vertical && horizontal)
      {
        return null;
      }
      if (vertical)
      {
        lineType = SheetLayoutTableCellDefinition.LINE_HINT_VERTICAL;
        coordinate = StrictGeomUtility.toInternalValue(line.getX1()) + box.getX();
      }
      else if (horizontal)
      {
        lineType = SheetLayoutTableCellDefinition.LINE_HINT_HORIZONTAL;
        coordinate = StrictGeomUtility.toInternalValue(line.getY1()) + box.getY() + shift;
      }
      else
      {
        return null;
      }

      return new SheetLayoutTableCellDefinition(lineType, coordinate);
    }

    if (rawObject instanceof Rectangle2D ||
        (ellipseAsRectangle && rawObject instanceof Ellipse2D))
    {
      if (draw)
      {
        final BorderEdge edge = ProcessUtility.produceBorderEdge(box.getStyleSheet());
        if (edge != null)
        {
          return MARKER_DEFINITION;
        }
      }
      if (styleSheet.getBooleanStyleProperty(ElementStyleKeys.FILL_SHAPE))
      {
        return MARKER_DEFINITION;
      }

      return null;
    }

    if (rawObject instanceof RoundRectangle2D)
    {
      if (draw)
      {
        // the beast has a border ..
        final BorderEdge edge = ProcessUtility.produceBorderEdge(box.getStyleSheet());
        if (edge != null)
        {
          return MARKER_DEFINITION;
        }
      }
      if (styleSheet.getBooleanStyleProperty(ElementStyleKeys.FILL_SHAPE))
      {
        return MARKER_DEFINITION;
      }

      return null;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

      if (rawContent != null)
      {
        xmlWriter.writeText(String.valueOf(rawContent));
      }

      final StyleSheet styleSheet = box.getStyleSheet();
      final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
      if (target != null)
      {
        final String window = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_WINDOW);
        final AttributeList linkAttr = new AttributeList();
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, HREF_ATTR, target);
        if (window != null && StringUtils.startsWithIgnoreCase(target, "javascript:") == false)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TARGET_ATTR, normalizeWindow(window));
        }
        final String title = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TITLE);
        if (title != null)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TITLE_ATTR, title);
        }
        xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, linkAttr, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

    if (box.getStaticBoxLayoutProperties().isVisible() == false)
    {
      return;
    }

    final StyleSheet styleSheet = box.getStyleSheet();
    final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
    if (target != null)
    {
      final String window = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_WINDOW);
      final AttributeList linkAttr = new AttributeList();
      linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, HREF_ATTR, target);
      if (window != null && StringUtils.startsWithIgnoreCase(target, "javascript:") == false)
      {
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TARGET_ATTR, normalizeWindow(window));
      }
      final String title = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TITLE);
      if (title != null)
      {
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TITLE_ATTR, title);
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

      if (rawContent != null)
      {
        xmlWriter.writeText(String.valueOf(rawContent));
      }

      final StyleSheet styleSheet = box.getStyleSheet();
      if (firstElement != box)
      {
        final String anchor = (String) styleSheet.getStyleProperty(ElementStyleKeys.ANCHOR_NAME);
        if (anchor != null)
        {
          xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, "name", anchor, XmlWriterSupport.CLOSE);
        }
      }
      final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
      if (target != null)
      {
        final String window = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_WINDOW);
        final AttributeList linkAttr = new AttributeList();
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, HREF_ATTR, target);
        if (window != null && StringUtils.startsWithIgnoreCase(target, "javascript:") == false)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TARGET_ATTR, normalizeWindow(window));
        }
        final String title = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TITLE);
        if (title != null)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TITLE_ATTR, title);
        }
        xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, linkAttr, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

      if (rawContent != null)
      {
        xmlWriter.writeText(String.valueOf(rawContent));
      }

      final StyleSheet styleSheet = box.getStyleSheet();
      if (firstElement != box)
      {
        final String anchor = (String) styleSheet.getStyleProperty(ElementStyleKeys.ANCHOR_NAME);
        if (anchor != null)
        {
          xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, "name", anchor, XmlWriterSupport.CLOSE);
        }
      }

      final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
      if (target != null)
      {
        final String window = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_WINDOW);
        final AttributeList linkAttr = new AttributeList();
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, HREF_ATTR, target);
        if (window != null && StringUtils.startsWithIgnoreCase(target, "javascript:") == false)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TARGET_ATTR, normalizeWindow(window));
        }
        final String title = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TITLE);
        if (title != null)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TITLE_ATTR, title);
        }
        xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, linkAttr, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.StyleSheet

      if (rawContent != null)
      {
        xmlWriter.writeText(String.valueOf(rawContent));
      }

      final StyleSheet styleSheet = box.getStyleSheet();
      if (firstElement != box)
      {
        final String anchor = (String) styleSheet.getStyleProperty(ElementStyleKeys.ANCHOR_NAME);
        if (anchor != null)
        {
          xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, "name", anchor, XmlWriterSupport.CLOSE);
        }
      }

      final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
      if (target != null)
      {
        final String window = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_WINDOW);
        final AttributeList linkAttr = new AttributeList();
        linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, HREF_ATTR, target);
        if (window != null && StringUtils.startsWithIgnoreCase(target, "javascript:") == false)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TARGET_ATTR, normalizeWindow(window));
        }
        final String title = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TITLE);
        if (title != null)
        {
          linkAttr.setAttribute(HtmlPrinter.XHTML_NAMESPACE, TITLE_ATTR, title);
        }
        xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, A_TAG, linkAttr, XmlWriterSupport.OPEN);
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.