There are 2 code examples for java.awt.RenderingHints.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: jFreeChart Package: org.jfree.chart
Source Code: JFreeChart.java (Click to view .java file)
Method Code:
/**
* Clones the object, and takes care of listeners.
* Note: caller shall register its own listeners on cloned graph.
* @return A clone.
* @throws CloneNotSupportedException if the chart is not cloneable.
*/
public Object clone() throws CloneNotSupportedException {
JFreeChart chart=(JFreeChart)super.clone();
chart.renderingHints=(RenderingHints)this.renderingHints.clone();
if (this.title != null) {
chart.title=(TextTitle)this.title.clone();
chart.title.addChangeListener(chart);
}
chart.subtitles=new ArrayList();
for (int i=0; i < getSubtitleCount(); i++) {
Title subtitle=(Title)getSubtitle(i).clone();
chart.subtitles.add(subtitle);
subtitle.addChangeListener(chart);
}
if (this.plot != null) {
chart.plot=(Plot)this.plot.clone();
chart.plot.addChangeListener(chart);
}
chart.progressListeners=new EventListenerList();
chart.changeListeners=new EventListenerList();
return chart;
}
Project Name: weka Package: weka.classifiers.bayes.net
Source Code: GUI.java (Click to view .java file)
Method Code:
/**
* This method highlights a given node and all its incoming and outgoing arcs
*/
public void highLight(int iNode){
Graphics2D g=(Graphics2D)this.getGraphics();
RenderingHints rh=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
rh.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_SPEED);
g.setRenderingHints(rh);
g.setPaintMode();
g.scale(m_fScale,m_fScale);
drawNode(g,iNode,HIGHLIGHTED);
}