本文整理汇总了Java中org.jfree.chart.entity.ChartEntity.getURLText方法的典型用法代码示例。如果您正苦于以下问题:Java ChartEntity.getURLText方法的具体用法?Java ChartEntity.getURLText怎么用?Java ChartEntity.getURLText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.entity.ChartEntity
的用法示例。
在下文中一共展示了ChartEntity.getURLText方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuffer sb = new StringBuffer();
sb.append("<map id=\"" + name + "\" name=\"" + name + "\">");
sb.append(StringUtils.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtils.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例2: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuilder sb = new StringBuilder();
sb.append("<map id=\"").append(htmlEscape(name));
sb.append("\" name=\"").append(htmlEscape(name)).append("\">");
sb.append(StringUtils.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtils.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例3: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name ({@code null} not permitted).
* @param info the chart rendering info ({@code null} not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text ({@code null} not permitted
* if {@code info} contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference ({@code null} not permitted if
* {@code info} contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuilder sb = new StringBuilder();
sb.append("<map id=\"").append(htmlEscape(name));
sb.append("\" name=\"").append(htmlEscape(name)).append("\">");
sb.append(StringUtils.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtils.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例4: toXhtml
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
public void toXhtml(@NotNull XhtmlBuffer xb) {
xb.openElement("img");
xb.addAttribute("src", chartUrl);
xb.addAttribute("alt", alt);
xb.addAttribute("usemap", "#" + mapId);
xb.addAttribute("style", "border: none;");
xb.addAttribute("class", "img-responsive");
xb.closeElement("img");
xb.openElement("map");
xb.addAttribute("id", mapId);
xb.addAttribute("name", mapId);
Iterator iter = renderingInfo.getEntityCollection().iterator();
while (iter.hasNext()) {
ChartEntity ce = (ChartEntity) iter.next();
String shapeType = ce.getShapeType();
String shapeCoords = ce.getShapeCoords();
String tooltipText = ce.getToolTipText();
String urltext = ce.getURLText();
if (urltext == null)
continue;
xb.openElement("area");
xb.addAttribute("shape", shapeType);
xb.addAttribute("coords", shapeCoords);
xb.addAttribute("title", tooltipText);
xb.addAttribute("alt", tooltipText);
xb.addAttribute("href", urltext);
xb.closeElement("area");
}
xb.closeElement("map");
}
示例5: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuffer sb = new StringBuffer();
sb.append("<map id=\"" + htmlEscape(name) + "\" name=\""
+ htmlEscape(name) + "\">");
sb.append(StringUtils.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtils.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例6: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuffer sb = new StringBuffer();
sb.append("<map id=\"" + htmlEscape(name) + "\" name=\""
+ htmlEscape(name) + "\">");
sb.append(StringUtilities.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtilities.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例7: toXhtml
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
public void toXhtml(@NotNull XhtmlBuffer xb) {
xb.openElement("img");
xb.addAttribute("src", chartUrl);
xb.addAttribute("alt", alt);
xb.addAttribute("usemap", "#" + mapId);
xb.addAttribute("style", "border: none;");
xb.closeElement("img");
xb.openElement("map");
xb.addAttribute("id", mapId);
xb.addAttribute("name", mapId);
Iterator iter = renderingInfo.getEntityCollection().iterator();
while (iter.hasNext()) {
ChartEntity ce = (ChartEntity) iter.next();
String shapeType = ce.getShapeType();
String shapeCoords = ce.getShapeCoords();
String tooltipText = ce.getToolTipText();
String urltext = ce.getURLText();
if (urltext == null)
continue;
xb.openElement("area");
xb.addAttribute("shape", shapeType);
xb.addAttribute("coords", shapeCoords);
xb.addAttribute("title", tooltipText);
xb.addAttribute("alt", tooltipText);
xb.addAttribute("href", urltext);
//hongliangpan add
xb.addAttribute("target", "_BLANK");
// xb.addAttribute("onclick",
// "window.open(this.href, '_blank', 'scrollbars=0,resizable=0;width=300');return false");
xb.closeElement("area");
}
xb.closeElement("map");
}
示例8: getImageMap
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @return The map tag.
*/
public static String getImageMap(String name, ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator) {
StringBuffer sb = new StringBuffer();
sb.append("<map id=\"").append(htmlEscape(name));
sb.append("\" name=\"").append(htmlEscape(name)).append("\">");
sb.append(StringUtils.getLineSeparator());
EntityCollection entities = info.getEntityCollection();
if (entities != null) {
int count = entities.getEntityCount();
for (int i = count - 1; i >= 0; i--) {
ChartEntity entity = entities.getEntity(i);
if (entity.getToolTipText() != null
|| entity.getURLText() != null) {
String area = entity.getImageMapAreaTag(
toolTipTagFragmentGenerator,
urlTagFragmentGenerator);
if (area.length() > 0) {
sb.append(area);
sb.append(StringUtils.getLineSeparator());
}
}
}
}
sb.append("</map>");
return sb.toString();
}
示例9: createOutput
import org.jfree.chart.entity.ChartEntity; //导入方法依赖的package包/类
public ProcessorOutput createOutput(String name) {
return new ProcessorOutputImpl(JFreeChartProcessor.this, name) {
public void readImpl(PipelineContext context, XMLReceiver xmlReceiver) {
JFreeChartSerializer.ChartConfig chartConfig = readChartConfig(context);
ChartInfo info = createChart(context, chartConfig);
try {
xmlReceiver.startDocument();
xmlReceiver.startElement("", "chart-info", "chart-info", new AttributesImpl());
xmlReceiver.startElement("", "file", "file", new AttributesImpl());
xmlReceiver.characters(info.file.toCharArray(), 0, info.file.length());
xmlReceiver.endElement("", "file", "file");
if (chartConfig.getMap() != null) {
AttributesImpl atts = new AttributesImpl();
atts.addAttribute("", "name", "name", "CDATA", chartConfig.getMap());
xmlReceiver.startElement("", "map", "map", atts);
EntityCollection entities = info.getInfo().getEntityCollection();
Iterator iterator = entities.iterator();
while (iterator.hasNext()) {
ChartEntity entity = (ChartEntity) iterator.next();
AttributesImpl attr = new AttributesImpl();
attr.addAttribute("", "shape", "shape", "CDATA", entity.getShapeType());
attr.addAttribute("", "coords", "coords", "CDATA", entity.getShapeCoords());
if (entity.getURLText() != null && !entity.getURLText().equals("")) {
attr.addAttribute("", "href", "href", "CDATA", entity.getURLText());
}
if (entity.getToolTipText() != null && !entity.getToolTipText().equals("")) {
attr.addAttribute("", "title", "title", "CDATA", entity.getToolTipText());
}
xmlReceiver.startElement("", "area", "area", attr);
xmlReceiver.endElement("", "area", "area");
}
xmlReceiver.endElement("", "map", "map");
}
xmlReceiver.endElement("", "chart-info", "chart-info");
xmlReceiver.endDocument();
} catch (SAXException e) {
throw new OXFException(e);
}
}
};
}