You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(165) |
Nov
(296) |
Dec
(92) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(84) |
Feb
(20) |
Mar
(20) |
Apr
(42) |
May
(26) |
Jun
(30) |
Jul
(77) |
Aug
(151) |
Sep
(61) |
Oct
(259) |
Nov
(160) |
Dec
(76) |
2007 |
Jan
(159) |
Feb
(155) |
Mar
(183) |
Apr
(113) |
May
(110) |
Jun
(178) |
Jul
(56) |
Aug
(21) |
Sep
(50) |
Oct
(251) |
Nov
(218) |
Dec
(42) |
2008 |
Jan
(14) |
Feb
(37) |
Mar
(60) |
Apr
(77) |
May
(146) |
Jun
(256) |
Jul
(72) |
Aug
(51) |
Sep
(283) |
Oct
(22) |
Nov
(55) |
Dec
(53) |
2009 |
Jan
(56) |
Feb
(45) |
Mar
(56) |
Apr
(98) |
May
(84) |
Jun
(87) |
Jul
(32) |
Aug
(6) |
Sep
(19) |
Oct
|
Nov
(10) |
Dec
(6) |
2010 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(158) |
Nov
(17) |
Dec
(15) |
2012 |
Jan
(9) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(22) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(259) |
Aug
(125) |
Sep
(24) |
Oct
(8) |
Nov
(132) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(26) |
Mar
(17) |
Apr
(8) |
May
|
Jun
(31) |
Jul
(126) |
Aug
(22) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(21) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(19) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David G. <mu...@us...> - 2005-11-14 10:56:22
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26916/source/org/jfree/util Modified Files: LogTarget.java Log Message: Fixed typo. Index: LogTarget.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/util/LogTarget.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LogTarget.java 18 Oct 2005 13:24:19 -0000 1.2 --- LogTarget.java 14 Nov 2005 10:55:59 -0000 1.3 *************** *** 37,41 **** * 06-Dec-2002 : LogTargets now use Object-Parameters instead of Strings. * 05-Feb-2003 : Removed unnecessary methods. ! * 29-Apr-2003 : Destilled from the JFreeReport project and moved into JCommon * */ --- 37,41 ---- * 06-Dec-2002 : LogTargets now use Object-Parameters instead of Strings. * 05-Feb-2003 : Removed unnecessary methods. ! * 29-Apr-2003 : Distilled from the JFreeReport project and moved into JCommon * */ |
From: David G. <mu...@us...> - 2005-11-14 10:55:53
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26823/source/org/jfree/util Modified Files: Log.java Log Message: Fixed typo. Index: Log.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/util/Log.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Log.java 18 Oct 2005 13:24:19 -0000 1.3 --- Log.java 14 Nov 2005 10:55:43 -0000 1.4 *************** *** 37,41 **** * Changes * ------- ! * 29-Apr-2003 : Destilled from the JFreeReport project and moved into JCommon * 11-Jun-2003 : Removing LogTarget did not work. * --- 37,41 ---- * Changes * ------- ! * 29-Apr-2003 : Distilled from the JFreeReport project and moved into JCommon * 11-Jun-2003 : Removing LogTarget did not work. * |
From: David G. <mu...@us...> - 2005-11-14 10:55:32
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26729/source/org/jfree/ui Modified Files: RectangleInsets.java Log Message: Whitespace reformatting. Index: RectangleInsets.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/ui/RectangleInsets.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RectangleInsets.java 18 Oct 2005 13:18:34 -0000 1.12 --- RectangleInsets.java 14 Nov 2005 10:55:19 -0000 1.13 *************** *** 68,73 **** */ public static final RectangleInsets ZERO_INSETS = new RectangleInsets( ! UnitType.ABSOLUTE, 0.0, 0.0, 0.0, 0.0 ! ); /** Absolute or relative units. */ --- 68,72 ---- */ public static final RectangleInsets ZERO_INSETS = new RectangleInsets( ! UnitType.ABSOLUTE, 0.0, 0.0, 0.0, 0.0); /** Absolute or relative units. */ *************** *** 180,184 **** } if (!(obj instanceof RectangleInsets)) { ! return false; } final RectangleInsets that = (RectangleInsets) obj; --- 179,183 ---- } if (!(obj instanceof RectangleInsets)) { ! return false; } final RectangleInsets that = (RectangleInsets) obj; *************** *** 247,251 **** public Rectangle2D createAdjustedRectangle(final Rectangle2D base, final LengthAdjustmentType horizontal, ! final LengthAdjustmentType vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); --- 246,250 ---- public Rectangle2D createAdjustedRectangle(final Rectangle2D base, final LengthAdjustmentType horizontal, ! final LengthAdjustmentType vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); *************** *** 256,277 **** double h = base.getHeight(); if (horizontal == LengthAdjustmentType.EXPAND) { ! final double leftOutset = calculateLeftOutset(w); ! x = x - leftOutset; ! w = w + leftOutset + calculateRightOutset(w); } else if (horizontal == LengthAdjustmentType.CONTRACT) { ! final double leftMargin = calculateLeftInset(w); ! x = x + leftMargin; ! w = w - leftMargin - calculateRightInset(w); } if (vertical == LengthAdjustmentType.EXPAND) { ! final double topMargin = calculateTopOutset(h); ! y = y - topMargin; ! h = h + topMargin + calculateBottomOutset(h); } else if (vertical == LengthAdjustmentType.CONTRACT) { ! final double topMargin = calculateTopInset(h); ! y = y + topMargin; ! h = h - topMargin - calculateBottomInset(h); } return new Rectangle2D.Double(x, y, w, h); --- 255,276 ---- double h = base.getHeight(); if (horizontal == LengthAdjustmentType.EXPAND) { ! final double leftOutset = calculateLeftOutset(w); ! x = x - leftOutset; ! w = w + leftOutset + calculateRightOutset(w); } else if (horizontal == LengthAdjustmentType.CONTRACT) { ! final double leftMargin = calculateLeftInset(w); ! x = x + leftMargin; ! w = w - leftMargin - calculateRightInset(w); } if (vertical == LengthAdjustmentType.EXPAND) { ! final double topMargin = calculateTopOutset(h); ! y = y - topMargin; ! h = h + topMargin + calculateBottomOutset(h); } else if (vertical == LengthAdjustmentType.CONTRACT) { ! final double topMargin = calculateTopInset(h); ! y = y + topMargin; ! h = h - topMargin - calculateBottomInset(h); } return new Rectangle2D.Double(x, y, w, h); *************** *** 300,304 **** public Rectangle2D createInsetRectangle(final Rectangle2D base, final boolean horizontal, ! final boolean vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); --- 299,303 ---- public Rectangle2D createInsetRectangle(final Rectangle2D base, final boolean horizontal, ! final boolean vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); *************** *** 346,350 **** public Rectangle2D createOutsetRectangle(final Rectangle2D base, final boolean horizontal, ! final boolean vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); --- 345,349 ---- public Rectangle2D createOutsetRectangle(final Rectangle2D base, final boolean horizontal, ! final boolean vertical) { if (base == null) { throw new IllegalArgumentException("Null 'base' argument."); |
From: David G. <mu...@us...> - 2005-11-14 10:49:08
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25499/source/org/jfree/text Modified Files: TextUtilities.java Log Message: Should use FontMetrics.getStringBounds() for JDK 1.4 or later. Index: TextUtilities.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/text/TextUtilities.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TextUtilities.java 3 Nov 2005 09:55:27 -0000 1.16 --- TextUtilities.java 14 Nov 2005 10:48:58 -0000 1.17 *************** *** 125,129 **** if (configFontMetricsStringBounds.equals("auto")) { ! useFontMetricsGetStringBounds = isJava14 == false; } else --- 125,129 ---- if (configFontMetricsStringBounds.equals("auto")) { ! useFontMetricsGetStringBounds = isJava14 == true; } else |
From: David G. <mu...@us...> - 2005-11-14 10:48:26
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/base/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25395/source/org/jfree/base/log Modified Files: DefaultLog.java Log Message: Removed reference to JFreeReport. Index: DefaultLog.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/base/log/DefaultLog.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DefaultLog.java 6 Nov 2005 22:14:32 -0000 1.6 --- DefaultLog.java 14 Nov 2005 10:48:18 -0000 1.7 *************** *** 59,63 **** new PrintStreamLogTarget(); ! /** The JFreeReport log instance. */ private static final DefaultLog defaultLogInstance; --- 59,63 ---- new PrintStreamLogTarget(); ! /** The default log instance. */ private static final DefaultLog defaultLogInstance; |
From: David G. <mu...@us...> - 2005-11-14 10:48:06
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25329/source/org/jfree/base Modified Files: jcommon.properties Log Message: Comment edits. Index: jcommon.properties =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/base/jcommon.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** jcommon.properties 6 Nov 2005 22:14:32 -0000 1.5 --- jcommon.properties 14 Nov 2005 10:47:59 -0000 1.6 *************** *** 13,17 **** # ! # Should the debugging system be disabled by default. This option will surpress all # output, no single line of debug information will be printed. If you want to remove # System.out-debugging on the server side, try to switch to a Log4J-LogTarget instead. --- 13,17 ---- # ! # Should the debugging system be disabled by default. This option will suppress all # output, no single line of debug information will be printed. If you want to remove # System.out-debugging on the server side, try to switch to a Log4J-LogTarget instead. *************** *** 30,33 **** # # Applies a workaround to fix a JDK bug. When the value is set to auto, ! # This is enabled if the JDK is not version 1.4 or higher. org.jfree.text.UseFontMetricsGetStringBounds=auto --- 30,33 ---- # # Applies a workaround to fix a JDK bug. When the value is set to auto, ! # This is disabled if the JDK is not version 1.4 or higher. org.jfree.text.UseFontMetricsGetStringBounds=auto |
From: David G. <mu...@us...> - 2005-11-14 10:47:42
|
Update of /cvsroot/jfreechart/jcommon/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25142/ant Modified Files: build.properties Log Message: Update version number. Index: build.properties =================================================================== RCS file: /cvsroot/jfreechart/jcommon/ant/build.properties,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** build.properties 7 Sep 2005 11:39:44 -0000 1.16 --- build.properties 14 Nov 2005 10:47:20 -0000 1.17 *************** *** 3,7 **** # Global settings ... jcommon.name=jcommon ! jcommon.version=1.0.0-rc1-cvs # --- 3,7 ---- # Global settings ... jcommon.name=jcommon ! jcommon.version=1.0.0 # |
From: David G. <mu...@us...> - 2005-11-10 11:51:22
|
Update of /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/junit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2449/source/org/jfree/chart/plot/junit Modified Files: MeterPlotTests.java Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use interval background paint, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Use new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case for current value, and the now redundant method parameters, (drawValueLabel): New method, (equals): Updated for new fields, * source/org/jfree/chart/plot/junit/MeterPlotTests.java: (testEquals): Updated for new fields. Index: MeterPlotTests.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/junit/MeterPlotTests.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MeterPlotTests.java 17 Jun 2005 09:26:46 -0000 1.5 --- MeterPlotTests.java 10 Nov 2005 11:51:07 -0000 1.6 *************** *** 17,23 **** * License for more details. * ! * You should have received a copy of the GNU Lesser General Public License ! * along with this library; if not, write to the Free Software Foundation, ! * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. --- 17,24 ---- * License for more details. * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ! * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. *************** *** 170,173 **** --- 171,180 ---- assertTrue(plot1.equals(plot2)); + // tick label paint + plot1.setTickLabelPaint(Color.red); + assertFalse(plot1.equals(plot2)); + plot2.setTickLabelPaint(Color.red); + assertTrue(plot1.equals(plot2)); + // tick label format plot1.setTickLabelFormat(new DecimalFormat("0")); *************** *** 176,179 **** --- 183,198 ---- assertTrue(plot1.equals(plot2)); + // tick paint + plot1.setTickPaint(Color.green); + assertFalse(plot1.equals(plot2)); + plot2.setTickPaint(Color.green); + assertTrue(plot1.equals(plot2)); + + // tick size + plot1.setTickSize(1.23); + assertFalse(plot1.equals(plot2)); + plot2.setTickSize(1.23); + assertTrue(plot1.equals(plot2)); + // meter angle plot1.setMeterAngle(22); |
From: David G. <mu...@us...> - 2005-11-10 11:51:22
|
Update of /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2449/source/org/jfree/chart/plot Modified Files: MeterPlot.java Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use interval background paint, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Use new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case for current value, and the now redundant method parameters, (drawValueLabel): New method, (equals): Updated for new fields, * source/org/jfree/chart/plot/junit/MeterPlotTests.java: (testEquals): Updated for new fields. Index: MeterPlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/MeterPlot.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MeterPlot.java 19 Jul 2005 14:23:54 -0000 1.16 --- MeterPlot.java 10 Nov 2005 11:51:07 -0000 1.17 *************** *** 17,23 **** * License for more details. * ! * You should have received a copy of the GNU Lesser General Public License ! * along with this library; if not, write to the Free Software Foundation, ! * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. --- 17,24 ---- * License for more details. * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ! * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. *************** *** 74,77 **** --- 75,80 ---- * 20-Apr-2005 : Small update for change to LegendItem constructors (DG); * 08-Jun-2005 : Fixed equals() method to handle GradientPaint (DG); + * 10-Nov-2005 : Added tickPaint, tickSize and valuePaint attributes, and + * put value label drawing code into a separate method (DG); * */ *************** *** 117,120 **** --- 120,124 ---- import org.jfree.text.TextUtilities; import org.jfree.ui.RectangleInsets; + import org.jfree.ui.TextAnchor; import org.jfree.util.ObjectUtilities; import org.jfree.util.PaintUtilities; *************** *** 167,170 **** --- 171,180 ---- private Range range; + /** The tick size. */ + private double tickSize; + + /** The paint used to draw the ticks. */ + private Paint tickPaint; + /** The units displayed on the dial. */ private String units; *************** *** 191,194 **** --- 201,207 ---- private Font tickLabelFont; + /** The tick label paint. */ + private Paint tickLabelPaint; + /** The tick label format. */ private NumberFormat tickLabelFormat; *************** *** 222,229 **** --- 235,245 ---- this.meterAngle = DEFAULT_METER_ANGLE; this.range = new Range(0.0, 100.0); + this.tickSize = 10.0; + this.tickPaint = Color.white; this.units = "Units"; this.needlePaint = MeterPlot.DEFAULT_NEEDLE_PAINT; this.tickLabelsVisible = true; this.tickLabelFont = MeterPlot.DEFAULT_LABEL_FONT; + this.tickLabelPaint = Color.black; this.tickLabelFormat = NumberFormat.getInstance(); this.valueFont = MeterPlot.DEFAULT_VALUE_FONT; *************** *** 311,314 **** --- 327,376 ---- notifyListeners(new PlotChangeEvent(this)); } + + /** + * Returns the tick size (the interval between ticks on the dial). + * + * @return The tick size. + */ + public double getTickSize() { + return this.tickSize; + } + + /** + * Sets the tick size and sends a {@link PlotChangeEvent} to all + * registered listeners. + * + * @param size the tick size (must be > 0). + */ + public void setTickSize(double size) { + if (size <= 0) { + throw new IllegalArgumentException("Requires 'size' > 0."); + } + this.tickSize = size; + notifyListeners(new PlotChangeEvent(this)); + } + + /** + * Returns the paint used to draw the ticks around the dial. + * + * @return The paint used to draw the ticks around the dial (never + * <code>null</code>). + */ + public Paint getTickPaint() { + return this.tickPaint; + } + + /** + * Sets the paint used to draw the tick labels around the dial. + * + * @param paint the paint (<code>null</code> not permitted). + */ + public void setTickPaint(Paint paint) { + if (paint == null) { + throw new IllegalArgumentException("Null 'paint' argument."); + } + this.tickPaint = paint; + notifyListeners(new PlotChangeEvent(this)); + } /** *************** *** 403,406 **** --- 465,493 ---- /** + * Returns the tick label paint. + * + * @return The paint (never <code>null</code>). + */ + public Paint getTickLabelPaint() { + return this.tickLabelPaint; + } + + /** + * Sets the tick label paint and sends a {@link PlotChangeEvent} to all + * registered listeners. + * + * @param paint the paint (<code>null</code> not permitted). + */ + public void setTickLabelPaint(Paint paint) { + if (paint == null) { + throw new IllegalArgumentException("Null 'paint' argument."); + } + if (!this.tickLabelPaint.equals(paint)) { + this.tickLabelPaint = paint; + notifyListeners(new PlotChangeEvent(this)); + } + } + + /** * Returns the tick label format. * *************** *** 590,596 **** while (iterator.hasNext()) { MeterInterval mi = (MeterInterval) iterator.next(); LegendItem item = new LegendItem(mi.getLabel(), null, mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), ! mi.getOutlinePaint()); result.add(item); } --- 677,687 ---- while (iterator.hasNext()) { MeterInterval mi = (MeterInterval) iterator.next(); + Paint color = mi.getBackgroundPaint(); + if (color == null) { + color = mi.getOutlinePaint(); + } LegendItem item = new LegendItem(mi.getLabel(), null, mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), ! color); result.add(item); } *************** *** 721,728 **** if (n != null) { double value = n.doubleValue(); ! drawTick( ! g2, meterArea, value, true, this.valuePaint, true, ! getUnits() ! ); if (this.range.contains(value)) { --- 812,816 ---- if (n != null) { double value = n.doubleValue(); ! drawValueLabel(g2, meterArea); if (this.range.contains(value)) { *************** *** 806,811 **** ); } ! drawTick(g2, meterArea, minValue, true, outlinePaint); ! drawTick(g2, meterArea, maxValue, true, outlinePaint); } } --- 894,899 ---- ); } ! drawTick(g2, meterArea, minValue, true); ! drawTick(g2, meterArea, maxValue, true); } } *************** *** 855,861 **** * @param paint the background paint (<code>null</code> not permitted). */ ! private void fillArc(Graphics2D g2, Rectangle2D area, ! double minValue, double maxValue, Paint paint, ! boolean dial) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument"); --- 943,949 ---- * @param paint the background paint (<code>null</code> not permitted). */ ! protected void fillArc(Graphics2D g2, Rectangle2D area, ! double minValue, double maxValue, Paint paint, ! boolean dial) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument"); *************** *** 912,916 **** /** ! * Draws the 20 ticks that subdivide the overall range. * * @param g2 the graphics device. --- 1000,1004 ---- /** ! * Draws the ticks that subdivide the overall range. * * @param g2 the graphics device. *************** *** 921,927 **** protected void drawTicks(Graphics2D g2, Rectangle2D meterArea, double minValue, double maxValue) { ! int numberOfTicks = 20; ! double diff = (maxValue - minValue) / numberOfTicks; ! for (double v = minValue; v <= maxValue; v += diff) { drawTick(g2, meterArea, v); } --- 1009,1013 ---- protected void drawTicks(Graphics2D g2, Rectangle2D meterArea, double minValue, double maxValue) { ! for (double v = minValue; v <= maxValue; v += tickSize) { drawTick(g2, meterArea, v); } *************** *** 936,960 **** */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value) { ! drawTick(g2, meterArea, value, false, null, false, null); ! } ! ! /** ! * Draws a tick. ! * ! * @param g2 the graphics device. ! * @param meterArea the meter area. ! * @param value the value. ! * @param label display a label? ! * @param paint the paint. ! */ ! protected void drawTick(Graphics2D g2, Rectangle2D meterArea, double value, ! boolean label, Paint paint) { ! drawTick(g2, meterArea, value, label, paint, false, null); } /** ! * Draws a tick on the chart (also handles a special case [curValue=true] ! * that draws the value in the middle of the dial). * * @param g2 the graphics device. --- 1022,1031 ---- */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value) { ! drawTick(g2, meterArea, value, false); } /** ! * Draws a tick on the dial. * * @param g2 the graphics device. *************** *** 962,972 **** * @param value the tick value. * @param label a flag that controls whether or not a value label is drawn. - * @param labelPaint the label color. - * @param curValue a flag for the special case of the current value. - * @param units the unit-of-measure for the dial. */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value, boolean label, Paint labelPaint, ! boolean curValue, String units) { double valueAngle = valueToAngle(value); --- 1033,1039 ---- * @param value the tick value. * @param label a flag that controls whether or not a value label is drawn. */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value, boolean label) { double valueAngle = valueToAngle(value); *************** *** 975,982 **** double meterMiddleY = meterArea.getCenterY(); ! if (labelPaint == null) { ! labelPaint = Color.white; ! } ! g2.setPaint(labelPaint); g2.setStroke(new BasicStroke(2.0f)); --- 1042,1046 ---- double meterMiddleY = meterArea.getCenterY(); ! g2.setPaint(this.tickPaint); g2.setStroke(new BasicStroke(2.0f)); *************** *** 984,1026 **** double valueP2Y = 0; ! if (!curValue) { ! double radius = (meterArea.getWidth() / 2) + DEFAULT_BORDER_SIZE; ! double radius1 = radius - 15; ! double valueP1X = meterMiddleX + (radius * Math.cos(Math.PI * (valueAngle / 180))); ! double valueP1Y = meterMiddleY - (radius * Math.sin(Math.PI * (valueAngle / 180))); ! valueP2X = meterMiddleX ! + (radius1 * Math.cos(Math.PI * (valueAngle / 180))); ! valueP2Y = meterMiddleY ! - (radius1 * Math.sin(Math.PI * (valueAngle / 180))); ! Line2D.Double line = new Line2D.Double( ! valueP1X, valueP1Y, valueP2X, valueP2Y ! ); ! g2.draw(line); ! } ! else { ! valueP2X = meterMiddleX; ! valueP2Y = meterMiddleY; ! valueAngle = 90; ! } if (this.tickLabelsVisible && label) { String tickLabel = this.tickLabelFormat.format(value); ! if (curValue && units != null) { ! tickLabel += " " + units; ! } ! if (curValue) { ! g2.setFont(getValueFont()); ! } ! else { ! if (this.tickLabelFont != null) { ! g2.setFont(this.tickLabelFont); ! } ! } FontMetrics fm = g2.getFontMetrics(); --- 1048,1073 ---- double valueP2Y = 0; ! double radius = (meterArea.getWidth() / 2) + DEFAULT_BORDER_SIZE; ! double radius1 = radius - 15; ! double valueP1X = meterMiddleX + (radius * Math.cos(Math.PI * (valueAngle / 180))); ! double valueP1Y = meterMiddleY - (radius * Math.sin(Math.PI * (valueAngle / 180))); ! valueP2X = meterMiddleX ! + (radius1 * Math.cos(Math.PI * (valueAngle / 180))); ! valueP2Y = meterMiddleY ! - (radius1 * Math.sin(Math.PI * (valueAngle / 180))); ! Line2D.Double line = new Line2D.Double(valueP1X, valueP1Y, valueP2X, ! valueP2Y); ! g2.draw(line); if (this.tickLabelsVisible && label) { String tickLabel = this.tickLabelFormat.format(value); ! g2.setFont(this.tickLabelFont); ! g2.setPaint(this.tickLabelPaint); FontMetrics fm = g2.getFontMetrics(); *************** *** 1030,1036 **** double x = valueP2X; double y = valueP2Y; - if (curValue) { - y += DEFAULT_CIRCLE_SIZE; - } if (valueAngle == 90 || valueAngle == 270) { x = x - tickLabelBounds.getWidth() / 2; --- 1077,1080 ---- *************** *** 1049,1052 **** --- 1093,1119 ---- } } + + /** + * Draws the value label just below the center of the dial. + * + * @param g2 the graphics device. + * @param area the plot area. + */ + protected void drawValueLabel(Graphics2D g2, Rectangle2D area) { + g2.setFont(this.valueFont); + g2.setPaint(this.valuePaint); + String valueStr = "No value"; + if (dataset != null) { + Number n = dataset.getValue(); + if (n != null) { + valueStr = this.tickLabelFormat.format(n.doubleValue()) + " " + + this.units; + } + } + float x = (float) area.getCenterX(); + float y = (float) area.getCenterY() + DEFAULT_CIRCLE_SIZE; + TextUtilities.drawAlignedString(valueStr, g2, x, y, + TextAnchor.TOP_CENTER); + } /** *************** *** 1118,1121 **** --- 1185,1194 ---- return false; } + if (!PaintUtilities.equal(this.tickPaint, that.tickPaint)) { + return false; + } + if (this.tickSize != that.tickSize) { + return false; + } if (this.tickLabelsVisible != that.tickLabelsVisible) { return false; *************** *** 1124,1127 **** --- 1197,1203 ---- return false; } + if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) { + return false; + } if (!ObjectUtilities.equal(this.tickLabelFormat, that.tickLabelFormat)) { |
From: David G. <mu...@us...> - 2005-11-10 11:51:17
|
Update of /cvsroot/jfreechart/jfreechart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2449 Modified Files: ChangeLog Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use interval background paint, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Use new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case for current value, and the now redundant method parameters, (drawValueLabel): New method, (equals): Updated for new fields, * source/org/jfree/chart/plot/junit/MeterPlotTests.java: (testEquals): Updated for new fields. Index: ChangeLog =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/ChangeLog,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** ChangeLog 3 Nov 2005 13:23:54 -0000 1.42 --- ChangeLog 10 Nov 2005 11:51:07 -0000 1.43 *************** *** 1,2 **** --- 1,30 ---- + 2005-11-10 David Gilbert <dav...@ob...> + + * source/org/jfree/chart/plot/MeterPlot.java + (tickSize): New field, + (tickPaint): New field, + (tickLabelPaint): New field, + (MeterPlot(ValueDataset)): Initialise new fields, + (getTickSize): New method, + (setTickSize): New method, + (getTickPaint): New method, + (setTickPaint): New method, + (getTickLabelPaint): New method, + (setTickLabelPaint): New method, + (getLegendItems): Use interval background paint, + (draw): Call new drawValueLabel() method, + (drawArcForInterval): Updated for refactored methods, + (fillArc): Changed from private to protected, + (drawTicks): Use new tickSize field, + (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored + methods, + (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, + String)): Removed special case for current value, and the now + redundant method parameters, + (drawValueLabel): New method, + (equals): Updated for new fields, + * source/org/jfree/chart/plot/junit/MeterPlotTests.java: + (testEquals): Updated for new fields. + 2005-11-03 David Gilbert <dav...@ob...> |
From: David G. <mu...@us...> - 2005-11-10 11:20:07
|
Update of /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/junit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27066/source/org/jfree/chart/plot/junit Modified Files: Tag: STABLE_1-0-0 MeterPlotTests.java Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use background color for each interval, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Make use of new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case code for drawing the value label, and the now redundant parameters, replaced with drawValueLabel(), (drawValueLabel): New method, (equals): Updated for new fields. Index: MeterPlotTests.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/junit/MeterPlotTests.java,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** MeterPlotTests.java 25 Oct 2005 20:52:35 -0000 1.4.2.2 --- MeterPlotTests.java 10 Nov 2005 11:19:42 -0000 1.4.2.3 *************** *** 171,174 **** --- 171,180 ---- assertTrue(plot1.equals(plot2)); + // tick label paint + plot1.setTickLabelPaint(Color.red); + assertFalse(plot1.equals(plot2)); + plot2.setTickLabelPaint(Color.red); + assertTrue(plot1.equals(plot2)); + // tick label format plot1.setTickLabelFormat(new DecimalFormat("0")); *************** *** 177,180 **** --- 183,198 ---- assertTrue(plot1.equals(plot2)); + // tick paint + plot1.setTickPaint(Color.green); + assertFalse(plot1.equals(plot2)); + plot2.setTickPaint(Color.green); + assertTrue(plot1.equals(plot2)); + + // tick size + plot1.setTickSize(1.23); + assertFalse(plot1.equals(plot2)); + plot2.setTickSize(1.23); + assertTrue(plot1.equals(plot2)); + // draw border plot1.setDrawBorder(!plot1.getDrawBorder()); |
From: David G. <mu...@us...> - 2005-11-10 11:20:06
|
Update of /cvsroot/jfreechart/jfreechart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27066 Modified Files: Tag: STABLE_1-0-0 ChangeLog Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use background color for each interval, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Make use of new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case code for drawing the value label, and the now redundant parameters, replaced with drawValueLabel(), (drawValueLabel): New method, (equals): Updated for new fields. Index: ChangeLog =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/ChangeLog,v retrieving revision 1.1.2.21 retrieving revision 1.1.2.22 diff -C2 -d -r1.1.2.21 -r1.1.2.22 *** ChangeLog 3 Nov 2005 13:04:13 -0000 1.1.2.21 --- ChangeLog 10 Nov 2005 11:19:42 -0000 1.1.2.22 *************** *** 1,2 **** --- 1,28 ---- + 2005-11-10 David Gilbert <dav...@ob...> + + * source/org/jfree/chart/plot/MeterPlot.java + (tickSize): New field, + (tickPaint): New field, + (tickLabelPaint): New field, + (MeterPlot(ValueDataset)): Initialise new fields, + (getTickSize): New method, + (setTickSize): New method, + (getTickPaint): New method, + (setTickPaint): New method, + (getTickLabelPaint): New method, + (setTickLabelPaint): New method, + (getLegendItems): Use background color for each interval, + (draw): Call new drawValueLabel() method, + (drawArcForInterval): Updated for refactored methods, + (fillArc): Changed from private to protected, + (drawTicks): Make use of new tickSize field, + (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored + methods, + (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, + String)): Removed special case code for drawing the value label, and + the now redundant parameters, replaced with drawValueLabel(), + (drawValueLabel): New method, + (equals): Updated for new fields. + 2005-11-03 David Gilbert <dav...@ob...> *************** *** 4,8 **** (createDefaultPaintArray): removed orange color, fix for bug 1328408). ! 02-11-2005 David Gilbert <dav...@ob...> * source/org/jfree/data/time/Month.java --- 30,34 ---- (createDefaultPaintArray): removed orange color, fix for bug 1328408). ! 2005-11-02 David Gilbert <dav...@ob...> * source/org/jfree/data/time/Month.java *************** *** 10,14 **** bug 1345383. ! 02-11-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/ChartRenderingInfo.java --- 36,40 ---- bug 1345383. ! 2005-11-02 David Gilbert <dav...@ob...> * source/org/jfree/chart/ChartRenderingInfo.java *************** *** 21,25 **** (owner): removed transient keyword. ! 01-11-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/title/ImageTitle.java --- 47,51 ---- (owner): removed transient keyword. ! 2005-11-01 David Gilbert <dav...@ob...> * source/org/jfree/chart/title/ImageTitle.java *************** *** 33,37 **** (testWidthAndHeight): new method. ! 01-11-2005 David Gilbert <dav...@ob...> * ant/build.xml: exclude SunJPEGEncoderAdapter.java from the build if --- 59,63 ---- (testWidthAndHeight): new method. ! 2005-11-01 David Gilbert <dav...@ob...> * ant/build.xml: exclude SunJPEGEncoderAdapter.java from the build if *************** *** 43,47 **** (encode): use ImageIO, not com.sun.* classes. ! 01-11-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/HighLowRenderer.java --- 69,73 ---- (encode): use ImageIO, not com.sun.* classes. ! 2005-11-01 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/HighLowRenderer.java *************** *** 61,75 **** (testSerialization): updated for new fields. ! 01-11-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/HighLow.java: Removed unused class. ! 27-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/data/general/junit/DatasetUtilities.java (testIterateXYRangeBounds2): added API doc comment. ! 25-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/data/category/DefaultIntervalCategoryDataset.java --- 87,101 ---- (testSerialization): updated for new fields. ! 2005-11-01 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/HighLow.java: Removed unused class. ! 2005-10-27 David Gilbert <dav...@ob...> * source/org/jfree/data/general/junit/DatasetUtilities.java (testIterateXYRangeBounds2): added API doc comment. ! 2005-10-25 David Gilbert <dav...@ob...> * source/org/jfree/data/category/DefaultIntervalCategoryDataset.java *************** *** 89,98 **** (getRowKey(int)): likewise. ! 25-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/resources/JFreeChartResources.java (CONTENTS): updated 'project.version'. ! 25-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/Marker.java --- 115,124 ---- (getRowKey(int)): likewise. ! 2005-10-25 David Gilbert <dav...@ob...> * source/org/jfree/chart/resources/JFreeChartResources.java (CONTENTS): updated 'project.version'. ! 2005-10-25 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/Marker.java *************** *** 100,104 **** protected. ! 25-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/PolarPlot.java: now implements Zoomable --- 126,130 ---- protected. ! 2005-10-25 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/PolarPlot.java: now implements Zoomable *************** *** 123,142 **** (drawRadialGridLines): removed commented out code. ! 20-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/axis/TickUnits.java (getCeilingTickUnit): don't pass null to other method. ! 14-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/XYBarRenderer.java (drawItem): fixed bar coordinates to work with inverted axes. ! 14-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/ChartPanel.java (chartChanged): update plot orientation, it may have changed. ! 07-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/title/TextTitle.java --- 149,168 ---- (drawRadialGridLines): removed commented out code. ! 2005-10-25 David Gilbert <dav...@ob...> * source/org/jfree/chart/axis/TickUnits.java (getCeilingTickUnit): don't pass null to other method. ! 2005-10-14 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/XYBarRenderer.java (drawItem): fixed bar coordinates to work with inverted axes. ! 2005-10-14 David Gilbert <dav...@ob...> * source/org/jfree/chart/ChartPanel.java (chartChanged): update plot orientation, it may have changed. ! 2005-10-07 David Gilbert <dav...@ob...> * source/org/jfree/chart/title/TextTitle.java *************** *** 149,158 **** (testEquals): updated to include textAlignment. ! 06-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java (drawItem): removed setPaint() call. ! 06-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/data/junit/DefaultKeyedValues2DTests.java --- 175,184 ---- (testEquals): updated to include textAlignment. ! 2005-10-06 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java (drawItem): removed setPaint() call. ! 2005-10-06 David Gilbert <dav...@ob...> * source/org/jfree/data/junit/DefaultKeyedValues2DTests.java *************** *** 216,225 **** (testEquals): updated for method name change. ! 03-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java (drawItem): add an entity to the collection if supplied. ! 03-10-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/JFreeChart.java --- 242,251 ---- (testEquals): updated for method name change. ! 2005-10-03 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java (drawItem): add an entity to the collection if supplied. ! 2005-10-03 David Gilbert <dav...@ob...> * source/org/jfree/chart/JFreeChart.java *************** *** 227,231 **** return null (fixes bug 1306022). ! 30-09-2005 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/category/StackedBarRenderer.java --- 253,257 ---- return null (fixes bug 1306022). ! 2005-09-30 David Gilbert <dav...@ob...> * source/org/jfree/chart/renderer/category/StackedBarRenderer.java |
From: David G. <mu...@us...> - 2005-11-10 11:20:06
|
Update of /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27066/source/org/jfree/chart/plot Modified Files: Tag: STABLE_1-0-0 MeterPlot.java Log Message: 2005-11-10 David Gilbert <dav...@ob...> * source/org/jfree/chart/plot/MeterPlot.java (tickSize): New field, (tickPaint): New field, (tickLabelPaint): New field, (MeterPlot(ValueDataset)): Initialise new fields, (getTickSize): New method, (setTickSize): New method, (getTickPaint): New method, (setTickPaint): New method, (getTickLabelPaint): New method, (setTickLabelPaint): New method, (getLegendItems): Use background color for each interval, (draw): Call new drawValueLabel() method, (drawArcForInterval): Updated for refactored methods, (fillArc): Changed from private to protected, (drawTicks): Make use of new tickSize field, (drawTick(Graphics2D, Rectangle2D, double)): Updated for refactored methods, (drawTick(Graphics2D, Rectangle2D, double, boolean, Paint, boolean, String)): Removed special case code for drawing the value label, and the now redundant parameters, replaced with drawValueLabel(), (drawValueLabel): New method, (equals): Updated for new fields. Index: MeterPlot.java =================================================================== RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/MeterPlot.java,v retrieving revision 1.13.2.3 retrieving revision 1.13.2.4 diff -C2 -d -r1.13.2.3 -r1.13.2.4 *** MeterPlot.java 25 Oct 2005 20:52:07 -0000 1.13.2.3 --- MeterPlot.java 10 Nov 2005 11:19:42 -0000 1.13.2.4 *************** *** 76,79 **** --- 76,81 ---- * 05-May-2005 : Updated draw() method parameters (DG); * 08-Jun-2005 : Fixed equals() method to handle GradientPaint (DG); + * 10-Nov-2005 : Added tickPaint, tickSize and valuePaint attributes, and + * put value label drawing code into a separate method (DG); * */ *************** *** 116,119 **** --- 118,122 ---- import org.jfree.text.TextUtilities; import org.jfree.ui.RectangleInsets; + import org.jfree.ui.TextAnchor; import org.jfree.util.ObjectUtilities; import org.jfree.util.PaintUtilities; *************** *** 166,169 **** --- 169,178 ---- private Range range; + /** The tick size. */ + private double tickSize; + + /** The paint used to draw the ticks. */ + private Paint tickPaint; + /** The units displayed on the dial. */ private String units; *************** *** 193,196 **** --- 202,208 ---- private Font tickLabelFont; + /** The tick label paint. */ + private Paint tickLabelPaint; + /** The tick label format. */ private NumberFormat tickLabelFormat; *************** *** 224,231 **** --- 236,246 ---- this.meterAngle = DEFAULT_METER_ANGLE; this.range = new Range(0.0, 100.0); + this.tickSize = 10.0; + this.tickPaint = Color.white; this.units = "Units"; this.needlePaint = MeterPlot.DEFAULT_NEEDLE_PAINT; this.tickLabelsVisible = true; this.tickLabelFont = MeterPlot.DEFAULT_LABEL_FONT; + this.tickLabelPaint = Color.black; this.tickLabelFormat = NumberFormat.getInstance(); this.valueFont = MeterPlot.DEFAULT_VALUE_FONT; *************** *** 313,316 **** --- 328,377 ---- notifyListeners(new PlotChangeEvent(this)); } + + /** + * Returns the tick size (the interval between ticks on the dial). + * + * @return The tick size. + */ + public double getTickSize() { + return this.tickSize; + } + + /** + * Sets the tick size and sends a {@link PlotChangeEvent} to all + * registered listeners. + * + * @param size the tick size (must be > 0). + */ + public void setTickSize(double size) { + if (size <= 0) { + throw new IllegalArgumentException("Requires 'size' > 0."); + } + this.tickSize = size; + notifyListeners(new PlotChangeEvent(this)); + } + + /** + * Returns the paint used to draw the ticks around the dial. + * + * @return The paint used to draw the ticks around the dial (never + * <code>null</code>). + */ + public Paint getTickPaint() { + return this.tickPaint; + } + + /** + * Sets the paint used to draw the tick labels around the dial. + * + * @param paint the paint (<code>null</code> not permitted). + */ + public void setTickPaint(Paint paint) { + if (paint == null) { + throw new IllegalArgumentException("Null 'paint' argument."); + } + this.tickPaint = paint; + notifyListeners(new PlotChangeEvent(this)); + } /** *************** *** 405,408 **** --- 466,494 ---- /** + * Returns the tick label paint. + * + * @return The paint (never <code>null</code>). + */ + public Paint getTickLabelPaint() { + return this.tickLabelPaint; + } + + /** + * Sets the tick label paint and sends a {@link PlotChangeEvent} to all + * registered listeners. + * + * @param paint the paint (<code>null</code> not permitted). + */ + public void setTickLabelPaint(Paint paint) { + if (paint == null) { + throw new IllegalArgumentException("Null 'paint' argument."); + } + if (!this.tickLabelPaint.equals(paint)) { + this.tickLabelPaint = paint; + notifyListeners(new PlotChangeEvent(this)); + } + } + + /** * Returns the tick label format. * *************** *** 615,621 **** while (iterator.hasNext()) { MeterInterval mi = (MeterInterval) iterator.next(); LegendItem item = new LegendItem(mi.getLabel(), null, mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), ! mi.getOutlinePaint()); result.add(item); } --- 701,711 ---- while (iterator.hasNext()) { MeterInterval mi = (MeterInterval) iterator.next(); + Paint color = mi.getBackgroundPaint(); + if (color == null) { + color = mi.getOutlinePaint(); + } LegendItem item = new LegendItem(mi.getLabel(), null, mi.getLabel(), null, null, new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0), ! color); result.add(item); } *************** *** 720,727 **** if (n != null) { double value = n.doubleValue(); ! drawTick( ! g2, meterArea, value, true, this.valuePaint, true, ! getUnits() ! ); if (this.range.contains(value)) { --- 810,814 ---- if (n != null) { double value = n.doubleValue(); ! drawValueLabel(g2, meterArea); if (this.range.contains(value)) { *************** *** 808,813 **** ); } ! drawTick(g2, meterArea, minValue, true, outlinePaint); ! drawTick(g2, meterArea, maxValue, true, outlinePaint); } } --- 895,900 ---- ); } ! drawTick(g2, meterArea, minValue, true); ! drawTick(g2, meterArea, maxValue, true); } } *************** *** 857,863 **** * @param paint the background paint (<code>null</code> not permitted). */ ! private void fillArc(Graphics2D g2, Rectangle2D area, ! double minValue, double maxValue, Paint paint, ! boolean dial) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument"); --- 944,950 ---- * @param paint the background paint (<code>null</code> not permitted). */ ! protected void fillArc(Graphics2D g2, Rectangle2D area, ! double minValue, double maxValue, Paint paint, ! boolean dial) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument"); *************** *** 914,918 **** /** ! * Draws the 20 ticks that subdivide the overall range. * * @param g2 the graphics device. --- 1001,1005 ---- /** ! * Draws the ticks that subdivide the overall range. * * @param g2 the graphics device. *************** *** 923,929 **** protected void drawTicks(Graphics2D g2, Rectangle2D meterArea, double minValue, double maxValue) { ! int numberOfTicks = 20; ! double diff = (maxValue - minValue) / numberOfTicks; ! for (double v = minValue; v <= maxValue; v += diff) { drawTick(g2, meterArea, v); } --- 1010,1014 ---- protected void drawTicks(Graphics2D g2, Rectangle2D meterArea, double minValue, double maxValue) { ! for (double v = minValue; v <= maxValue; v += tickSize) { drawTick(g2, meterArea, v); } *************** *** 938,962 **** */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value) { ! drawTick(g2, meterArea, value, false, null, false, null); ! } ! ! /** ! * Draws a tick. ! * ! * @param g2 the graphics device. ! * @param meterArea the meter area. ! * @param value the value. ! * @param label display a label? ! * @param paint the paint. ! */ ! protected void drawTick(Graphics2D g2, Rectangle2D meterArea, double value, ! boolean label, Paint paint) { ! drawTick(g2, meterArea, value, label, paint, false, null); } /** ! * Draws a tick on the chart (also handles a special case [curValue=true] ! * that draws the value in the middle of the dial). * * @param g2 the graphics device. --- 1023,1032 ---- */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value) { ! drawTick(g2, meterArea, value, false); } /** ! * Draws a tick on the dial. * * @param g2 the graphics device. *************** *** 964,974 **** * @param value the tick value. * @param label a flag that controls whether or not a value label is drawn. - * @param labelPaint the label color. - * @param curValue a flag for the special case of the current value. - * @param units the unit-of-measure for the dial. */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value, boolean label, Paint labelPaint, ! boolean curValue, String units) { double valueAngle = valueToAngle(value); --- 1034,1040 ---- * @param value the tick value. * @param label a flag that controls whether or not a value label is drawn. */ protected void drawTick(Graphics2D g2, Rectangle2D meterArea, ! double value, boolean label) { double valueAngle = valueToAngle(value); *************** *** 977,984 **** double meterMiddleY = meterArea.getCenterY(); ! if (labelPaint == null) { ! labelPaint = Color.white; ! } ! g2.setPaint(labelPaint); g2.setStroke(new BasicStroke(2.0f)); --- 1043,1047 ---- double meterMiddleY = meterArea.getCenterY(); ! g2.setPaint(this.tickPaint); g2.setStroke(new BasicStroke(2.0f)); *************** *** 986,1028 **** double valueP2Y = 0; ! if (!curValue) { ! double radius = (meterArea.getWidth() / 2) + DEFAULT_BORDER_SIZE; ! double radius1 = radius - 15; ! double valueP1X = meterMiddleX + (radius * Math.cos(Math.PI * (valueAngle / 180))); ! double valueP1Y = meterMiddleY - (radius * Math.sin(Math.PI * (valueAngle / 180))); ! valueP2X = meterMiddleX ! + (radius1 * Math.cos(Math.PI * (valueAngle / 180))); ! valueP2Y = meterMiddleY ! - (radius1 * Math.sin(Math.PI * (valueAngle / 180))); ! Line2D.Double line = new Line2D.Double( ! valueP1X, valueP1Y, valueP2X, valueP2Y ! ); ! g2.draw(line); ! } ! else { ! valueP2X = meterMiddleX; ! valueP2Y = meterMiddleY; ! valueAngle = 90; ! } if (this.tickLabelsVisible && label) { String tickLabel = this.tickLabelFormat.format(value); ! if (curValue && units != null) { ! tickLabel += " " + units; ! } ! if (curValue) { ! g2.setFont(getValueFont()); ! } ! else { ! if (this.tickLabelFont != null) { ! g2.setFont(this.tickLabelFont); ! } ! } FontMetrics fm = g2.getFontMetrics(); --- 1049,1074 ---- double valueP2Y = 0; ! double radius = (meterArea.getWidth() / 2) + DEFAULT_BORDER_SIZE; ! double radius1 = radius - 15; ! double valueP1X = meterMiddleX + (radius * Math.cos(Math.PI * (valueAngle / 180))); ! double valueP1Y = meterMiddleY - (radius * Math.sin(Math.PI * (valueAngle / 180))); ! valueP2X = meterMiddleX ! + (radius1 * Math.cos(Math.PI * (valueAngle / 180))); ! valueP2Y = meterMiddleY ! - (radius1 * Math.sin(Math.PI * (valueAngle / 180))); ! Line2D.Double line = new Line2D.Double(valueP1X, valueP1Y, valueP2X, ! valueP2Y); ! g2.draw(line); if (this.tickLabelsVisible && label) { String tickLabel = this.tickLabelFormat.format(value); ! g2.setFont(this.tickLabelFont); ! g2.setPaint(this.tickLabelPaint); FontMetrics fm = g2.getFontMetrics(); *************** *** 1032,1038 **** double x = valueP2X; double y = valueP2Y; - if (curValue) { - y += DEFAULT_CIRCLE_SIZE; - } if (valueAngle == 90 || valueAngle == 270) { x = x - tickLabelBounds.getWidth() / 2; --- 1078,1081 ---- *************** *** 1051,1054 **** --- 1094,1120 ---- } } + + /** + * Draws the value label just below the center of the dial. + * + * @param g2 the graphics device. + * @param area the plot area. + */ + protected void drawValueLabel(Graphics2D g2, Rectangle2D area) { + g2.setFont(this.valueFont); + g2.setPaint(this.valuePaint); + String valueStr = "No value"; + if (dataset != null) { + Number n = dataset.getValue(); + if (n != null) { + valueStr = this.tickLabelFormat.format(n.doubleValue()) + " " + + this.units; + } + } + float x = (float) area.getCenterX(); + float y = (float) area.getCenterY() + DEFAULT_CIRCLE_SIZE; + TextUtilities.drawAlignedString(valueStr, g2, x, y, + TextAnchor.TOP_CENTER); + } /** *************** *** 1120,1123 **** --- 1186,1195 ---- return false; } + if (!PaintUtilities.equal(this.tickPaint, that.tickPaint)) { + return false; + } + if (this.tickSize != that.tickSize) { + return false; + } if (this.tickLabelsVisible != that.tickLabelsVisible) { return false; *************** *** 1126,1129 **** --- 1198,1204 ---- return false; } + if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) { + return false; + } if (!ObjectUtilities.equal(this.tickLabelFormat, that.tickLabelFormat)) { |
From: Taq <ta...@us...> - 2005-11-09 22:35:23
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32654/org/jfree/util Modified Files: ResourceBundleSupport.java Log Message: The ObjectUtilities must be used to load resources; or the user will not be able to override the classloader. Index: ResourceBundleSupport.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/util/ResourceBundleSupport.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ResourceBundleSupport.java 18 Oct 2005 13:24:19 -0000 1.7 --- ResourceBundleSupport.java 9 Nov 2005 22:35:13 -0000 1.8 *************** *** 385,389 **** public URL getResourceURL(final String key) { final String name = getString(key); ! final URL in = Thread.currentThread().getContextClassLoader().getResource(name); if (in == null) { Log.warn("Unable to find file in the class path: " + name + "; key=" + key); --- 385,389 ---- public URL getResourceURL(final String key) { final String name = getString(key); ! final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class); if (in == null) { Log.warn("Unable to find file in the class path: " + name + "; key=" + key); *************** *** 405,409 **** private ImageIcon createIcon(final String resourceName, final boolean scale, final boolean large) { ! final URL in = Thread.currentThread().getContextClassLoader().getResource(resourceName); if (in == null) { Log.warn("Unable to find file in the class path: " + resourceName); --- 405,409 ---- private ImageIcon createIcon(final String resourceName, final boolean scale, final boolean large) { ! final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class);; if (in == null) { Log.warn("Unable to find file in the class path: " + resourceName); |
From: Taq <ta...@us...> - 2005-11-09 20:47:27
|
Update of /cvsroot/jfreechart/jcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6416 Modified Files: CHANGELOG.txt README.txt Log Message: JCommon release now scheduled for friday. Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/jfreechart/jcommon/CHANGELOG.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** CHANGELOG.txt 2 Nov 2005 14:10:32 -0000 1.44 --- CHANGELOG.txt 9 Nov 2005 20:47:20 -0000 1.45 *************** *** 4,7 **** --- 4,17 ---- Please add new items at the top: + 09-Nov-2005 : [BUG] Fixed a compile error with JDK 1.2.2. An explict cast + was needed. (TM) + + The ANT-Script overwrote the build.properties file in + the generated distribution packages. (TM) + + Booting now initializes the correct classloader mode. + Logging is now disabled by default. Applications, which + need logging have to configure JCommon first. (TM) + 02-Nov-2005 : [BUG] Fixed a bug in the DateChooserPanel - see bug id 1344319 (DG); Index: README.txt =================================================================== RCS file: /cvsroot/jfreechart/jcommon/README.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** README.txt 3 Nov 2005 10:31:14 -0000 1.22 --- README.txt 9 Nov 2005 20:47:20 -0000 1.23 *************** *** 3,7 **** ******************************************** ! 4 November 2005. (C)opyright, 2000-2005, by Object Refinery Limited and Contributors. --- 3,7 ---- ******************************************** ! 11 November 2005. (C)opyright, 2000-2005, by Object Refinery Limited and Contributors. *************** *** 61,65 **** Changes in each version are listed here: ! 1.0.0 : (04-Nov-2005) This is the official 1.0.0 release. All future releases in the 1.0.x series will maintain backward compatibility with the 1.0.0 API. --- 61,65 ---- Changes in each version are listed here: ! 1.0.0 : (10-Nov-2005) This is the official 1.0.0 release. All future releases in the 1.0.x series will maintain backward compatibility with the 1.0.0 API. |
From: Taq <ta...@us...> - 2005-11-09 20:46:56
|
Update of /cvsroot/jfreechart/jcommon/source/com/keypoint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6316/com/keypoint Modified Files: PngEncoder.java Log Message: Fixed a compile error with JDK 1.2.2 - an explicit cast was needed here. Index: PngEncoder.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/com/keypoint/PngEncoder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PngEncoder.java 3 Nov 2005 09:54:44 -0000 1.7 --- PngEncoder.java 9 Nov 2005 20:46:46 -0000 1.8 *************** *** 81,85 **** protected static final byte[] IEND = {73, 69, 78, 68}; ! protected static final byte[] PHYS = {'p', 'H', 'Y', 's'}; /** The png bytes. */ --- 81,85 ---- protected static final byte[] IEND = {73, 69, 78, 68}; ! protected static final byte[] PHYS = {(byte)'p', (byte)'H', (byte)'Y', (byte)'s'}; /** The png bytes. */ |
From: Taq <ta...@us...> - 2005-11-09 20:46:25
|
Update of /cvsroot/jfreechart/jcommon/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6063 Modified Files: build.xml Log Message: Building distribution-packages overwrote the build.properties file with one of the maven-*.xml files due to an copy/paste error. Index: build.xml =================================================================== RCS file: /cvsroot/jfreechart/jcommon/ant/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** build.xml 3 Nov 2005 10:30:40 -0000 1.12 --- build.xml 9 Nov 2005 20:46:16 -0000 1.13 *************** *** 231,240 **** tofile="distribution/ant/build.properties"/> - <copy file="maven-jcommon-project.xml" - tofile="distribution/ant/build.properties"/> - - <copy file="maven-jcommon-xml-project.xml" - tofile="distribution/ant/build.properties"/> - <!-- copy across checkstyle property file --> <copy todir="distribution/checkstyle"> --- 231,234 ---- |
From: Taq <ta...@us...> - 2005-11-09 14:51:49
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32521/org/jfree/base Modified Files: BaseBoot.java Log Message: A Missing import. I should use an IDE instead of the console tools. Index: BaseBoot.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/base/BaseBoot.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BaseBoot.java 18 Oct 2005 13:13:58 -0000 1.7 --- BaseBoot.java 9 Nov 2005 14:47:54 -0000 1.8 *************** *** 47,51 **** import org.jfree.base.log.DefaultLogModule; import org.jfree.util.Configuration; ! import org.jfree.util.Log; /** --- 47,51 ---- import org.jfree.base.log.DefaultLogModule; import org.jfree.util.Configuration; ! import org.jfree.util.ObjectUtilities; /** *************** *** 117,120 **** --- 117,124 ---- */ protected void performBoot() { + // configure the classloader from the properties-file. + ObjectUtilities.setClassLoaderSource + (getConfiguration().getConfigProperty("org.jfree.ClassLoader")); + getPackageManager().addModule(DefaultLogModule.class.getName()); getPackageManager().load("org.jfree.base."); *************** *** 130,144 **** return this.bootableProjectInfo; } - - /** - * A test. Will print "hello world" using the debug log. - * - * @param args ignored. - */ - public static void main(final String[] args) { - //DefaultLog.getInstance(); - BaseBoot.getInstance().start(); - Log.debug("Hello world"); - } - } --- 134,136 ---- |
From: David G. <mu...@us...> - 2005-11-08 14:43:21
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/xml/writer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26605/source/org/jfree/xml/writer Modified Files: XMLWriter.java Log Message: Reinstated deprecated method for 1.0.0 release. Index: XMLWriter.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/xml/writer/XMLWriter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XMLWriter.java 2 Nov 2005 16:59:43 -0000 1.4 --- XMLWriter.java 8 Nov 2005 14:42:42 -0000 1.5 *************** *** 45,48 **** --- 45,49 ---- import java.io.IOException; import java.io.Writer; + import java.util.Properties; /** *************** *** 146,150 **** */ public void writeTag(final String name, final AttributeList attributes, ! final boolean close) throws IOException { writeTag(this.writer, name, attributes, close); } --- 147,165 ---- */ public void writeTag(final String name, final AttributeList attributes, ! final boolean close) throws IOException { ! writeTag(this.writer, name, attributes, close); ! } ! ! /** ! * Writes an opening XML tag along with a list of attribute/value pairs. ! * ! * @param name the tag name. ! * @param attributes the attributes. ! * @param close controls whether the tag is closed. ! * @throws java.io.IOException if there is an I/O problem. ! * @deprecated use the attribute list instead ... ! */ ! public void writeTag(final String name, final Properties attributes, ! final boolean close) throws IOException { writeTag(this.writer, name, attributes, close); } |
From: David G. <mu...@us...> - 2005-11-08 14:36:02
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/xml/writer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25240/source/org/jfree/xml/writer Modified Files: XMLWriterSupport.java Log Message: Reinstated deprecated method for 1.0.0 release. Index: XMLWriterSupport.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/xml/writer/XMLWriterSupport.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLWriterSupport.java 2 Nov 2005 17:00:23 -0000 1.5 --- XMLWriterSupport.java 8 Nov 2005 14:35:52 -0000 1.6 *************** *** 46,50 **** --- 46,52 ---- import java.io.IOException; import java.io.Writer; + import java.util.Enumeration; import java.util.Iterator; + import java.util.Properties; /** *************** *** 82,91 **** private String indentString; ! /** A flag indicating whether to force a linebreak before printing the next tag. */ private boolean newLineOk; /** ! * Default Constructor. The created XMLWriterSupport will not have no safe tags ! * and starts with an indention level of 0. */ public XMLWriterSupport() { --- 84,96 ---- private String indentString; ! /** ! * A flag indicating whether to force a linebreak before printing the next ! * tag. ! */ private boolean newLineOk; /** ! * Default Constructor. The created XMLWriterSupport will not have no safe ! * tags and starts with an indention level of 0. */ public XMLWriterSupport() { *************** *** 110,114 **** * @param indentString the indent string. */ ! public XMLWriterSupport(final SafeTagList safeTags, final int indentLevel, final String indentString) { if (indentString == null) { throw new NullPointerException("IndentString must not be null"); --- 115,120 ---- * @param indentString the indent string. */ ! public XMLWriterSupport(final SafeTagList safeTags, final int indentLevel, ! final String indentString) { if (indentString == null) { throw new NullPointerException("IndentString must not be null"); *************** *** 196,200 **** * @throws java.io.IOException if there is an I/O problem. */ ! public void writeCloseTag(final Writer w, final String tag) throws IOException { // check whether the tag contains CData - we ma not indent such tags if (this.newLineOk || getSafeTags().isSafeForOpen(tag)) { --- 202,207 ---- * @throws java.io.IOException if there is an I/O problem. */ ! public void writeCloseTag(final Writer w, final String tag) ! throws IOException { // check whether the tag contains CData - we ma not indent such tags if (this.newLineOk || getSafeTags().isSafeForOpen(tag)) { *************** *** 227,232 **** * @throws java.io.IOException if there is an I/O problem. */ ! public void writeTag(final Writer w, final String name, final String attributeName, final String attributeValue, ! final boolean close) throws IOException { final AttributeList attr = new AttributeList(); if (attributeName != null) { --- 234,240 ---- * @throws java.io.IOException if there is an I/O problem. */ ! public void writeTag(final Writer w, final String name, ! final String attributeName, final String attributeValue, ! final boolean close) throws IOException { final AttributeList attr = new AttributeList(); if (attributeName != null) { *************** *** 245,251 **** * * @throws java.io.IOException if there is an I/O problem. */ ! public void writeTag(final Writer w, final String name, final AttributeList attributes, final boolean close) ! throws IOException { if (this.newLineOk) { --- 253,283 ---- * * @throws java.io.IOException if there is an I/O problem. + * @deprecated use the attribute list instead of the properties. */ ! public void writeTag(final Writer w, final String name, ! final Properties attributes, final boolean close) ! throws IOException { ! final AttributeList attList = new AttributeList(); ! final Enumeration keys = attributes.keys(); ! while (keys.hasMoreElements()) { ! final String key = (String) keys.nextElement(); ! attList.setAttribute(key, attributes.getProperty(key)); ! } ! writeTag(w, name, attList, close); ! } ! ! /** ! * Writes an opening XML tag along with a list of attribute/value pairs. ! * ! * @param w the writer. ! * @param name the tag name. ! * @param attributes the attributes. ! * @param close controls whether the tag is closed. ! * ! * @throws java.io.IOException if there is an I/O problem. ! */ ! public void writeTag(final Writer w, final String name, ! final AttributeList attributes, final boolean close) ! throws IOException { if (this.newLineOk) { *************** *** 283,288 **** /** ! * Normalises a string, replacing certain characters with their escape sequences so that ! * the XML text is not corrupted. * * @param s the string. --- 315,320 ---- /** ! * Normalises a string, replacing certain characters with their escape ! * sequences so that the XML text is not corrupted. * * @param s the string. *************** *** 355,359 **** * @throws java.io.IOException if writing the stream failed. */ ! public void indent(final Writer writer, final int increase) throws IOException { if (increase == CLOSE_TAG_DECREASE) { decreaseIndent(); --- 387,392 ---- * @throws java.io.IOException if writing the stream failed. */ ! public void indent(final Writer writer, final int increase) ! throws IOException { if (increase == CLOSE_TAG_DECREASE) { decreaseIndent(); |
From: David G. <mu...@us...> - 2005-11-08 14:30:23
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/xml/factory/objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23898/source/org/jfree/xml/factory/objects Modified Files: DecimalFormatObjectDescription.java Log Message: Reinstated deprecated constructor for 1.0.0 release. Index: DecimalFormatObjectDescription.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/xml/factory/objects/DecimalFormatObjectDescription.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DecimalFormatObjectDescription.java 2 Nov 2005 17:01:05 -0000 1.3 --- DecimalFormatObjectDescription.java 8 Nov 2005 14:30:01 -0000 1.4 *************** *** 90,93 **** --- 90,105 ---- /** + * Creates a new object description. + * + * @param className the class. + * @param init initialise + * @deprecated should no longer be used... + */ + public DecimalFormatObjectDescription(final Class className, + final boolean init) { + this(className); + } + + /** * Sets the parameters of this description object to match the supplied object. * |
From: David G. <mu...@us...> - 2005-11-08 14:24:52
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/ui/about In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23074/source/org/jfree/ui/about Added Files: Library.java Log Message: Reinstated deprecated class for 1.0.0 release. --- NEW FILE: Library.java --- /* ======================================================================== * JCommon : a free general purpose class library for the Java(tm) platform * ======================================================================== * * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jcommon/index.html * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * ------------ * Library.java * ------------ * (C) Copyright 2001-2004, by Thomas Morgner. * * Original Author: Thomas Morgner; * Contributor(s): -; * * $Id: Library.java,v 1.5 2005/11/08 14:24:34 mungady Exp $ * * Changes * ------- * */ package org.jfree.ui.about; /** * Library specification moved to base package to allow more control * over the boot process. * * @author David Gilbert * @deprecated shadow class for deprecation */ public class Library extends org.jfree.base.Library { /** * Creates a new library reference. * * @param name the name. * @param version the version. * @param licence the licence. * @param info the web address or other info. */ public Library(final String name, final String version, final String licence, final String info) { super(name, version, licence, info); } /** * Constructs a library reference from a ProjectInfo object. * * @param project information about a project. */ public Library(final ProjectInfo project) { this(project.getName(), project.getVersion(), project.getLicenceName(), project.getInfo()); } } |
From: David G. <mu...@us...> - 2005-11-08 14:23:09
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/xml/factory/objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22629/source/org/jfree/xml/factory/objects Added Files: ClassComparator.java Log Message: Reinstated deprecated class for 1.0.0 release. --- NEW FILE: ClassComparator.java --- /* ======================================================================== * JCommon : a free general purpose class library for the Java(tm) platform * ======================================================================== * * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jcommon/index.html * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * -------------------- * ClassComparator.java * -------------------- * (C)opyright 2003, 2004, by Thomas Morgner and Contributors. * * Original Author: Thomas Morgner (ta...@sh...); * Contributor(s): David Gilbert (for Object Refinery Limited); * * $Id: ClassComparator.java,v 1.5 2005/11/08 14:22:04 mungady Exp $ * * Changes * ------- * 02-May-2003 : Initial version */ package org.jfree.xml.factory.objects; import java.io.Serializable; import java.util.Comparator; /** * The class comparator can be used to compare and sort classes and their * superclasses. The comparator is not able to compare classes which have * no relation... * * @author Thomas Morgner * @deprecated Moved to org.jfree.util */ public class ClassComparator implements Comparator, Serializable { /** * Defaultconstructor. */ public ClassComparator() { super(); } /** * Compares its two arguments for order. Returns a negative integer, * zero, or a positive integer as the first argument is less than, equal * to, or greater than the second.<p> * <P> * Note: throws ClassCastException if the arguments' types prevent them from * being compared by this Comparator. * And IllegalArgumentException if the classes share no relation. * * The implementor must ensure that <tt>sgn(compare(x, y)) == * -sgn(compare(y, x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This * implies that <tt>compare(x, y)</tt> must throw an exception if and only * if <tt>compare(y, x)</tt> throws an exception.)<p> * * The implementor must also ensure that the relation is transitive: * <tt>((compare(x, y)>0) && (compare(y, z)>0))</tt> implies * <tt>compare(x, z)>0</tt>.<p> * * Finally, the implementer must ensure that <tt>compare(x, y)==0</tt> * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all * <tt>z</tt>.<p> * * It is generally the case, but <i>not</i> strictly required that * <tt>(compare(x, y)==0) == (x.equals(y))</tt>. Generally speaking, * any comparator that violates this condition should clearly indicate * this fact. The recommended language is "Note: this comparator * imposes orderings that are inconsistent with equals." * * @param o1 the first object to be compared. * @param o2 the second object to be compared. * @return a negative integer, zero, or a positive integer as the * first argument is less than, equal to, or greater than the * second. */ public int compare(final Object o1, final Object o2) { final Class c1 = (Class) o1; final Class c2 = (Class) o2; if (c1.equals(o2)) { return 0; } if (c1.isAssignableFrom(c2)) { return -1; } else { if (!c2.isAssignableFrom(c2)) { throw new IllegalArgumentException("The classes share no relation"); } return 1; } } /** * Checks, whether the given classes are comparable. This method will * return true, if one of the classes is assignable from the other class. * * @param c1 the first class to compare * @param c2 the second class to compare * @return true, if the classes share a direct relation, false otherwise. */ public boolean isComparable(final Class c1, final Class c2) { return (c1.isAssignableFrom(c2) || c2.isAssignableFrom(c1)); } } |
From: David G. <mu...@us...> - 2005-11-08 14:17:02
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/xml/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21218/source/org/jfree/xml/parser Added Files: Base64ReadHandler.java Log Message: Reinstated deprecated class for 1.0.0 release. --- NEW FILE: Base64ReadHandler.java --- /* ======================================================================== * JCommon : a free general purpose class library for the Java(tm) platform * ======================================================================== * * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jcommon/index.html * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * ---------------------- * Base64ReadHandler.java * ---------------------- * (C)opyright 2003, 2004, by Thomas Morgner and Contributors. * * Original Author: Thomas Morgner; * Contributor(s): David Gilbert (for Object Refinery Limited); * * $Id: Base64ReadHandler.java,v 1.4 2005/11/08 14:16:51 mungady Exp $ * * Changes * ------- * 11-Feb-2004 : Added standard header and Javadocs (DG); * */ package org.jfree.xml.parser; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.xml.util.Base64; import org.xml.sax.SAXException; /** * A read handler for Base64 encoded elements. * * @deprecated base64 encoded elements are no longer supported ... */ public class Base64ReadHandler extends AbstractXmlReadHandler { /** The encoded object. */ private String encodedObject; /** * Creates a new handler. */ public Base64ReadHandler() { super(); } /** * Process character data. * * @param ch the character buffer. * @param start the start index. * @param length the number of characters. * * @throws SAXException ???. */ public void characters(final char[] ch, final int start, final int length) throws SAXException { this.encodedObject = new String(ch, start, length); } /** * Returns the object under construction. * * @return the object * * @throws XmlReaderException ???. */ public Object getObject() throws XmlReaderException { try { final byte[] bytes = Base64.decode(this.encodedObject.toCharArray()); final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes)); return in.readObject(); } catch (IOException e) { throw new XmlReaderException("Can't read class for <" + getTagName() + ">", e); } catch (ClassNotFoundException e) { throw new XmlReaderException("Class not found for <" + getTagName() + ">", e); } } } |
From: Taq <ta...@us...> - 2005-11-06 22:16:46
|
Update of /cvsroot/jfreechart/jcommon/source/org/jfree/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15632 Modified Files: ObjectUtilities.java Log Message: For the sake of completeness: Made the custom classloader accessible from outside. This way, a user can check whether a custom classloader is defined and can hook it into a chain of classloaders, if needed. Index: ObjectUtilities.java =================================================================== RCS file: /cvsroot/jfreechart/jcommon/source/org/jfree/util/ObjectUtilities.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ObjectUtilities.java 18 Oct 2005 13:24:19 -0000 1.11 --- ObjectUtilities.java 6 Nov 2005 22:16:38 -0000 1.12 *************** *** 235,238 **** --- 235,247 ---- /** + * Returns the custom classloader or null, if no custom classloader is defined. + * + * @return the custom classloader or null to use the default. + */ + public static ClassLoader getClassLoader() { + return classLoader; + } + + /** * Returns the classloader, which was responsible for loading the given * class. |