Examples of ImageMap


Examples of org.krysalis.jcharts.imageMap.ImageMap

    //---if we are saving all the coordinates for an ImageMap, create the ImageMap Object as we
    //---  know how many area elements there are.
    if( super.getGenerateImageMapFlag() )
    {
      //---pass the size to try and avoid having the expense of resizing the ArrayList
      ImageMap imageMap = new ImageMap( iAxisDataSeries.size() * iAxisDataSeries.getTotalNumberOfDataSets() );
      super.setImageMap( imageMap );
    }


    //---draw the charts over the axis...
View Full Code Here

Examples of org.krysalis.jcharts.imageMap.ImageMap

    //---IMAGE MAP setup
    //---if we are saving all the coordinates for an ImageMap, create the ImageMap Object as we
    //---  know how many area elements there are.
    if( super.getGenerateImageMapFlag() )
    {
      ImageMap imageMap = new ImageMap( iPieChartDataSet.getNumberOfDataItems() );
      super.setImageMap( imageMap );
    }


    PieChart3D.render( this );
View Full Code Here

Examples of org.krysalis.jcharts.imageMap.ImageMap

    //---IMAGE MAP setup
    //---if we are saving all the coordinates for an ImageMap, create the ImageMap Object as we
    //---  know how many area elements there are.
    if( super.getGenerateImageMapFlag() )
    {
      ImageMap imageMap = new ImageMap( iPieChartDataSet.getNumberOfDataItems() );
      super.setImageMap( imageMap );
    }


    PieChart2D.render( this );
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

  private ArrayList readHandlerArrayList;
 
  public ImageMapReadHandler()
  {
    readHandlerArrayList = new ArrayList();
    imageMap = new ImageMap();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

      if (node instanceof RenderableReplacedContentBox == false)
      {
        continue;
      }

      final ImageMap imageMap = RenderUtility.extractImageMap((RenderableReplacedContentBox) node);
      if (imageMap == null)
      {
        continue;
      }

      final PageFormat pf = physicalPageDrawable.getPageFormat();
      final float imageMapX = (float) (x1 - pf.getImageableX() - StrictGeomUtility.toExternalValue(node.getX()));
      final float imageMapY = (float) (y1 - pf.getImageableY() - StrictGeomUtility.toExternalValue(node.getY()));

      final ImageMapEntry[] imageMapEntries = imageMap.getEntriesForPoint(imageMapX, imageMapY);
      for (int j = 0; j < imageMapEntries.length; j++)
      {
        final ImageMapEntry imageMapEntry = imageMapEntries[j];
        final Object imageMapTooltip = imageMapEntry.getAttribute(LibXmlInfo.XHTML_NAMESPACE, "title");
        if (imageMapTooltip != null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

                               final ReportMouseEvent event)
    {
      if (node instanceof RenderableReplacedContentBox)
      {
        // process image map
        final ImageMap imageMap = RenderUtility.extractImageMap((RenderableReplacedContentBox) node);
        if (imageMap != null)
        {
          final PageDrawable physicalPageDrawable = drawablePanel.getPageDrawable();
          final PageFormat pf = physicalPageDrawable.getPageFormat();
          final float x1 = (float) (event.getSourceEvent().getX() / zoom);
          final float y1 = (float) (event.getSourceEvent().getY() / zoom);
          final float imageMapX = (float) (x1 - pf.getImageableX() - StrictGeomUtility.toExternalValue(node.getX()));
          final float imageMapY = (float) (y1 - pf.getImageableY() - StrictGeomUtility.toExternalValue(node.getY()));
          final ImageMapEntry[] imageMapEntries = imageMap.getEntriesForPoint(imageMapX, imageMapY);
          for (int i = 0; i < imageMapEntries.length; i++)
          {
            final ImageMapEntry entry = imageMapEntries[i];
            final Object imageMapTarget = entry.getAttribute(LibXmlInfo.XHTML_NAMESPACE, "href");
            if (imageMapTarget != null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

        return;
      }

      //xmlWriter.writeComment("Drawable content:" + source);
      // Write image reference ..
      final ImageMap imageMap;
      final AttributeList attrList = new AttributeList();
      attrList.setAttribute(HtmlPrinter.XHTML_NAMESPACE, SRC_ATTR, name);
      attrList.setAttribute(HtmlPrinter.XHTML_NAMESPACE, "border", "0");

      final Object imageMapNameOverride = attributes.getAttribute
          (AttributeNames.Html.NAMESPACE, AttributeNames.Html.IMAGE_MAP_OVERRIDE);
      if (imageMapNameOverride != null)
      {
        attrList.setAttribute(HtmlPrinter.XHTML_NAMESPACE, USEMAP_ATTR, String.valueOf(imageMapNameOverride));
        imageMap = null;
      }
      else
      {
        // only generate a image map, if the user does not specify their own onw via the override.
        // Of course, they would have to provide the map by other means as well.
        imageMap = RenderUtility.extractImageMap(node);

        if (imageMap != null)
        {
          final String mapName = imageMap.getAttribute(HtmlPrinter.XHTML_NAMESPACE, "name");
          if (mapName != null)
          {
            attrList.setAttribute(HtmlPrinter.XHTML_NAMESPACE, USEMAP_ATTR, "#" + mapName);
          }
          else
          {
            final String generatedName = "generated_" + name + "_map"; //NON-NLS
            imageMap.setAttribute(HtmlPrinter.XHTML_NAMESPACE, "name", generatedName);
            //noinspection MagicCharacter
            attrList.setAttribute(HtmlPrinter.XHTML_NAMESPACE, USEMAP_ATTR, '#' + generatedName);//NON-NLS
          }
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

    if (version < '6')
    {
      return;
    }

    final ImageMap imageMap = RenderUtility.extractImageMap(content);
    // only generate a image map, if the user does not specify their own onw via the override.
    // Of course, they would have to provide the map by other means as well.

    if (imageMap == null)
    {
      return;
    }

    final ImageMapEntry[] imageMapEntries = imageMap.getMapEntries();
    for (int i = 0; i < imageMapEntries.length; i++)
    {
      final ImageMapEntry imageMapEntry = imageMapEntries[i];
      final String link = imageMapEntry.getAttribute(LibXmlInfo.XHTML_NAMESPACE, "href");
      final String tooltip = imageMapEntry.getAttribute(LibXmlInfo.XHTML_NAMESPACE, "title");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

      final Graphics2D graphics = image.createGraphics();
      draw(graphics, bounds);
      graphics.dispose();
    }

    final ImageMap map = new ImageMap();
    final EntityCollection entityCollection = chartRenderingInfo.getEntityCollection();
    final int count = entityCollection.getEntityCount();
    for (int i = 0; i < count; i++)
    {
      final ChartEntity chartEntity = entityCollection.getEntity(i);
      final Shape area = chartEntity.getArea();
      final String hrefValue = chartEntity.getURLText();
      final String tooltipValue = chartEntity.getToolTipText();
      if (StringUtils.isEmpty(tooltipValue) == false ||
          StringUtils.isEmpty(hrefValue) == false)
      {
        final AbstractImageMapEntry entry;
        if (chartEntity instanceof XYItemEntity ||
            chartEntity instanceof CategoryItemEntity ||
            chartEntity instanceof PieSectionEntity)
        {
          entry = createMapEntry(area, dataArea);
        }
        else
        {
          entry = createMapEntry(area, otherArea);
        }
        if (entry == null)
        {
          continue;
        }
        if (StringUtils.isEmpty(hrefValue) == false)
        {
          entry.setAttribute(LibXmlInfo.XHTML_NAMESPACE, "href", hrefValue);
        }
        if (StringUtils.isEmpty(tooltipValue) == false)
        {
          entry.setAttribute(LibXmlInfo.XHTML_NAMESPACE, "title", tooltipValue);
        }
        map.addMapEntry(entry);
      }
    }

    return map;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.imagemap.ImageMap

    }
    // width and height and scaling and so on ..

    // BI-SERVER 11651: The extractImageMap function will fill the "attrList" parameter with the name
    // of the image map, if there is one. So we have to call this method first.
    final ImageMap imageMap = extractImageMap(attrs, drawable, width, height, name, attrList);

    writeImageTag(styleSheet, width, height, contentWidth, contentHeight, attrList);

    if (imageMap != null)
    {
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.