1 28 package net.sf.jasperreports.engine.base; 29 30 import java.io.Serializable ; 31 32 import net.sf.jasperreports.engine.JRConstants; 33 import net.sf.jasperreports.engine.JRHyperlink; 34 import net.sf.jasperreports.engine.JRHyperlinkHelper; 35 import net.sf.jasperreports.engine.JRPrintHyperlink; 36 import net.sf.jasperreports.engine.JRPrintHyperlinkParameter; 37 import net.sf.jasperreports.engine.JRPrintHyperlinkParameters; 38 39 40 46 public class JRBasePrintHyperlink implements JRPrintHyperlink, Serializable 47 { 48 49 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 50 51 private String linkType; 52 private byte hyperlinkTarget = JRHyperlink.HYPERLINK_TARGET_SELF; 53 private String hyperlinkReference; 54 private String hyperlinkAnchor; 55 private Integer hyperlinkPage; 56 private String hyperlinkTooltip; 57 private JRPrintHyperlinkParameters hyperlinkParameters; 58 59 60 63 public JRBasePrintHyperlink() 64 { 65 } 66 67 public String getHyperlinkAnchor() 68 { 69 return hyperlinkAnchor; 70 } 71 72 public Integer getHyperlinkPage() 73 { 74 return hyperlinkPage; 75 } 76 77 public JRPrintHyperlinkParameters getHyperlinkParameters() 78 { 79 return hyperlinkParameters; 80 } 81 82 public String getHyperlinkReference() 83 { 84 return hyperlinkReference; 85 } 86 87 public byte getHyperlinkTarget() 88 { 89 return hyperlinkTarget; 90 } 91 92 public byte getHyperlinkType() 93 { 94 return JRHyperlinkHelper.getHyperlinkType(getLinkType()); 95 } 96 97 public String getLinkType() 98 { 99 return linkType; 100 } 101 102 public void setHyperlinkAnchor(String hyperlinkAnchor) 103 { 104 this.hyperlinkAnchor = hyperlinkAnchor; 105 } 106 107 public void setHyperlinkPage(Integer hyperlinkPage) 108 { 109 this.hyperlinkPage = hyperlinkPage; 110 } 111 112 public void setHyperlinkParameters(JRPrintHyperlinkParameters parameters) 113 { 114 this.hyperlinkParameters = parameters; 115 } 116 117 public void setHyperlinkReference(String hyperlinkReference) 118 { 119 this.hyperlinkReference = hyperlinkReference; 120 } 121 122 public void setHyperlinkTarget(byte hyperlinkTarget) 123 { 124 this.hyperlinkTarget = hyperlinkTarget; 125 } 126 127 public void setHyperlinkType(byte hyperlinkType) 128 { 129 setLinkType(JRHyperlinkHelper.getLinkType(hyperlinkType)); 130 } 131 132 public void setLinkType(String type) 133 { 134 this.linkType = type; 135 } 136 137 138 145 public void addHyperlinkParameter(JRPrintHyperlinkParameter parameter) 146 { 147 if (hyperlinkParameters == null) 148 { 149 hyperlinkParameters = new JRPrintHyperlinkParameters(); 150 } 151 hyperlinkParameters.addParameter(parameter); 152 } 153 154 155 public String getHyperlinkTooltip() 156 { 157 return hyperlinkTooltip; 158 } 159 160 161 public void setHyperlinkTooltip(String hyperlinkTooltip) 162 { 163 this.hyperlinkTooltip = hyperlinkTooltip; 164 } 165 166 } 167 | Popular Tags |