From: SourceForge.net <no...@so...> - 2008-07-02 20:58:58
|
Patches item #2006826, was opened at 2008-06-30 14:14 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=2006826&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Eric Penfold (ecjp) >Assigned to: David Gilbert (mungady) Summary: CompositeTitle enhancement to support entity generation Initial Comment: Currently (1.0.10), the CompositeTitle class ignores the params parameter object in the method: public Object draw(Graphics2D, Rectangle2D, Object) The impact of this is that, for example when combining multiple LegendTitle objects inside single CompositeTitle (for the purposes of a combined border, positioning, etc), neither legend is able to generate ChartMouseEvents via the underlying ChartPanel. When the same legends are added directly to the chart, instead of being added via the CompositeTitle, then expected ChartMouseEvents are generated. It appears that this deficiency can be addressed by a simple patch to CompositeTitle, replacing the two existing draw methods with new versions: /** * Draws the title on a Java 2D graphics device (such as the screen or a * printer). * * @param g2 the graphics device. * @param area the area allocated for the title. */ public void draw(Graphics2D g2, Rectangle2D area) { this.draw(g2, area, null); } /** * Draws the block within the specified area. * * @param g2 the graphics device. * @param area the area. * @param params ignored (<code>null</code> permitted). * * @return An {@link org.jfree.chart.block.EntityBlockResult} or * <code>null</code>. */ public Object draw(Graphics2D g2, Rectangle2D area, Object params) { drawBorder(g2, area); area = trimBorder(area); area = trimPadding(area); return container.draw(g2, area, params); } ---------------------------------------------------------------------- >Comment By: David Gilbert (mungady) Date: 2008-07-02 20:58 Message: Logged In: YES user_id=112975 Originator: NO Hi Eric, Nice catch, thanks! I committed your change to Subversion for inclusion in the next release (1.0.11). Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=2006826&group_id=15494 |