You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(95) |
Sep
(42) |
Oct
(2) |
Nov
(7) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(34) |
Mar
|
Apr
|
May
(64) |
Jun
(113) |
Jul
(60) |
Aug
(9) |
Sep
(6) |
Oct
(20) |
Nov
(11) |
Dec
|
From: Chris M. <ki...@us...> - 2004-06-14 05:00:09
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3692/src/java/org/krysalis/jcharts/properties Modified Files: StackedBarChartProperties.java Added Files: StackedBarChart3DProperties.java Log Message: 3D stacked bar chart functionality added --- NEW FILE: StackedBarChart3DProperties.java --- /*********************************************************************************************** * Copyright 2003 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: * * 1. Redistributions of source code must retain copyright * statements and notices. Redistributions must also contain a * copy of this document. * * 2. Redistributions in binary form must reproduce the * above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to * endorse or promote products derived from this Software without * prior written permission of Nathaniel G. Auvil. For written * permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" * nor may "jCharts" appear in their names without prior written * permission of Nathaniel G. Auvil. jCharts is a registered * trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project * (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.properties; /************************************************************************************* * * @author Steve Skillcorn/Chris McKay * @version $Id: StackedBarChart3DProperties.java,v 1.1 2004/06/14 04:59:59 kiwicmc Exp $ ************************************************************************************/ public final class StackedBarChart3DProperties extends StackedBarChartProperties { public static final float DEFAULT_DEPTH = 5; private float depth = DEFAULT_DEPTH; private float barWidth = -1; public void setDepth(float depth) { this.depth = depth; } public float getDepth() { return depth; } public void setBarWidth(float barWidth) { this.barWidth = barWidth; } public float getBarWidth() { return barWidth; } public boolean isBarWidthSet() { return barWidth != -1; } } Index: StackedBarChartProperties.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties/StackedBarChartProperties.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StackedBarChartProperties.java 17 May 2003 17:00:39 -0000 1.1 --- StackedBarChartProperties.java 14 Jun 2004 04:59:59 -0000 1.2 *************** *** 50,54 **** ! final public class StackedBarChartProperties extends BarChartProperties { --- 50,54 ---- ! public class StackedBarChartProperties extends BarChartProperties { |
From: Chris M. <ki...@us...> - 2004-06-14 04:59:19
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3118/src/java/org/krysalis/jcharts/axisChart Modified Files: AxisChart.java Added Files: StackedBarChart3D.java Log Message: 3D stacked bar chart functionality added --- NEW FILE: StackedBarChart3D.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.axisChart; import org.krysalis.jcharts.chartData.ChartDataException; import org.krysalis.jcharts.chartData.interfaces.IAxisChartDataSet; import org.krysalis.jcharts.imageMap.RectMapArea; import org.krysalis.jcharts.properties.DataAxisProperties; import org.krysalis.jcharts.properties.StackedBarChart3DProperties; import java.awt.*; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; /************************************************************************************* * * @author Steve Skillcorn/Chris McKay * @version $Id: StackedBarChart3D.java,v 1.1 2004/06/14 04:59:09 kiwicmc Exp $ ************************************************************************************/ abstract class StackedBarChart3D { /******************************************************************************************** * Draws the chart * * @param axisChart *********************************************************************************************/ static void render( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet ) throws ChartDataException { Graphics2D g2d = axisChart.getGraphics2D(); StackedBarChart3DProperties stackedBarChart3DProperties = (StackedBarChart3DProperties) iAxisChartDataSet.getChartTypeProperties(); float barWidth; //---y axis position on screen to start drawing. float startingX; float startingY; float width; float height; DataAxisProperties dataAxisProperties; if( axisChart.getAxisProperties().isPlotHorizontal() ) { dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getXAxisProperties(); barWidth = axisChart.getYAxis().getScalePixelWidth() * stackedBarChart3DProperties.getPercentage(); startingX = axisChart.getXAxis().getZeroLineCoordinate(); startingY = axisChart.getYAxis().getLastTickY() - (barWidth / 2); width = 0; height = barWidth; Rectangle2D.Float rectangle = new Rectangle2D.Float( startingX, startingY, width, height ); StackedBarChart3D.horizontalPlot( axisChart, iAxisChartDataSet, stackedBarChart3DProperties, dataAxisProperties, g2d, rectangle, startingX ); } else { dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties(); barWidth = axisChart.getXAxis().getScalePixelWidth() * stackedBarChart3DProperties.getPercentage(); startingX = axisChart.getXAxis().getTickStart() - (barWidth / 2); startingY = axisChart.getYAxis().getZeroLineCoordinate(); width = barWidth; height = 0; Rectangle2D.Float rectangle = new Rectangle2D.Float( startingX, startingY, width, height ); StackedBarChart3D.verticalPlot( axisChart, iAxisChartDataSet, stackedBarChart3DProperties, dataAxisProperties, g2d, rectangle, startingY ); } } /************************************************************************************** * * @param axisChart * @param iAxisChartDataSet * @param stackedBarChartProperties * @param dataAxisProperties * @param g2d * @param rectangle * @param startingX **************************************************************************************/ private static void horizontalPlot( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet, StackedBarChart3DProperties stackedBarChart3DProperties, DataAxisProperties dataAxisProperties, Graphics2D g2d, Rectangle2D.Float rectangle, float startingX ) throws ChartDataException { int imageMapLabelIndex = axisChart.getYAxis().getNumberOfScaleItems() - 1; //LOOP //---initial postion of each line. for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ ) { //---draw each bar in stack for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ ) { //---if segment has a zero value, draw nothing. if( iAxisChartDataSet.getValue( j, i ) == 0 ) { continue; } else if( iAxisChartDataSet.getValue( j, i ) < 0 ) { //todo i think we could support this, but it can wait throw new ChartDataException( "Negative values in Stacked Bar charts are not supported yet... Coming soon..." ); /* rectangle.x = axisChart.getXAxis().computeAxisCoordinate( axisChart.getXAxis().getOrigin(), iAxisChartDataSet.getValue( 0, i ), dataAxisProperties.getScaleCalculator().getMinValue() ); rectangle.width = startingX - rectangle.x; */ } else { rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getXAxis().getOneUnitPixelSize() ); //rectangle.x = startingX; //rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getXAxis().getOneUnitPixelSize() ); } g2d.setPaint( iAxisChartDataSet.getPaint( j ) ); g2d.fill( rectangle ); if( stackedBarChart3DProperties.getShowOutlinesFlag() ) { stackedBarChart3DProperties.getBarOutlineStroke().draw( g2d, rectangle ); } //---if we are generating an ImageMap, store the image coordinates if( axisChart.getGenerateImageMapFlag() ) { String label = null; if( axisChart.getYAxis().getAxisLabelsGroup() != null ) { label = axisChart.getYAxis().getAxisLabelsGroup().getTextTag( imageMapLabelIndex ).getText(); } /* TODO this fix to be added later for combo charts and the ability todetermine which image map relates to what DataSet RectMapArea area = new RectMapArea(rectangle, iAxisChartDataSet.getValue(j, i), label, iAxisChartDataSet.getLegendLabel(j)); int[] index = new int[2]; index[0] = j; index[1] = i; area.setIndex(index); area.setKey("StackedBarChart3D"); axisChart.getImageMap().addImageMapArea(area); */ } rectangle.x += rectangle.width; } imageMapLabelIndex--; rectangle.y += axisChart.getYAxis().getScalePixelWidth(); rectangle.x = startingX; } } /************************************************************************************** * * @param axisChart * @param iAxisChartDataSet * @param stackedBarChartProperties * @param dataAxisProperties * @param g2d * @param rectangle * @param startingY **************************************************************************************/ private static void verticalPlot( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet, StackedBarChart3DProperties stackedBarChart3DProperties, DataAxisProperties dataAxisProperties, Graphics2D g2d, Rectangle2D.Float rectangle, float startingY ) { //IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries(); //LOOP //---initial postion of each line. for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ ) { //---draw each bar in stack for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ ) { //---if segment has a zero value, draw nothing. if( iAxisChartDataSet.getValue( j, i ) == 0 ) { continue; } rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getYAxis().getOneUnitPixelSize() ); rectangle.y -= rectangle.height; draw3DRect(g2d, rectangle, iAxisChartDataSet.getPaint(j), stackedBarChart3DProperties); if( stackedBarChart3DProperties.getShowOutlinesFlag()) { stackedBarChart3DProperties.getBarOutlineStroke().draw( g2d, rectangle ); } //---if we are generating an ImageMap, store the image coordinates if( axisChart.getGenerateImageMapFlag() ) { String label = null; if( axisChart.getXAxis().getAxisLabelsGroup() != null ) { label = axisChart.getXAxis().getAxisLabelsGroup().getTextTag( i ).getText(); } /* TODO this fix to be added later for combo charts and the ability todetermine which image map relates to what DataSet a = new RectMapArea(rectangle, iAxisChartDataSet.getValue(j, i), label, iAxisChartDataSet.getLegendLabel(j)); int[] index = new int[2]; index[0] = j; index[1] = i; area.setIndex(index); area.setKey("StackedBarChart3D"); axisChart.getImageMap().addImageMapArea(area); */ } } rectangle.x += axisChart.getXAxis().getScalePixelWidth(); rectangle.y = startingY; } } private static void draw3DRect(Graphics2D g2d, Rectangle2D.Float rectangle, Paint paint, StackedBarChart3DProperties props) { GeneralPath poly; float x, y, depth, width, height, offset; Color color; //The rounding stops a lighter shade possibily appearing at the join of the //bar and the z axis side due to antialiasing at cross pixel points. x = Math.round(rectangle.x); width = Math.round(rectangle.width); y = rectangle.y; depth = props.getDepth(); height = rectangle.height; offset = depth; //The bar g2d.setPaint(paint); g2d.fill(new Rectangle2D.Float(x, y, width, height)); color = (Color) paint; g2d.setPaint(getTopColor(color)); //The top poly = new GeneralPath(); poly.moveTo(x, y); poly.lineTo(x + offset, y - offset); poly.lineTo(x + offset + width, y - offset); poly.lineTo(x + width, y); poly.closePath(); g2d.fill(poly); if (props.getShowOutlinesFlag()) { props.getBarOutlineStroke().draw(g2d, poly); } //The side g2d.setPaint(getBackColor(color)); poly = new GeneralPath(); poly.moveTo(x + width, y); poly.lineTo(x + width + offset, y - offset); poly.lineTo(x + width + offset, y - offset + height); poly.lineTo(x + width, y + height); poly.closePath(); g2d.fill(poly); if (props.getShowOutlinesFlag()) { props.getBarOutlineStroke().draw(g2d, poly); } if (props.getShowOutlinesFlag()) { props.getBarOutlineStroke().draw(g2d, new Rectangle2D.Float(x, y, width, height)); } } private static Color getTopColor(Color color) { double lightness = lightness(color); if (lightness >= 0.90) { return (darken(color.getRed(), color.getGreen(), color.getBlue(), 0.100)); } if (lightness <= 0.20) { return (lighten(color.getRed(), color.getGreen(), color.getBlue(), 0.600)); } return (lighten(color.getRed(), color.getGreen(), color.getBlue(), 0.600)); } public static Color getBackColor(Color color) { double lightness = lightness(color); if (color == null) { return null; } if (lightness >= 0.90) { return (darken(color.getRed(), color.getGreen(), color.getBlue(), 0.250)); } if (lightness <= 0.20) { return (lighten(color.getRed(), color.getGreen(), color.getBlue(), 0.200)); } return (darken(color.getRed(), color.getGreen(), color.getBlue(), 0.250)); } private static Color darken(int red, int green, int blue, double percent) throws IllegalArgumentException { return new Color(Math.max((int) (red * (1 - percent)), 0), Math.max((int) (green * (1 - percent)), 0), Math.max((int) (blue * (1 - percent)), 0)); } private static Color lighten(int red, int green, int blue, double percent) throws IllegalArgumentException { int adjustedRed, adjustedGreen, adjustedBlue; adjustedRed = red + (int) ((255 - red) * percent); adjustedGreen = green + (int) ((255 - green) * percent); adjustedBlue = blue + (int) ((255 - blue) * percent); return new Color(adjustedRed, adjustedGreen, adjustedBlue); } private static double lightness(Color color) { double red, green, blue, max, min; if (color == null) { return 0; } red = color.getRed(); green = color.getGreen(); blue = color.getBlue(); max = (Math.max(red, Math.max(green, blue)) / 255) / 2; min = (Math.min(red, Math.min(green, blue)) / 255) / 2; return (max + min); } } Index: AxisChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/AxisChart.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AxisChart.java 31 May 2004 16:23:46 -0000 1.7 --- AxisChart.java 14 Jun 2004 04:59:09 -0000 1.8 *************** *** 584,587 **** --- 584,593 ---- StackedBarChart.render( this, ( IAxisChartDataSet ) iAxisPlotDataSet ); } + iAxisPlotDataSet = this.iAxisDataSeries.getIAxisPlotDataSet( ChartType.BAR_STACKED_3D ); + if( iAxisPlotDataSet != null ) + { + StackedBarChart3D.render( this, ( IAxisChartDataSet ) iAxisPlotDataSet ); + } + iAxisPlotDataSet = this.iAxisDataSeries.getIAxisPlotDataSet( ChartType.BAR_CLUSTERED ); if( iAxisPlotDataSet != null ) |
From: Chris M. <ki...@us...> - 2004-06-14 03:36:19
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/resources/images/userGuide/axisCharts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22911/src/documentation/resources/images/userGuide/axisCharts Added Files: rotatedXAxisLabels.png Log Message: Sample image for Rotated X Axis Labels --- NEW FILE: rotatedXAxisLabels.png --- (This appears to be a binary file; contents omitted.) |
From: Chris M. <ki...@us...> - 2004-06-14 03:35:30
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/userGuide/axisCharts/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22405/src/documentation/content/xdocs/userGuide/axisCharts/common Modified Files: axisLabels.xml Log Message: Documentation of Rotated X Axis Labels and sample image, also add doco for vertical labels while I was there Index: axisLabels.xml =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/userGuide/axisCharts/common/axisLabels.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** axisLabels.xml 5 Jun 2004 13:30:06 -0000 1.1 --- axisLabels.xml 14 Jun 2004 03:35:16 -0000 1.2 *************** *** 16,26 **** <section> ! <title>Rotation</title> <p> </p> <source> </source> <figure src="images/userGuide/axisCharts/verticalXAxisLabels.png" alt="Label Rotation"/> </section> <section> --- 16,52 ---- <section> ! <title>Vertical X Axis Labels</title> <p> + By default, the X-Axis labels are rendered horizontally under the tick. This can be changed to vertical by using a + method on the AxisProperties Object. + </p> + <p> + The following example sets the x-axis labels to be rendered at an angle of 90 degrees. </p> <source> + axisProperties = new AxisProperties( false ); + axisProperties.setXAxisLabelsAreVertical( true ); </source> <figure src="images/userGuide/axisCharts/verticalXAxisLabels.png" alt="Label Rotation"/> </section> + <section> + <title>Rotated X Axis Labels</title> + <p> + By default, the X-Axis labels are rendered horizontally under the tick. This can be changed to an angle by using a + method on the AxisTypeProperties Object. The label is centered at the top middle of the text label. + </p> + <warning> + Note: The label rotation value must be between 0 and 90, the behaviour for angles greater or less + than this range is undefined + </warning> + <p> + The following example sets the x-axis labels to be rendered at an angle of 30 degrees. + </p> + <source> + AxisProperties axisProperties= new AxisProperties( false ); + axisProperties.getXAxisProperties().setLabelRotationAngle(30); + </source> + <figure src="images/userGuide/axisCharts/rotatedXAxisLabels.png" alt="X Axis Label Rotation"/> + </section> <section> |
From: Chris M. <ki...@us...> - 2004-06-14 01:24:27
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285/src/java/org/krysalis/jcharts/test Added Files: RotatedTextTestDriver.java Log Message: Addition of X axis label rotation functionality. New method added to AxisTypeProperties: e.g.: call with axisProperties.getXAxisProperties().setLabelRotationAngle(30); --- NEW FILE: RotatedTextTestDriver.java --- /*********************************************************************************************** * File Info: $Id: RotatedTextTestDriver.java,v 1.1 2004/06/14 01:24:16 kiwicmc Exp $ * Copyright (C) 2000 * Author: Nathaniel G. Auvil * Contributor(s): * * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: * * 1. Redistributions of source code must retain copyright * statements and notices. Redistributions must also contain a * copy of this document. * * 2. Redistributions in binary form must reproduce the * above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to * endorse or promote products derived from this Software without * prior written permission of Nathaniel G. Auvil. For written * permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" * nor may "jCharts" appear in their names without prior written * permission of Nathaniel G. Auvil. jCharts is a registered * trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project * (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. ************************************************************************************************/ package org.krysalis.jcharts.test; import org.krysalis.jcharts.axisChart.AxisChart; import org.krysalis.jcharts.chartData.*; import org.krysalis.jcharts.properties.*; import org.krysalis.jcharts.types.ChartType; import java.awt.*; /****************************************************************************************** * This file provides examples of how to create all the different chart types provided by * this package. * *******************************************************************************************/ class RotatedTextTestDriver extends AxisChartTestBase { boolean supportsImageMap() { return true; } /****************************************************************************************** * Separate this so can use for combo chart test * * @param numberOfDataSets ******************************************************************************************/ static ChartTypeProperties getChartTypeProperties( int numberOfDataSets ) { Stroke[] strokes = new Stroke[ numberOfDataSets ]; for( int j = 0; j < numberOfDataSets; j++ ) { strokes[ j ] = LineChartProperties.DEFAULT_LINE_STROKE; } strokes[ 0 ] = new BasicStroke( 3.0f ); Shape[] shapes = new Shape[ numberOfDataSets ]; for( int j = 0; j < numberOfDataSets; j++ ) { shapes[ j ] = PointChartProperties.SHAPE_DIAMOND; } shapes[ 0 ] = PointChartProperties.SHAPE_CIRCLE; return new LineChartProperties( strokes, shapes ); } /****************************************************************************************** * * ******************************************************************************************/ DataSeries getDataSeries() throws ChartDataException { DataSeries dataSeries; AxisChartDataSet axisChartDataSet; int dataSize = (int) TestDataGenerator.getRandomNumber( 3, 3 ); int numberOfDataSets = ( int ) TestDataGenerator.getRandomNumber( 1, 1 ); dataSeries = super.createDataSeries( dataSize ); axisChartDataSet = super.createAxisChartDataSet( ChartType.LINE, getChartTypeProperties( numberOfDataSets ), numberOfDataSets, dataSize, 10, 5000 ); dataSeries.addIAxisPlotDataSet( axisChartDataSet ); return dataSeries; } public static void main( String[] args ) throws ChartDataException, PropertyException { LineChartProperties lineChartProperties= (LineChartProperties) getChartTypeProperties( 1 ); double[][] data= { { 180, 16, 150, 90, 20, 64 } }; Paint[] paints= { Color.blue }; String[] legendLabels= { "Test Legend Label" }; AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.LINE, lineChartProperties ); String[] axisLabels= { "Mar 12", "Mar 13", "Mar 14", "Mar 15", "Mar 16", "Mar 17" }; DataSeries dataSeries = new DataSeries( axisLabels, "X-Axis Title", "Y-Axis Title", "Chart Title" ); dataSeries.addIAxisPlotDataSet( axisChartDataSet ); ChartProperties chartProperties= new ChartProperties(); AxisProperties axisProperties= new AxisProperties( false ); // label rotation only works where 0 < angle < 90 //axisProperties.getXAxisProperties().setLabelRotationAngle(0); axisProperties.getXAxisProperties().setLabelRotationAngle(10); //axisProperties.getXAxisProperties().setLabelRotationAngle(30); //axisProperties.getXAxisProperties().setLabelRotationAngle(45); //axisProperties.getXAxisProperties().setLabelRotationAngle(85); //axisProperties.getXAxisProperties().setLabelRotationAngle(90); //axisProperties.getXAxisProperties().setLabelRotationAngle(270); //axisProperties.getXAxisProperties().setLabelRotationAngle(130); DataAxisProperties yAxis= (DataAxisProperties) axisProperties.getYAxisProperties(); yAxis.setUserDefinedScale( 0, 50 ); yAxis.setNumItems( 5 ); yAxis.setRoundToNearest( 1 ); LegendProperties legendProperties= new LegendProperties(); AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 ); ChartTestDriver.exportImage( axisChart, "c:/temp/RotatedTextTest.png" ); } } |
From: Chris M. <ki...@us...> - 2004-06-14 01:24:25
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285/src/java/org/krysalis/jcharts/properties Modified Files: AxisTypeProperties.java Log Message: Addition of X axis label rotation functionality. New method added to AxisTypeProperties: e.g.: call with axisProperties.getXAxisProperties().setLabelRotationAngle(30); Index: AxisTypeProperties.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties/AxisTypeProperties.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AxisTypeProperties.java 27 Aug 2003 04:37:44 -0000 1.2 --- AxisTypeProperties.java 14 Jun 2004 01:24:16 -0000 1.3 *************** *** 98,101 **** --- 98,103 ---- private double maxRightAxis = 0; + private int labelRotationAngle = 0; + private ChartFont titleChartFont= ChartFont.DEFAULT_AXIS_TITLE; *************** *** 349,352 **** --- 351,367 ---- + public int getLabelRotationAngle() + { + return this.labelRotationAngle; + } + + + public void setLabelRotationAngle( int labelRotationAngle ) + { + this.labelRotationAngle = labelRotationAngle; + } + + + /********************************************************************************************* * Enables the testing routines to display the contents of this Object. |
From: Chris M. <ki...@us...> - 2004-06-14 01:24:25
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285/src/java/org/krysalis/jcharts/axisChart/axis Modified Files: XAxis.java Log Message: Addition of X axis label rotation functionality. New method added to AxisTypeProperties: e.g.: call with axisProperties.getXAxisProperties().setLabelRotationAngle(30); Index: XAxis.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis/XAxis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XAxis.java 29 Jun 2003 14:14:28 -0000 1.3 --- XAxis.java 14 Jun 2004 01:24:15 -0000 1.4 *************** *** 47,50 **** --- 47,51 ---- import java.awt.*; import java.awt.geom.Line2D; + import java.awt.geom.AffineTransform; import java.lang.reflect.Field; import java.util.Iterator; *************** *** 99,108 **** else { ! //---tallest label for horizontal labels ! //heightNeeded = axisChartDataProcessor.getAxisLabelProcessor().getTallestLabel(); ! heightNeeded = super.getAxisLabelsGroup().getTallestLabel(); ! //---not sure why i need more padding ! heightNeeded += 3; } } --- 100,122 ---- else { ! if ( axisTypeProperties.getLabelRotationAngle() != 0 ) ! { // heightNeeded is calculated for positioning X axis title ! //---widest label for rotated labels converted to vertical distance ! // A special thanks to the Oswego School District maths prep exam web page (http://regentsprep.org/Regents/math/rtritrig/Ltrig.htm) ! heightNeeded = super.getAxisLabelsGroup().getWidestLabel() ! * (float)Math.abs(Math.sin(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); ! // height is currently at top of characters calculate vertical for text height ! heightNeeded += super.getAxisLabelsGroup().getTallestLabel() ! * (float)Math.abs(Math.cos(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); ! } ! else ! { ! //---tallest label for horizontal labels ! //heightNeeded = axisChartDataProcessor.getAxisLabelProcessor().getTallestLabel(); ! heightNeeded = super.getAxisLabelsGroup().getTallestLabel(); ! //---not sure why i need more padding ! heightNeeded += 3; ! } } } *************** *** 257,261 **** /********************************************************************************************* ! * Renders the YAxis on the passes Graphics2D object * * @param graphics2D --- 271,275 ---- /********************************************************************************************* ! * Renders the XAxis on the passed Graphics2D object * * @param graphics2D *************** *** 298,303 **** if( !axisProperties.xAxisLabelsAreVertical() ) { ! stringY += super.getAxisLabelsGroup().getTallestLabel(); ! graphics2D.setFont( axisTypeProperties.getScaleChartFont().getFont() ); } else --- 312,328 ---- if( !axisProperties.xAxisLabelsAreVertical() ) { ! if ( axisTypeProperties.getLabelRotationAngle() != 0 ) ! { ! stringY += super.getAxisLabelsGroup().getWidestLabel() ! * (float)Math.abs(Math.sin(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); // Find the vertical drop of the tallest text label ! stringY += super.getAxisLabelsGroup().getTallestLabel() ! * (float)Math.abs(Math.cos(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); ! graphics2D.setFont( axisTypeProperties.getScaleChartFont().getFont() ); ! } ! else ! { ! stringY += super.getAxisLabelsGroup().getTallestLabel(); ! graphics2D.setFont( axisTypeProperties.getScaleChartFont().getFont() ); ! } } else *************** *** 357,367 **** if( !axisProperties.xAxisLabelsAreVertical() ) { ! //graphics2D.drawString( iDataSeries.getXAxisLabel( i ), stringX - super.getAxisLabelsGroup().getTextTag( i ).getWidth() / 2, stringY ); ! float x = stringX - super.getAxisLabelsGroup().getTextTag( i ).getWidth() / 2; ! //---we can not only look at the last label as there could be a filter and labels near the last might go off the edge of the screen. ! if( x + super.getAxisLabelsGroup().getTextTag( i ).getWidth() < super.getAxisChart().getImageWidth() ) { ! super.getAxisLabelsGroup().getTextTag( i ).render( graphics2D, x, stringY ); } } --- 382,419 ---- if( !axisProperties.xAxisLabelsAreVertical() ) { ! if ( axisTypeProperties.getLabelRotationAngle() != 0) ! { ! // x1 is the 1/2 the horizontal width of the rotated label ! float x1 = (super.getAxisLabelsGroup().getTextTag( i ).getWidth() / 2) * (float)Math.abs(Math.cos(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); ! //---we can not only look at the last label as there could be a filter and labels near the last might go off the edge of the screen. ! if( stringX + x1 < super.getAxisChart().getImageWidth() ) ! { ! //---get the original transform so we can reset it. ! AffineTransform originalTransform=graphics2D.getTransform(); ! // Position to tick mark and down the required height, then back half the horizontal label width ! // calculate the X coord to center the top of the label text to the axis tick as opposed to the bottom ! // x2 takes this into account ! float x2 = super.getAxisLabelsGroup().getTextTag( i ).getFontDescent() * (float)Math.abs(Math.sin(Math.toRadians(axisTypeProperties.getLabelRotationAngle()))); ! graphics2D.translate(stringX - x1 + x2, stringY); ! // rotate entire context ! graphics2D.rotate(Math.toRadians(-axisTypeProperties.getLabelRotationAngle())); ! // draw the label text ! super.getAxisLabelsGroup().getTextTag( i ).render( graphics2D, 0, 0 ); ! ! //---translate back to the original position ! graphics2D.setTransform( originalTransform ); ! } ! } ! else { ! //graphics2D.drawString( iDataSeries.getXAxisLabel( i ), stringX - super.getAxisLabelsGroup().getTextTag( i ).getWidth() / 2, stringY ); ! float x = stringX - super.getAxisLabelsGroup().getTextTag( i ).getWidth() / 2; ! ! //---we can not only look at the last label as there could be a filter and labels near the last might go off the edge of the screen. ! if( x + super.getAxisLabelsGroup().getTextTag( i ).getWidth() < super.getAxisChart().getImageWidth() ) ! { ! super.getAxisLabelsGroup().getTextTag( i ).render( graphics2D, x, stringY ); ! } } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:06:27
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12943/src/java/org/krysalis/jcharts/properties Modified Files: LegendAreaProperties.java Log Message: Index: LegendAreaProperties.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties/LegendAreaProperties.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LegendAreaProperties.java 1 Jun 2003 05:23:05 -0000 1.2 --- LegendAreaProperties.java 10 Jun 2004 12:03:52 -0000 1.3 *************** *** 1,8 **** /*********************************************************************************************** - * File Info: $Id$ - * Copyright (C) 2002 - * Author: Nathaniel G. Auvil - * Contributor(s): Sandor Dornbush - * * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * --- 1,3 ---- *************** *** 38,42 **** ************************************************************************************************/ - package org.krysalis.jcharts.properties; --- 33,36 ---- *************** *** 46,49 **** --- 40,48 ---- + /*************************************************************************** + * + * @author Nathaniel Auvil, Sandor Dornbush + * @version $Id$ + ***************************************************************************/ abstract public class LegendAreaProperties extends AreaProperties implements HTMLTestable { *************** *** 55,59 **** public static final int BOTTOM = 0; public static final int RIGHT = 1; ! public static final int LEFT = 2; public static final int TOP = 3; --- 54,58 ---- public static final int BOTTOM = 0; public static final int RIGHT = 1; ! public static final int LEFT = 2; public static final int TOP = 3; |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:05:25
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12943/src/java/org/krysalis/jcharts/designer Modified Files: Designer.java Log Message: Index: Designer.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/Designer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Designer.java 9 Jun 2004 01:46:26 -0000 1.3 --- Designer.java 10 Jun 2004 12:03:52 -0000 1.4 *************** *** 71,75 **** { super( TITLE ); ! this.designerPieChart = new DesignerPieChart( 450, 450 ); --- 71,76 ---- { super( TITLE ); ! ! this.designerPieChart = new DesignerPieChart( 450, 450 ); *************** *** 93,99 **** this.pack(); ! this.setVisible( true ); ! super.setBounds( 30, 30, 600, 600 ); } --- 94,101 ---- this.pack(); ! this.setVisible( true ); super.setBounds( 30, 30, 600, 600 ); + + this.refreshChart(); } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:05:12
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12943/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties Modified Files: LegendPropertiesTab.java Padding.java Added Files: PlacementCombo.java Log Message: Index: LegendPropertiesTab.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties/LegendPropertiesTab.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LegendPropertiesTab.java 9 Jun 2004 01:46:53 -0000 1.1 --- LegendPropertiesTab.java 10 Jun 2004 12:03:51 -0000 1.2 *************** *** 46,50 **** import org.krysalis.jcharts.designer.common.stroke.StrokeChooser; import org.krysalis.jcharts.designer.exceptions.DesignerException; - import org.krysalis.jcharts.designer.tabs.allChart.items.EdgePadding; import org.krysalis.jcharts.properties.LegendProperties; import org.krysalis.jcharts.properties.util.ChartStroke; --- 46,49 ---- *************** *** 69,74 **** //private int iconLineStrokeLength = 20; ! //---where Legend should be drawn in relation to the chart. ! //private int placement = BOTTOM; --- 68,72 ---- //private int iconLineStrokeLength = 20; ! private PlacementCombo placementCombo; *************** *** 101,104 **** --- 99,110 ---- jPanel.add( this.iconBorderStroke ); + + JPanel placement= new JPanel(); + placement.setBorder( BorderFactory.createTitledBorder( "Placement" ) ); + this.placementCombo= new PlacementCombo(); + placement.add( this.placementCombo ); + jPanel.add( placement ); + + super.setViewportView( jPanel ); } *************** *** 126,129 **** --- 132,137 ---- legendProperties.setIconBorderStroke( chartStroke.getStroke() ); legendProperties.setIconBorderPaint( chartStroke.getPaint() ); + + legendProperties.setPlacement( this.placementCombo.getSelectedIndex() ); } } --- NEW FILE: PlacementCombo.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.designer.tabs.allChart.legendProperties; import org.krysalis.jcharts.designer.common.LabelledCombo; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: PlacementCombo.java,v 1.1 2004/06/10 12:03:51 nathaniel_auvil Exp $ ****************************************************************************************/ class PlacementCombo extends LabelledCombo { private static String[] ALL_PLACEMENTS; static { ALL_PLACEMENTS = new String[] { "Bottom", "Right", "Left", "Top" }; } /*************************************************************************************** * **************************************************************************************/ public PlacementCombo() { super( "Placement", ALL_PLACEMENTS ); } } Index: Padding.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties/Padding.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Padding.java 9 Jun 2004 01:46:53 -0000 1.1 --- Padding.java 10 Jun 2004 12:03:51 -0000 1.2 *************** *** 71,75 **** this.column = new LabelledTextfield( "Column", 3 ); ! this.column.setText( Float.toString( 5 ) ); this.add( this.column ); --- 71,75 ---- this.column = new LabelledTextfield( "Column", 3 ); ! this.column.setText( Float.toString( 10 ) ); this.add( this.column ); |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:04:27
|
Update of /cvsroot/jcharts/krysalis-jcharts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13281 Modified Files: status.xml Log Message: Index: status.xml =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/status.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** status.xml 27 May 2004 02:55:21 -0000 1.19 --- status.xml 10 Jun 2004 12:04:18 -0000 1.20 *************** *** 10,24 **** <actions priority="high"> <action context="feedback" dev="nathaniel_auvil"> ! Mail <link href="mailto:jch...@li...">jch...@li...</link> with feedback. ! </action> ! <action context="docs" dev="nathaniel_auvil"> ! Update the Krysalis site to include links to the new site. </action> <action context="docs" dev="nathaniel_auvil"> Get the User Guide into Forrest. </action> - <action context="code" dev="nathaniel_auvil"> - Finish the PieChart3D code and do more testing. - </action> <action context="admin" dev="nathaniel_auvil"> Get 1.0.0 out!!!!!!!! --- 10,18 ---- <actions priority="high"> <action context="feedback" dev="nathaniel_auvil"> ! Mail <link href="mailto:jch...@li...">jch...@li...</link> with feedback. </action> <action context="docs" dev="nathaniel_auvil"> Get the User Guide into Forrest. </action> <action context="admin" dev="nathaniel_auvil"> Get 1.0.0 out!!!!!!!! *************** *** 45,51 **** </todo> ! <changes> ! <!-- Add new releases here --> ! <release version="1.0.0 (current CVS)" date="2004"> <!-- Some action types have associated images. By default, images are defined for 'add', 'fix', 'remove' and 'update'. If you add --- 39,44 ---- </todo> ! <changes> ! <release version="1.0.0 alpha 2 (current CVS)" date="2004"> <!-- Some action types have associated images. By default, images are defined for 'add', 'fix', 'remove' and 'update'. If you add *************** *** 53,56 **** --- 46,55 ---- automatically be used for entries of type <foo>. --> + <action dev="nathaniel_auvil" type="fix" context="code"> + <code>PieChart2D</code> was not rendering correctly when Legend was placed on the LEFT side. + </action> + </release> + + <release version="1.0.0 alpha 1" date="5-31-2004"> <action dev="nathaniel_auvil" type="update" context="admin"> Initial Import of the <code>krysalis-jcharts</code> CVS module. *************** *** 96,101 **** <action dev="nathaniel_auvil" type="add" context="code"> <code>BarChart</code> Image Map will now include zero values provided zero is displayed on the axis scale. ! </action> ! </release> --- 95,99 ---- <action dev="nathaniel_auvil" type="add" context="code"> <code>BarChart</code> Image Map will now include zero values provided zero is displayed on the axis scale. ! </action> </release> |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:04:00
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/nonAxisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12943/src/java/org/krysalis/jcharts/nonAxisChart Modified Files: PieChart2D.java Log Message: Index: PieChart2D.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/nonAxisChart/PieChart2D.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PieChart2D.java 31 May 2003 18:17:32 -0000 1.7 --- PieChart2D.java 10 Jun 2004 12:03:51 -0000 1.8 *************** *** 195,204 **** { legendX = halfImageWidth - ( plotWidth / 2 ); if( this.pieLabels != null ) { - this.pieX = legendX; - this.pieX += this.getLegend().getWidth(); - this.pieX += this.getLegend().getLegendProperties().getChartPadding(); this.pieX += this.pieLabels.getWidestLabel(); this.pieX += properties.getTickLength(); --- 195,204 ---- { legendX = halfImageWidth - ( plotWidth / 2 ); + this.pieX = legendX; + this.pieX += this.getLegend().getWidth(); + this.pieX += this.getLegend().getLegendProperties().getChartPadding(); if( this.pieLabels != null ) { this.pieX += this.pieLabels.getWidestLabel(); this.pieX += properties.getTickLength(); |
From: Nathaniel G. A. <nat...@us...> - 2004-06-10 12:04:00
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12943/src/java/org/krysalis/jcharts/test Modified Files: PieTestDriver.java Log Message: Index: PieTestDriver.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test/PieTestDriver.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PieTestDriver.java 8 Aug 2003 08:51:27 -0000 1.4 --- PieTestDriver.java 10 Jun 2004 12:03:51 -0000 1.5 *************** *** 91,95 **** TestDataGenerator.randomizeLegend( legendProperties ); //legendProperties.setBorderStroke( new BasicStroke( 2.0f ) ); ! chartProperties = new ChartProperties(); //areaProperties.setEdgePadding( (int) TestDataGenerator.getRandomNumber( 0, 50 ) ); --- 91,96 ---- TestDataGenerator.randomizeLegend( legendProperties ); //legendProperties.setBorderStroke( new BasicStroke( 2.0f ) ); ! legendProperties.setPlacement( LegendProperties.LEFT ); ! chartProperties = new ChartProperties(); //areaProperties.setEdgePadding( (int) TestDataGenerator.getRandomNumber( 0, 50 ) ); |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:08
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties Added Files: LegendPropertiesTab.java Padding.java Log Message: --- NEW FILE: LegendPropertiesTab.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.designer.tabs.allChart.legendProperties; import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import org.krysalis.jcharts.designer.common.paint.PaintChooser; import org.krysalis.jcharts.designer.common.stroke.StrokeChooser; import org.krysalis.jcharts.designer.exceptions.DesignerException; import org.krysalis.jcharts.designer.tabs.allChart.items.EdgePadding; import org.krysalis.jcharts.properties.LegendProperties; import org.krysalis.jcharts.properties.util.ChartStroke; /************************************************************************************* * * @author Nathaniel Auvil * @version $Id: LegendPropertiesTab.java,v 1.1 2004/06/09 01:46:53 nathaniel_auvil Exp $ ************************************************************************************/ public class LegendPropertiesTab extends JScrollPane { private StrokeChooser borderStroke; private Padding padding; private PaintChooser backgroundPaint; private StrokeChooser iconBorderStroke; //private int numColumns = COLUMNS_AS_MANY_AS_NEEDED; //---for LineCharts, length of line around point shapes as part of the icon in the legend. //---for example, ---o---. here iconLineStrokeLength is the length of --- on either sides of 'o' //private int iconLineStrokeLength = 20; //---where Legend should be drawn in relation to the chart. //private int placement = BOTTOM; /************************************************************************************ * ***********************************************************************************/ public LegendPropertiesTab() { JPanel jPanel= new JPanel(); BoxLayout boxLayout= new BoxLayout( jPanel, BoxLayout.Y_AXIS ); jPanel.setLayout( boxLayout ); this.borderStroke= new StrokeChooser( "Border Stroke" ); this.borderStroke.setWidth( 1.0f ); jPanel.add( this.borderStroke ); this.padding= new Padding(); jPanel.add( this.padding ); JPanel background= new JPanel(); background.setBorder( BorderFactory.createTitledBorder( "Background Paint" ) ); this.backgroundPaint= new PaintChooser( false, Color.white, Color.black ); background.add( this.backgroundPaint ); jPanel.add( background ); this.iconBorderStroke= new StrokeChooser( "Icon Border Stroke" ); this.iconBorderStroke.setWidth( 1.0f ); jPanel.add( this.iconBorderStroke ); super.setViewportView( jPanel ); } /****************************************************************** * * @param legendProperties * @throws DesignerException *****************************************************************/ public void updateChartProperties( LegendProperties legendProperties ) throws DesignerException { legendProperties.setBorderStroke( this.borderStroke.getChartStroke() ); legendProperties.setRowPadding( (int) this.padding.getRowPadding() ); legendProperties.setColumnPadding( (int) this.padding.getColumnPadding() ); legendProperties.setIconPadding( (int) this.padding.getIconPadding() ); legendProperties.setChartPadding( (int) this.padding.getChartPadding() ); legendProperties.setEdgePadding( this.padding.getEdgePadding() ); legendProperties.setBackgroundPaint( this.backgroundPaint.getPaint() ); //TODO how to display a NULL Background Paint? ChartStroke chartStroke= this.iconBorderStroke.getChartStroke(); legendProperties.setIconBorderStroke( chartStroke.getStroke() ); legendProperties.setIconBorderPaint( chartStroke.getPaint() ); } } --- NEW FILE: Padding.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.designer.tabs.allChart.legendProperties; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; import org.krysalis.jcharts.designer.common.LabelledTextfield; import org.krysalis.jcharts.designer.exceptions.DesignerException; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: Padding.java,v 1.1 2004/06/09 01:46:53 nathaniel_auvil Exp $ ****************************************************************************************/ public class Padding extends JPanel { private LabelledTextfield row; private LabelledTextfield column; private LabelledTextfield icon; private LabelledTextfield chart; private LabelledTextfield edge; /*************************************************************************************** * **************************************************************************************/ public Padding() { super.setBorder( BorderFactory.createTitledBorder( "Padding" ) ); this.setLayout( new BoxLayout( this, BoxLayout.X_AXIS ) ); this.row = new LabelledTextfield( "Row",3 ); this.row.setText( Float.toString( 5 ) ); this.add( this.row ); this.column = new LabelledTextfield( "Column", 3 ); this.column.setText( Float.toString( 5 ) ); this.add( this.column ); this.icon = new LabelledTextfield( "Icon", 3 ); this.icon.setText( Float.toString( 5 ) ); this.add( this.icon ); this.chart = new LabelledTextfield( "Chart", 3 ); this.chart.setText( Float.toString( 5 ) ); this.add( this.chart ); this.edge = new LabelledTextfield( "Edge", 3 ); this.edge.setText( Float.toString( 5 ) ); this.add( this.edge ); } /*************************************************************************** * * @param field * @return float * @throws DesignerException **************************************************************************/ private static float getValue( LabelledTextfield field ) throws DesignerException { if( field.getText().trim().equals( "" ) ) { throw new DesignerException( field.getLabel() + " can not be NULL." ); } return Float.parseFloat( field.getText() ); } /*************************************************************************************** * * @return float **************************************************************************************/ public float getRowPadding() throws DesignerException { return Padding.getValue( this.row ); } /*************************************************************************************** * * @return float **************************************************************************************/ public float getColumnPadding() throws DesignerException { return Padding.getValue( this.column ); } /*************************************************************************************** * * @return float **************************************************************************************/ public float getIconPadding() throws DesignerException { return Padding.getValue( this.icon ); } /*************************************************************************************** * * @return float **************************************************************************************/ public float getChartPadding() throws DesignerException { return Padding.getValue( this.chart ); } /*************************************************************************************** * * @return float **************************************************************************************/ public float getEdgePadding() throws DesignerException { return Padding.getValue( this.edge ); } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:07
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/items In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/src/java/org/krysalis/jcharts/designer/tabs/allChart/items Modified Files: Title.java Log Message: Index: Title.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/items/Title.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Title.java 3 Jun 2004 00:58:03 -0000 1.1 --- Title.java 9 Jun 2004 01:46:53 -0000 1.2 *************** *** 37,46 **** ! import java.awt.FlowLayout; import javax.swing.BorderFactory; import javax.swing.JPanel; ! import org.krysalis.jcharts.designer.common.LabelledCheckbox; --- 37,49 ---- ! import java.awt.Color; import javax.swing.BorderFactory; + import javax.swing.BoxLayout; import javax.swing.JPanel; ! import org.krysalis.jcharts.designer.common.font.FontChooser; ! import org.krysalis.jcharts.designer.common.paint.PaintChooser; ! import org.krysalis.jcharts.properties.util.ChartFont; *************** *** 49,57 **** * @author Nathaniel Auvil * @version $Id$ ***********************************************************************/ public class Title extends JPanel { ! private LabelledCheckbox checkbox; ! /*********************************************************************************** --- 52,62 ---- * @author Nathaniel Auvil * @version $Id$ + * @deprecated use FontChooser instead. ***********************************************************************/ public class Title extends JPanel { ! private FontChooser titleFont; ! private PaintChooser paintChooser; ! /*********************************************************************************** *************** *** 60,83 **** public Title() { ! super(); ! ! super.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder( "Anti-Aliasing" ), ! BorderFactory.createEmptyBorder( 5, 5, 5, 5 ) ) ); ! this.setLayout( new FlowLayout() ); ! this.checkbox = new LabelledCheckbox( "enable" ); ! this.checkbox.setSelected( true ); ! this.add( this.checkbox ); } ! /********************************************************************************* * ! * @return boolean ! ********************************************************************************/ ! public boolean useAntiAliasing() { ! return this.checkbox.isSelected(); } } --- 65,90 ---- public Title() { ! super.setBorder( BorderFactory.createTitledBorder( "Chart Title" ) ); ! JPanel jPanel= new JPanel(); ! jPanel.setLayout( new BoxLayout( jPanel, BoxLayout.Y_AXIS ) ); ! ! this.titleFont= new FontChooser( "Title Font" ); ! jPanel.add( this.titleFont ); ! this.paintChooser= new PaintChooser( false, Color.black, Color.white ); ! jPanel.add( this.paintChooser ); ! ! this.add( jPanel ); } ! /***************************************************************************** * ! * @return ChartFont ! ****************************************************************************/ ! public ChartFont getTitleChartFont() { ! return new ChartFont( this.titleFont.getFont(), this.paintChooser.getPaint() ); } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:07
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/src/java/org/krysalis/jcharts/designer/tabs/allChart Modified Files: AllChartTabs.java ChartPropertiesTab.java Added Files: GeneralTab.java Log Message: Index: AllChartTabs.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/AllChartTabs.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AllChartTabs.java 3 Jun 2004 00:57:58 -0000 1.2 --- AllChartTabs.java 9 Jun 2004 01:46:52 -0000 1.3 *************** *** 37,40 **** --- 37,41 ---- import org.krysalis.jcharts.designer.tabs.TopLevelTabs; + import org.krysalis.jcharts.designer.tabs.allChart.legendProperties.LegendPropertiesTab; import javax.swing.*; *************** *** 48,55 **** public class AllChartTabs extends JTabbedPane { - private TopLevelTabs topLevelTabs; ! private ChartPropertiesTab allChartTabPanel; ! /*************************************************************************************** --- 49,58 ---- public class AllChartTabs extends JTabbedPane { private TopLevelTabs topLevelTabs; ! ! private GeneralTab generalTab; ! private ChartPropertiesTab chartPropertiesTab; ! private LegendPropertiesTab legendPropertiesTab; ! /*************************************************************************************** *************** *** 62,72 **** this.topLevelTabs.addTab( "All Charts", this ); ! this.allChartTabPanel = new ChartPropertiesTab( this ); } ! ! public ChartPropertiesTab getAllChartTabPanel() { ! return allChartTabPanel; } } \ No newline at end of file --- 65,106 ---- this.topLevelTabs.addTab( "All Charts", this ); ! this.generalTab= new GeneralTab(); ! this.addTab( "General", this.generalTab ); ! ! this.chartPropertiesTab = new ChartPropertiesTab(); ! this.addTab( "Chart Properties", this.chartPropertiesTab ); ! ! this.legendPropertiesTab= new LegendPropertiesTab(); ! this.addTab( "Legend Properties", this.legendPropertiesTab ); } ! ! /************************************************************* ! * ! * @return ChartPropertiesTab ! *************************************************************/ ! public ChartPropertiesTab getChartPropertiesTab() { ! return chartPropertiesTab; ! } ! ! ! /***************************************************************** ! * ! * @return GeneralTab ! *****************************************************************/ ! public GeneralTab getGeneralTab() ! { ! return this.generalTab; ! } ! ! ! /**************************************************************** ! * ! * @return LegendPropertiesTab ! ****************************************************************/ ! public LegendPropertiesTab getLegendPropertiesTab() ! { ! return this.legendPropertiesTab; } } \ No newline at end of file Index: ChartPropertiesTab.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/ChartPropertiesTab.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChartPropertiesTab.java 3 Jun 2004 00:57:58 -0000 1.4 --- ChartPropertiesTab.java 9 Jun 2004 01:46:52 -0000 1.5 *************** *** 40,44 **** import javax.swing.BorderFactory; import javax.swing.BoxLayout; - import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JScrollPane; --- 40,43 ---- *************** *** 58,65 **** * @version $Id$ ************************************************************************************/ ! public class ChartPropertiesTab //extends JPanel { - private AllChartTabs allChartTabs; - private FontChooser titleFont; private StrokeChooser borderStroke; --- 57,62 ---- * @version $Id$ ************************************************************************************/ ! public class ChartPropertiesTab extends JScrollPane { private FontChooser titleFont; private StrokeChooser borderStroke; *************** *** 68,85 **** private AntiAliasing antiAliasing; ! private JScrollPane jScrollPane; ! /************************************************************************************ * - * @param allChartTabs ***********************************************************************************/ ! public ChartPropertiesTab( AllChartTabs allChartTabs ) { - this.allChartTabs = allChartTabs; - JPanel jPanel= new JPanel(); BoxLayout boxLayout= new BoxLayout( jPanel, BoxLayout.Y_AXIS ); jPanel.setLayout( boxLayout ); ! jScrollPane= new JScrollPane( jPanel ); this.titleFont= new FontChooser( "Title Font" ); --- 65,78 ---- private AntiAliasing antiAliasing; ! /************************************************************************************ * ***********************************************************************************/ ! public ChartPropertiesTab() { JPanel jPanel= new JPanel(); BoxLayout boxLayout= new BoxLayout( jPanel, BoxLayout.Y_AXIS ); jPanel.setLayout( boxLayout ); ! this.titleFont= new FontChooser( "Title Font" ); *************** *** 101,106 **** jPanel.add( this.antiAliasing ); ! ! allChartTabs.addTab( "Chart Properties", jScrollPane ); } --- 94,98 ---- jPanel.add( this.antiAliasing ); ! super.setViewportView( jPanel ); } *************** *** 118,124 **** chartProperties.setBackgroundPaint( this.backgroundPaint.getPaint() ); chartProperties.setUseAntiAliasing( this.antiAliasing.useAntiAliasing() ); - - //TODO add more stuff - //validate? } } --- 110,113 ---- --- NEW FILE: GeneralTab.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.designer.tabs.allChart; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; import org.krysalis.jcharts.designer.common.LabelledTextfield; /************************************************************************************* * * @author Nathaniel Auvil * @version $Id: GeneralTab.java,v 1.1 2004/06/09 01:46:52 nathaniel_auvil Exp $ ************************************************************************************/ public class GeneralTab extends JPanel { private LabelledTextfield chartWidth; private LabelledTextfield chartHeight; /************************************************************************************ * ***********************************************************************************/ public GeneralTab() { //---dimensions------------------ JPanel dimensions= new JPanel(); dimensions.setBorder( BorderFactory.createTitledBorder( "Dimensions" ) ); this.chartWidth= new LabelledTextfield( "Width", 4 ); this.chartWidth.setText( "400" ); dimensions.add( this.chartWidth ); this.chartHeight= new LabelledTextfield( "Height", 4 ); this.chartHeight.setText( "400" ); dimensions.add( this.chartHeight ); //JPanel jPanel= new JPanel(); //jPanel.add( dimensions ); super.add( dimensions ); } public int getChartWidth() { return Integer.parseInt( this.chartWidth.getText() ); } public int getChartHeight() { return Integer.parseInt( this.chartHeight.getText() ); } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:06
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/src/java/org/krysalis/jcharts/designer/tabs Modified Files: TopLevelTabs.java LowerHalfPanel.java Log Message: Index: TopLevelTabs.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/TopLevelTabs.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TopLevelTabs.java 9 Aug 2003 17:07:22 -0000 1.1 --- TopLevelTabs.java 9 Jun 2004 01:46:53 -0000 1.2 *************** *** 53,59 **** private LowerHalfPanel lowerHalfPanel; - private AllChartTabs allChartTabs; ! private NonAxisChartTabs nonAxisChartTab; private AxisChartTabs axisChartTab; --- 53,58 ---- private LowerHalfPanel lowerHalfPanel; private AllChartTabs allChartTabs; ! private NonAxisChartTabs nonAxisChartTab; private AxisChartTabs axisChartTab; *************** *** 77,84 **** } public void updateChartProperties( ChartProperties chartProperties ) throws DesignerException { ! this.allChartTabs.getAllChartTabPanel().updateChartProperties( chartProperties ); } } --- 76,88 ---- } + + public AllChartTabs getAllChartTabs() + { + return this.allChartTabs; + } public void updateChartProperties( ChartProperties chartProperties ) throws DesignerException { ! this.allChartTabs.getChartPropertiesTab().updateChartProperties( chartProperties ); } } Index: LowerHalfPanel.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/LowerHalfPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LowerHalfPanel.java 9 Aug 2003 17:07:22 -0000 1.1 --- LowerHalfPanel.java 9 Jun 2004 01:46:53 -0000 1.2 *************** *** 51,62 **** { private Designer designer; ! private ButtonPanel buttonPanel; private TopLevelTabs topLevelTabs; ! /******************************************************************************** ! * * @param designer ! *******************************************************************************/ public LowerHalfPanel( Designer designer ) { --- 51,62 ---- { private Designer designer; ! private ButtonPanel buttonPanel; private TopLevelTabs topLevelTabs; ! /******************************************************************************** ! * * @param designer ! ********************************************************************************/ public LowerHalfPanel( Designer designer ) { |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:00
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24371/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties Log Message: Directory /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties added to the repository |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:46:35
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24189/src/java/org/krysalis/jcharts/designer Modified Files: Designer.java Log Message: Index: Designer.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/Designer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Designer.java 29 May 2004 13:50:13 -0000 1.2 --- Designer.java 9 Jun 2004 01:46:26 -0000 1.3 *************** *** 1,2 **** --- 1,35 ---- + /*********************************************************************************************** + * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. + * + * Redistribution and use of this software and associated documentation ("Software"), with or + * without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain copyright statements and notices. + * Redistributions must also contain a copy of this document. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote + * products derived from this Software without prior written permission of Nathaniel G. + * Auvil. For written permission, please contact nat...@us... + * + * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear + * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a + * registered trademark of Nathaniel G. Auvil. + * + * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). + * + * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE + ************************************************************************************************/ package org.krysalis.jcharts.designer; *************** *** 8,11 **** --- 41,48 ---- import org.krysalis.jcharts.designer.menuBar.DesignerMenuBar; import org.krysalis.jcharts.designer.tabs.LowerHalfPanel; + import org.krysalis.jcharts.designer.tabs.allChart.AllChartTabs; + import org.krysalis.jcharts.designer.tabs.allChart.ChartPropertiesTab; + import org.krysalis.jcharts.designer.tabs.allChart.GeneralTab; + import org.krysalis.jcharts.designer.tabs.allChart.legendProperties.LegendPropertiesTab; import javax.swing.*; *************** *** 19,23 **** public class Designer extends JFrame { - public static final String TITLE = "jCharts Designer - 1.0.0"; --- 56,59 ---- *************** *** 26,35 **** private DesignerPieChart designerPieChart; - private org.krysalis.jcharts.axisChart.AxisChart axisChart; /**************************************************************************** * ! * @throws org.krysalis.jcharts.chartData.ChartDataException ***************************************************************************/ public Designer() throws ChartDataException --- 62,70 ---- private DesignerPieChart designerPieChart; /**************************************************************************** * ! * @throws ChartDataException ***************************************************************************/ public Designer() throws ChartDataException *************** *** 54,59 **** this.getContentPane().add( jSplitPane ); ! //---so when they click on the 'x' in the upper right corner, the ! // program exits super.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); --- 89,93 ---- this.getContentPane().add( jSplitPane ); ! //---so when they click on the 'x' in the upper right corner, the program exits super.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); *************** *** 72,78 **** try { ! this.lowerHalfPanel.getTopLevelTabs().updateChartProperties( this.designerPieChart.getChartProperties() ); this.designerPieChart.updateChart(); this.chartPanel.repaint(); } --- 106,126 ---- try { ! AllChartTabs allChartTabs= this.lowerHalfPanel.getTopLevelTabs().getAllChartTabs(); ! ! GeneralTab generalTab= allChartTabs.getGeneralTab(); ! this.designerPieChart.setChartWidth( generalTab.getChartWidth() ); ! this.designerPieChart.setChartHeight( generalTab.getChartHeight() ); + ChartPropertiesTab chartPropertiesTab= allChartTabs.getChartPropertiesTab(); + chartPropertiesTab.updateChartProperties( this.designerPieChart.getChartProperties() ); + + LegendPropertiesTab legendPropertiesTab= allChartTabs.getLegendPropertiesTab(); + legendPropertiesTab.updateChartProperties( this.designerPieChart.getLegendProperties() ); + + this.designerPieChart.updateChart(); + this.chartPanel.setChart( this.designerPieChart.getPieChart2D(), + generalTab.getChartWidth(), + generalTab.getChartHeight() ); this.chartPanel.repaint(); } *************** *** 84,90 **** { JOptionPane.showMessageDialog( this, ! chartDataException.getMessage(), ! "Chart Data Exception", ! JOptionPane.ERROR_MESSAGE ); } } --- 132,138 ---- { JOptionPane.showMessageDialog( this, ! chartDataException.getMessage(), ! "Chart Data Exception", ! JOptionPane.ERROR_MESSAGE ); } } *************** *** 96,119 **** public static void main( String[] args ) throws ChartDataException { ! Designer designer = new Designer(); ! ! /* ! * int width= 450; int height= 450; ! * ! * try { String[] labels = {"BMW", "Audi", "Lexus"}; String title = "Cars ! * that Own"; Paint[] paints = {Color.blue, Color.gray, Color.red}; ! * double[] data = {50d, 30d, 20d}; ! * ! * PieChart2DProperties pieChart2DProperties = new PieChart2DProperties(); ! * PieChartDataSet pieChartDataSet = new PieChartDataSet( title, data, ! * labels, paints, pieChart2DProperties ); ! * ! * PieChart2D pieChart2D = new PieChart2D( pieChartDataSet, new ! * LegendProperties(), new ChartProperties(), width, height ); ! * ! * designer.chartPanel.setChart( pieChart2D, width, height ); } catch( ! * ChartDataException chartDataException ) { ! * chartDataException.printStackTrace(); } ! */ } } \ No newline at end of file --- 144,148 ---- public static void main( String[] args ) throws ChartDataException { ! new Designer(); } } \ No newline at end of file |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:46:07
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23697/src/java/org/krysalis/jcharts/designer Modified Files: ChartPanel.java Log Message: Index: ChartPanel.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/ChartPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChartPanel.java 3 Jun 2004 00:59:17 -0000 1.2 --- ChartPanel.java 9 Jun 2004 01:45:53 -0000 1.3 *************** *** 78,82 **** public void setChart( Chart chart, int width, int height ) { this.chart = chart; ! super.setSize( width, height ); //todo this does not set the size correctly } --- 78,82 ---- public void setChart( Chart chart, int width, int height ) { this.chart = chart; ! super.setPreferredSize( new Dimension( width, height ) ); //todo this does not set the size correctly } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:45:42
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23476/src/java/org/krysalis/jcharts/designer/common Modified Files: LabelledTextfield.java Log Message: Index: LabelledTextfield.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/LabelledTextfield.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LabelledTextfield.java 3 Jun 2004 00:57:09 -0000 1.3 --- LabelledTextfield.java 9 Jun 2004 01:45:33 -0000 1.4 *************** *** 48,51 **** --- 48,52 ---- public class LabelledTextfield extends JPanel { + private String label; private JLabel jLabel; private JTextField textField; *************** *** 59,64 **** public LabelledTextfield( String label, int size ) { ! super(); ! this.jLabel = new JLabel( label ); this.textField = new JTextField( size ); --- 60,64 ---- public LabelledTextfield( String label, int size ) { ! this.label= label; this.jLabel = new JLabel( label ); this.textField = new JTextField( size ); *************** *** 74,78 **** * @return String ********************************************************************************/ ! public String getText() { return this.textField.getText(); } --- 74,79 ---- * @return String ********************************************************************************/ ! public String getText() ! { return this.textField.getText(); } *************** *** 88,90 **** --- 89,97 ---- this.textField.setEnabled( enabled ); } + + + public String getLabel() + { + return this.label; + } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:45:27
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23245/src/java/org/krysalis/jcharts/designer/common/stroke Modified Files: StrokeChooser.java Log Message: Index: StrokeChooser.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke/StrokeChooser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StrokeChooser.java 3 Jun 2004 00:56:58 -0000 1.3 --- StrokeChooser.java 9 Jun 2004 01:45:19 -0000 1.4 *************** *** 89,92 **** --- 89,102 ---- + /************************************************************************** + * + * @param width + *************************************************************************/ + public void setWidth( float width ) + { + this.widthField.setText( Float.toString( width ) ); + } + + /*************************************************************************************** * |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:44:05
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/font In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22123/src/java/org/krysalis/jcharts/designer/common/font Modified Files: StylesCombo.java FontChooser.java Log Message: Index: FontChooser.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/font/FontChooser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FontChooser.java 25 May 2004 01:04:08 -0000 1.2 --- FontChooser.java 9 Jun 2004 01:43:56 -0000 1.3 *************** *** 1,4 **** - package org.krysalis.jcharts.designer.common.font; --- 1,3 ---- *************** *** 6,13 **** --- 5,14 ---- import org.krysalis.jcharts.designer.common.LabelledCombo; import org.krysalis.jcharts.designer.common.LabelledTextfield; + import org.krysalis.jcharts.designer.common.paint.PaintChooser; import org.krysalis.jcharts.designer.exceptions.DesignerException; import org.krysalis.jcharts.properties.util.ChartFont; import javax.swing.*; + import java.awt.*; *************** *** 19,67 **** { Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); ! ALL_FONT_NAMES = new String[ allFonts.length ]; for( int i = 0; i < allFonts.length; i++ ) { ! ALL_FONT_NAMES[ i ] = allFonts[ i ].getName(); } } - - private String title; private LabelledCombo fontCombo; private LabelledTextfield size; private LabelledCombo styleCombo; ! ! /*********************************************************************************** ! * * @param title ! **********************************************************************************/ public FontChooser( String title ) { ! super(); ! this.title= title; ! ! super.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder( this.title ), ! BorderFactory.createEmptyBorder( 5, 5, 5, 5 ) ) ); ! this.setLayout( new FlowLayout() ); this.fontCombo = new LabelledCombo( "Name:", ALL_FONT_NAMES ); ! this.add( this.fontCombo ); ! this.size= new LabelledTextfield( "Size:", 3 ); this.size.setText( "12" ); ! this.add( this.size ); ! this.styleCombo= new StylesCombo(); ! this.add( this.styleCombo ); } ! /********************************************************************************* ! * * @return ChartFont ! ********************************************************************************/ public ChartFont getChartFont() throws DesignerException { --- 20,70 ---- { Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); ! ALL_FONT_NAMES = new String[allFonts.length]; for( int i = 0; i < allFonts.length; i++ ) { ! ALL_FONT_NAMES[i] = allFonts[i].getName(); } } private LabelledCombo fontCombo; private LabelledTextfield size; private LabelledCombo styleCombo; + private PaintChooser paintChooser; + ! /*************************************************************************************** ! * * @param title ! **************************************************************************************/ public FontChooser( String title ) { ! super.setBorder( BorderFactory.createTitledBorder( title ) ); ! this.setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) ); ! JPanel jPanel= new JPanel(); this.fontCombo = new LabelledCombo( "Name:", ALL_FONT_NAMES ); ! jPanel.add( this.fontCombo ); ! this.size = new LabelledTextfield( "Size:", 3 ); this.size.setText( "12" ); ! jPanel.add( this.size ); ! this.styleCombo = new StylesCombo(); ! jPanel.add( this.styleCombo ); ! ! this.add( jPanel ); ! ! ! this.paintChooser= new PaintChooser( false, Color.black, Color.white ); ! this.add( this.paintChooser ); } ! /*************************************************************************************** ! * * @return ChartFont ! **************************************************************************************/ public ChartFont getChartFont() throws DesignerException { *************** *** 71,79 **** } ! Font font= new Font( this.fontCombo.getSelected(), this.styleCombo.getSelectedIndex(), Integer.parseInt( this.size.getText() ) ); ! //todo Paint implementation? ! ChartFont chartFont= new ChartFont( font, Color.black ); return chartFont; } ! } --- 74,83 ---- } + Font font = new Font( this.fontCombo.getSelected(), + this.styleCombo.getSelectedIndex(), + Integer.parseInt( this.size.getText() ) ); ! ChartFont chartFont = new ChartFont( font, this.paintChooser.getPaint() ); return chartFont; } ! } \ No newline at end of file Index: StylesCombo.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/font/StylesCombo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StylesCombo.java 25 May 2004 01:04:07 -0000 1.2 --- StylesCombo.java 9 Jun 2004 01:43:56 -0000 1.3 *************** *** 1,8 **** /*********************************************************************************************** - * File Info: Id: $ - * Copyright (C) 2002 - * Author: Nathaniel G. Auvil - * Contributor(s): - * * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * --- 1,3 ---- *************** *** 38,42 **** ************************************************************************************************/ - package org.krysalis.jcharts.designer.common.font; --- 33,36 ---- *************** *** 45,60 **** ! public class StylesCombo extends LabelledCombo { private static String[] ALL_STYLES; ! static { ! ALL_STYLES= new String[]{ "PLAIN", "BOLD", "ITALIC" }; } ! /******************************************************************************* ! * ! ********************************************************************************/ public StylesCombo() { --- 39,59 ---- ! /***************************************************************************************** ! * ! * @author Nathaniel Auvil ! * @version $Id$ ! ****************************************************************************************/ ! class StylesCombo extends LabelledCombo { private static String[] ALL_STYLES; ! static { ! ALL_STYLES = new String[] { "PLAIN", "BOLD", "ITALIC"}; } ! /*************************************************************************************** ! * ! **************************************************************************************/ public StylesCombo() { *************** *** 62,64 **** } ! } --- 61,63 ---- } ! } \ No newline at end of file |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:43:48
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/charts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21835/src/java/org/krysalis/jcharts/designer/charts Modified Files: DesignerPieChart.java Log Message: Index: DesignerPieChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/charts/DesignerPieChart.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DesignerPieChart.java 9 Aug 2003 17:04:07 -0000 1.1 --- DesignerPieChart.java 9 Jun 2004 01:43:31 -0000 1.2 *************** *** 53,58 **** { private PieChart2D pieChart2D; ! private PieChart2DProperties pieChart2DProperties; ! private PieChartDataSet pieChartDataSet; --- 53,58 ---- { private PieChart2D pieChart2D; ! private PieChart2DProperties pieChart2DProperties; ! private PieChartDataSet pieChartDataSet; *************** *** 83,99 **** * @throws ChartDataException **************************************************************************************/ ! public void updateChart() throws ChartDataException { this.pieChartDataSet = new PieChartDataSet( super.getTitle(), ! super.getData()[ 0 ], ! super.getLegendLabels(), ! super.getPaints(), ! this.pieChart2DProperties ); this.pieChart2D= new PieChart2D( pieChartDataSet, ! super.getLegendProperties(), ! super.getChartProperties(), ! super.getWidth(), ! super.getHeight() ); } --- 83,99 ---- * @throws ChartDataException **************************************************************************************/ ! public void updateChart() throws ChartDataException { this.pieChartDataSet = new PieChartDataSet( super.getTitle(), ! super.getData()[ 0 ], ! super.getLegendLabels(), ! super.getPaints(), ! this.pieChart2DProperties ); this.pieChart2D= new PieChart2D( pieChartDataSet, ! super.getLegendProperties(), ! super.getChartProperties(), ! super.getChartWidth(), ! super.getChartHeight() ); } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:43:28
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/charts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21702/src/java/org/krysalis/jcharts/designer/charts Modified Files: DesignerChart.java Log Message: Index: DesignerChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/charts/DesignerChart.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DesignerChart.java 9 Aug 2003 17:04:07 -0000 1.1 --- DesignerChart.java 9 Jun 2004 01:43:19 -0000 1.2 *************** *** 49,54 **** public abstract class DesignerChart { ! private int width; ! private int height; private String title; --- 49,54 ---- public abstract class DesignerChart { ! private int chartWidth; ! private int chartHeight; private String title; *************** *** 70,75 **** public DesignerChart( int width, int height ) { ! this.width= width; ! this.height= height; this.chartProperties= new ChartProperties(); --- 70,75 ---- public DesignerChart( int width, int height ) { ! this.chartWidth= width; ! this.chartHeight= height; this.chartProperties= new ChartProperties(); *************** *** 90,117 **** - public int getWidth() - { - return width; - } ! public void setWidth( int width ) { ! this.width = width; } ! ! ! public int getHeight() { ! return height; } ! ! ! public void setHeight( int height ) { ! this.height = height; } - - public String getTitle() { --- 90,112 ---- ! ! public int getChartHeight() { ! return chartHeight; } ! public void setChartHeight( int chartHeight ) { ! this.chartHeight = chartHeight; } ! public int getChartWidth() { ! return chartWidth; ! } ! public void setChartWidth( int chartWidth ) ! { ! this.chartWidth = chartWidth; } public String getTitle() { |