Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintAnchorIndex


      case LOCAL_ANCHOR :
      {
        if (hyperlink.getHyperlinkAnchor() != null)
        {
          Map anchorIndexes = viewerContext.getJasperPrint().getAnchorIndexes();
          JRPrintAnchorIndex anchorIndex = (JRPrintAnchorIndex)anchorIndexes.get(hyperlink.getHyperlinkAnchor());
          if (anchorIndex.getPageIndex() != viewerContext.getPageIndex())
          {
            viewerContext.setPageIndex(anchorIndex.getPageIndex());
            viewerContext.refreshPage();
          }
          Container container = pnlInScroll.getParent();
          if (container instanceof JViewport)
          {
            JViewport viewport = (JViewport) container;

            int newX = (int)(anchorIndex.getElementAbsoluteX() * realZoom);
            int newY = (int)(anchorIndex.getElementAbsoluteY() * realZoom);

            int maxX = pnlInScroll.getWidth() - viewport.getWidth();
            int maxY = pnlInScroll.getHeight() - viewport.getHeight();

            if (newX < 0)
View Full Code Here


      case LOCAL_ANCHOR :
      {
        if (hyperlink.getHyperlinkAnchor() != null)
        {
          Map anchorIndexes = jasperPrint.getAnchorIndexes();
          JRPrintAnchorIndex anchorIndex = (JRPrintAnchorIndex)anchorIndexes.get(hyperlink.getHyperlinkAnchor());
          if (anchorIndex.getPageIndex() != pageIndex)
          {
            setPageIndex(anchorIndex.getPageIndex());
            refreshPage();
          }
          Container container = pnlInScroll.getParent();
          if (container instanceof JViewport)
          {
            JViewport viewport = (JViewport) container;

            int newX = (int)(anchorIndex.getElementAbsoluteX() * realZoom);
            int newY = (int)(anchorIndex.getElementAbsoluteY() * realZoom);

            int maxX = pnlInScroll.getWidth() - viewport.getWidth();
            int maxY = pnlInScroll.getHeight() - viewport.getHeight();

            if (newX < 0)
View Full Code Here

      break;

    case JRHyperlink.HYPERLINK_TYPE_LOCAL_ANCHOR:
      if (hyperlink.getHyperlinkAnchor() != null) {
        Map anchorIndexes = jasperPrint.getAnchorIndexes();
        JRPrintAnchorIndex anchorIndex = (JRPrintAnchorIndex) anchorIndexes
            .get(hyperlink.getHyperlinkAnchor());
        if (anchorIndex.getPageIndex() != pageIndex) {
          setPageIndex(anchorIndex.getPageIndex());
          refreshPage();
        }
        Container container = pnlInScroll.getParent();
        if (container instanceof JViewport) {
          JViewport viewport = (JViewport) container;

          int newX = (int) (anchorIndex.getElement().getX() * realZoom);
          int newY = (int) (anchorIndex.getElement().getY() * realZoom);

          int maxX = pnlInScroll.getWidth() - viewport.getWidth();
          int maxY = pnlInScroll.getHeight() - viewport.getHeight();

          if (newX < 0) {
View Full Code Here

      case JRHyperlink.HYPERLINK_TYPE_LOCAL_ANCHOR :
      {
        if (hyperlink.getHyperlinkAnchor() != null)
        {
          Map anchorIndexes = jasperPrint.getAnchorIndexes();
          JRPrintAnchorIndex anchorIndex = (JRPrintAnchorIndex)anchorIndexes.get(hyperlink.getHyperlinkAnchor());
          if (anchorIndex.getPageIndex() != pageIndex)
          {
            setPageIndex(anchorIndex.getPageIndex());
            refreshPage();
          }
          Container container = pnlInScroll.getParent();
          if (container instanceof JViewport)
          {
            JViewport viewport = (JViewport) container;

            int newX = (int)(anchorIndex.getElementAbsoluteX() * realZoom);
            int newY = (int)(anchorIndex.getElementAbsoluteY() * realZoom);

            int maxX = pnlInScroll.getWidth() - viewport.getWidth();
            int maxY = pnlInScroll.getHeight() - viewport.getHeight();

            if (newX < 0)
View Full Code Here

      case JRHyperlink.HYPERLINK_TYPE_LOCAL_ANCHOR :
      {
        if (hyperlink.getHyperlinkAnchor() != null)
        {
          Map anchorIndexes = jasperPrint.getAnchorIndexes();
          JRPrintAnchorIndex anchorIndex = (JRPrintAnchorIndex)anchorIndexes.get(hyperlink.getHyperlinkAnchor());
          if (anchorIndex.getPageIndex() != pageIndex)
          {
            setPageIndex(anchorIndex.getPageIndex());
            refreshPage();
          }
          Container container = pnlInScroll.getParent();
          if (container instanceof JViewport)
          {
            JViewport viewport = (JViewport) container;

            int newX = (int)(anchorIndex.getElementAbsoluteX() * realZoom);
            int newY = (int)(anchorIndex.getElementAbsoluteY() * realZoom);

            int maxX = pnlInScroll.getWidth() - viewport.getWidth();
            int maxY = pnlInScroll.getHeight() - viewport.getHeight();

            if (newX < 0)
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRPrintAnchorIndex

Copyright © 2018 www.massapicom. 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.