Examples of JRPrintHyperlink


Examples of net.sf.jasperreports.engine.JRPrintHyperlink

  /**
   * @param evt
   */
  final void hyperlinkClicked(final MouseEvent evt) {
    JPanel link = (JPanel) evt.getSource();
    JRPrintHyperlink element = (JRPrintHyperlink) linksMap.get(link);

    try {
      JRHyperlinkListener listener = null;
      for (int i = 0; i < hyperlinkListeners.size(); i++) {
        listener = hyperlinkListeners.get(i);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintHyperlink

    Collection elements = page.getElements();
    if (elements != null && elements.size() > 0) {
      String toolTip = null;
      JPanel link = null;
      JRPrintElement element = null;
      JRPrintHyperlink hyperlink = null;
      for (Iterator it = elements.iterator(); it.hasNext();) {
        element = (JRPrintElement) it.next();
        if (element instanceof JRPrintHyperlink
            && ((JRPrintHyperlink) element).getHyperlinkType() != JRHyperlink.HYPERLINK_TYPE_NONE) {
          hyperlink = (JRPrintHyperlink) element;

          link = new JPanel();
          link.setCursor(new Cursor(Cursor.HAND_CURSOR));
          link.setLocation((int) (element.getX() * realZoom),
              (int) (element.getY() * realZoom));
          link.setSize((int) (element.getWidth() * realZoom),
              (int) (element.getHeight() * realZoom));
          link.setOpaque(false);

          toolTip = null;
          switch (hyperlink.getHyperlinkType()) {
          case JRHyperlink.HYPERLINK_TYPE_REFERENCE:
            toolTip = hyperlink.getHyperlinkReference();
            break;

          case JRHyperlink.HYPERLINK_TYPE_LOCAL_ANCHOR:
            if (hyperlink.getHyperlinkAnchor() != null) {
              toolTip = "#" + hyperlink.getHyperlinkAnchor();
            }
            break;

          case JRHyperlink.HYPERLINK_TYPE_LOCAL_PAGE:
            if (hyperlink.getHyperlinkPage() != null) {
              toolTip = "#page " + hyperlink.getHyperlinkPage();
            }
            break;

          case JRHyperlink.HYPERLINK_TYPE_REMOTE_ANCHOR:
            toolTip = "";
            if (hyperlink.getHyperlinkReference() != null) {
              toolTip = toolTip
                  + hyperlink.getHyperlinkReference();
            }
            if (hyperlink.getHyperlinkAnchor() != null) {
              toolTip = toolTip + "#"
                  + hyperlink.getHyperlinkAnchor();
            }
            break;

          case JRHyperlink.HYPERLINK_TYPE_REMOTE_PAGE:
            toolTip = "";
            if (hyperlink.getHyperlinkReference() != null) {
              toolTip = toolTip
                  + hyperlink.getHyperlinkReference();
            }
            if (hyperlink.getHyperlinkPage() != null) {
              toolTip = toolTip + "#page "
                  + hyperlink.getHyperlinkPage();
            }
            break;

          default:
            break;
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintHyperlink

  /**
  */
  void hyperlinkClicked(MouseEvent evt)
  {
    JPanel link = (JPanel)evt.getSource();
    JRPrintHyperlink element = (JRPrintHyperlink)linksMap.get(link);
    hyperlinkClicked(element);
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintHyperlink

            }
          }
        }
        boolean hasImageMap = imageMap != null;

        JRPrintHyperlink hyperlink = null;
        if (element instanceof JRPrintHyperlink)
        {
          hyperlink = (JRPrintHyperlink) element;
        }
        boolean hasHyperlink = !hasImageMap
          && hyperlink != null && hyperlink.getHyperlinkType() != JRHyperlink.HYPERLINK_TYPE_NONE;
        boolean hasTooltip = hyperlink != null && hyperlink.getHyperlinkTooltip() != null;

        if (hasHyperlink || hasImageMap || hasTooltip)
        {
          JPanel link;
          if (hasImageMap)
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintHyperlink

  /**
  */
  void hyperlinkClicked(MouseEvent evt)
  {
    JPanel link = (JPanel)evt.getSource();
    JRPrintHyperlink element = (JRPrintHyperlink)linksMap.get(link);
    hyperlinkClicked(element);
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintHyperlink

            }
          }
        }
        boolean hasImageMap = imageMap != null;

        JRPrintHyperlink hyperlink = null;
        if (element instanceof JRPrintHyperlink)
        {
          hyperlink = (JRPrintHyperlink) element;
        }
        boolean hasHyperlink = !hasImageMap
          && hyperlink != null && hyperlink.getHyperlinkType() != JRHyperlink.HYPERLINK_TYPE_NONE;
        boolean hasTooltip = hyperlink != null && hyperlink.getHyperlinkTooltip() != null;

        if (hasHyperlink || hasImageMap || hasTooltip)
        {
          JPanel link;
          if (hasImageMap)
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.