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-07-01 01:33:38
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7278/src/java/org/krysalis/jcharts/axisChart/axis Modified Files: YAxis.java Log Message: Dual Y axis changes Index: YAxis.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis/YAxis.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** YAxis.java 31 May 2004 16:29:47 -0000 1.5 --- YAxis.java 1 Jul 2004 01:33:29 -0000 1.6 *************** *** 46,49 **** --- 46,50 ---- import java.awt.geom.Line2D; import java.lang.reflect.Field; + import java.awt.font.TextLayout; *************** *** 86,118 **** * **************************************************************************************************/ ! public void computeMinimumWidthNeeded( String yAxisTitle ) { AxisTypeProperties axisTypeProperties= super.getAxisChart().getAxisProperties().getYAxisProperties(); ! float widthNeeded = 0; ! //---if we are displaying axis scale labels, add width of widest label ! if( axisTypeProperties.showAxisLabels() ) ! { ! // Dual Y axis changes integrated CMC 25Aug03 ! //widthNeeded+= super.getAxisLabelsGroup().getWidestLabel(); ! if ( axisTypeProperties.getShowRightAxis() ) ! { ! if ( super.getAxisLabelsGroupRight().getWidestLabel()>super.getAxisLabelsGroup().getWidestLabel()) ! { ! widthNeeded+= super.getAxisLabelsGroupRight().getWidestLabel(); ! } ! else ! { ! widthNeeded+= super.getAxisLabelsGroup().getWidestLabel(); ! } ! } ! else ! { ! widthNeeded+= super.getAxisLabelsGroup().getWidestLabel(); ! } ! } --- 87,120 ---- * **************************************************************************************************/ ! public void computeMinimumWidthNeeded( String yAxisTitle, String rightYAxisTitle ) { + float widthNeeded = 0; AxisTypeProperties axisTypeProperties= super.getAxisChart().getAxisProperties().getYAxisProperties(); + AxisTypeProperties rightAxisTypeProperties = super.getAxisChart().getAxisProperties().getRightYAxisProperties(); + + // Right hand axis calc. + if ( rightAxisTypeProperties.getShowAxis() ) { + if( rightAxisTypeProperties.showAxisLabels() ) + widthNeeded+= super.getAxisLabelsGroupRight().getWidestLabel(); + + widthNeeded += getAxisWidth(rightAxisTypeProperties, rightYAxisTitle); + } + super.setMinimumRHSWidthNeeded( widthNeeded ); ! // Left Hand Axis calc. must be done after RHS as some LHS title sizes are set ! widthNeeded = 0; //---if we are displaying axis scale labels, add width of widest label ! if( axisTypeProperties.showAxisLabels() ) { ! widthNeeded+= super.getAxisLabelsGroup().getWidestLabel(); ! } ! widthNeeded += getAxisWidth(axisTypeProperties, yAxisTitle); ! super.setMinimumLHSWidthNeeded(widthNeeded); ! } ! ! private float getAxisWidth(AxisTypeProperties axisTypeProperties, String axisTitle) { ! ! float widthNeeded = 0; *************** *** 137,153 **** //---include axis title height if needed. Remember it is vertical for y-axis //if( super.getAxisChart().getAxisProperties().getShowAxisTitle( AxisProperties.Y_AXIS ) ) ! if( yAxisTitle != null ) { ! super.computeAxisTitleDimensions( yAxisTitle, axisTypeProperties.getTitleChartFont() ); widthNeeded += super.getTitleHeight(); widthNeeded += axisTypeProperties.getPaddingBetweenAxisTitleAndLabels(); } ! ! super.setMinimumWidthNeeded( widthNeeded ); } /**************************************************************************************************** ! * * @param axisTitle * @param graphics2D --- 139,154 ---- //---include axis title height if needed. Remember it is vertical for y-axis //if( super.getAxisChart().getAxisProperties().getShowAxisTitle( AxisProperties.Y_AXIS ) ) ! if( axisTitle != null ) { ! super.computeAxisTitleDimensions( axisTitle, axisTypeProperties.getTitleChartFont() ); widthNeeded += super.getTitleHeight(); widthNeeded += axisTypeProperties.getPaddingBetweenAxisTitleAndLabels(); } ! return widthNeeded; } /**************************************************************************************************** ! * This is the LHS Axis title * @param axisTitle * @param graphics2D *************** *** 159,163 **** { float titleY; // = super.getAxisChart().getChartProperties().getEdgePadding(); ! float titleX = super.getAxisChart().getXAxis().getOrigin() - super.getMinimumWidthNeeded() + super.getTitleHeight(); //---if YAxis title is larger than the YAxis itself, center it on image. --- 160,164 ---- { float titleY; // = super.getAxisChart().getChartProperties().getEdgePadding(); ! float titleX = super.getAxisChart().getXAxis().getOrigin() - super.getMinimumLHSWidthNeeded() + super.getTitleHeight(); //---if YAxis title is larger than the YAxis itself, center it on image. *************** *** 180,183 **** --- 181,221 ---- } + /**************************************************************************************************** + * This is the RHS Axis title + * @param axisTitle + * @param graphics2D + * @param axisTypeProperties + ***************************************************************************************************/ + private void renderRightAxisTitle( String axisTitle, Graphics2D graphics2D, AxisTypeProperties axisTypeProperties ) + { + if( axisTitle != null ) + { + FontMetrics fm = graphics2D.getFontMetrics(axisTypeProperties.getAxisTitleChartFont().getFont()); + + TextLayout textLayout = new TextLayout( axisTitle, + axisTypeProperties.getAxisTitleChartFont().getFont(), + graphics2D.getFontRenderContext() ); + + float axisTitleWidth = textLayout.getAdvance(); + float titleY; + float titleX = super.getAxisChart().getXAxis().getOrigin() + super.getAxisChart().getXAxis().getPixelLength() + super.getMinimumRHSWidthNeeded();// - fm.getDescent(); + //---if YAxis title is larger than the YAxis itself, center it on image. + if( axisTitleWidth > super.getPixelLength() ) + { + titleY = super.getAxisChart().getImageHeight() - ( ( super.getAxisChart().getImageHeight() - axisTitleWidth ) / 2 ); + } + //---else, center on YAxis. + else + { + titleY = this.getOrigin() - ( ( super.getPixelLength() - axisTitleWidth ) / 2 ); + } + + //TODO this should use a TextTag + graphics2D.setFont( axisTypeProperties.getAxisTitleChartFont().getFont().deriveFont( ChartFont.VERTICAL_ROTATION ) ); + graphics2D.setPaint( axisTypeProperties.getAxisTitleChartFont().getPaint() ); + graphics2D.drawString( axisTitle, titleX, titleY ); + } + } + /********************************************************************************************* *************** *** 188,199 **** * @param yAxisTitle **********************************************************************************************/ ! public void render( Graphics2D graphics2D, AxisProperties axisProperties, String yAxisTitle ) { AxisTypeProperties axisTypeProperties = axisProperties.getYAxisProperties(); ! //---AXIS TITLE ! this.renderAxisTitle( yAxisTitle, graphics2D, axisProperties.getYAxisProperties() ); ! Line2D.Float line2D; --- 226,237 ---- * @param yAxisTitle **********************************************************************************************/ ! public void render( Graphics2D graphics2D, AxisProperties axisProperties, String yAxisTitle, String rightYAxisTitle ) { AxisTypeProperties axisTypeProperties = axisProperties.getYAxisProperties(); ! AxisTypeProperties rightAxisTypeProperties = axisProperties.getRightYAxisProperties(); //---AXIS TITLE ! this.renderAxisTitle( yAxisTitle, graphics2D, axisTypeProperties ); ! this.renderRightAxisTitle( rightYAxisTitle, graphics2D, rightAxisTypeProperties ); Line2D.Float line2D; *************** *** 333,385 **** } ! // Dual Y axis changes integrated CMC 25Aug03 ! //---if AXIS at the right---------------------------------------------------------------------- ! if (axisTypeProperties.getShowRightAxis()) ! { ! line2D.x1 = super.getAxisChart().getXAxis().getOrigin() + super.getAxisChart().getXAxis().getPixelLength(); ! line2D.x2 = line2D.x1; ! line2D.y1 = super.getOrigin() - super.getPixelLength() - 10 ; ! line2D.y2 = super.getOrigin(); ! axisTypeProperties.getAxisStroke().draw( graphics2D, line2D ); ! float tickRightX1 = super.getAxisChart().getXAxis().getOrigin() + super.getAxisChart().getXAxis().getPixelLength(); ! float tickRightX2 = tickRightX1 + axisTypeProperties.getAxisTickMarkPixelLength(); ! line2D.y1 = super.getOrigin(); ! line2D.y2 = line2D.y1; ! stringY = super.getOrigin() + ( super.getAxisLabelsGroupRight().getTallestLabel() / 4 ); ! stringX = super.getAxisChart().getXAxis().getOrigin() + axisTypeProperties.getAxisTickMarkPixelLength() ! + super.getAxisChart().getXAxis().getPixelLength(); ! stringX+= axisTypeProperties.getPaddingBetweenLabelsAndTicks(); ! for( int i = 0; i < super.getNumberOfScaleItems(); i++ ) ! { ! //---TICK MARKS at the right ! if( axisTypeProperties.getShowTicks() != AxisTypeProperties.TICKS_NONE ) ! { ! line2D.x1 = tickRightX1; ! line2D.x2 = tickRightX2; ! axisTypeProperties.getTickChartStroke().draw( graphics2D, line2D ); ! } ! line2D.y1 -= super.getScalePixelWidth(); ! line2D.y2 = line2D.y1; ! //---AXIS LABEL at the right ! if( axisTypeProperties.showAxisLabels() ) ! { ! // Font and Paint set in TextTagGroup object in 1.0 it seems CMC 25Aug03 ! //graphics2D.setFont( axisTypeProperties.getScaleChartFontRight().getFont()); ! //graphics2D.setPaint( axisTypeProperties.getScaleChartFontRight().getPaint() ); ! super.getAxisLabelsGroupRight().render( i, graphics2D, stringX , stringY ); ! } ! stringY -= super.getScalePixelWidth(); ! } ! } } --- 371,427 ---- } ! //---if AXIS at the right---------------------------------------------------------------------- ! if (rightAxisTypeProperties.getShowAxis()) ! { ! line2D.x1 = super.getAxisChart().getXAxis().getOrigin() + super.getAxisChart().getXAxis().getPixelLength(); ! line2D.x2 = line2D.x1; ! line2D.y1 = super.getOrigin() - super.getPixelLength() - 10 ; ! line2D.y2 = super.getOrigin(); ! rightAxisTypeProperties.getAxisStroke().draw( graphics2D, line2D ); ! float tickRightX1 = super.getAxisChart().getXAxis().getOrigin() + super.getAxisChart().getXAxis().getPixelLength(); ! float tickRightX2 = tickRightX1 + rightAxisTypeProperties.getAxisTickMarkPixelLength(); ! line2D.y1 = super.getOrigin(); ! line2D.y2 = line2D.y1; ! stringY = super.getOrigin() + ( super.getAxisLabelsGroupRight().getTallestLabel() / 4 ); ! stringX = super.getAxisChart().getXAxis().getOrigin() + axisTypeProperties.getAxisTickMarkPixelLength() ! + super.getAxisChart().getXAxis().getPixelLength(); ! float pixelStep = 0; ! // CMC XXX Really need a setNumberOfRightScaleItems value to use here. ! if( axisTypeProperties instanceof DataAxisProperties ) { ! pixelStep = (super.getPixelLength() - 5) / ( super.getAxisLabelsGroupRight().size() - 1); ! } ! else { ! pixelStep = super.getPixelLength() / ( super.getAxisLabelsGroupRight().size() - 1 ); ! } + // for( int i = 0; i < super.getNumberOfScaleItems(); i++ ) + for( int i = 0; i < super.getAxisLabelsGroupRight().size(); i++ ) + { + //---TICK MARKS at the right + if( rightAxisTypeProperties.getShowTicks() != AxisTypeProperties.TICKS_NONE ) + { + line2D.x1 = tickRightX1; + line2D.x2 = tickRightX2; + rightAxisTypeProperties.getTickChartStroke().draw( graphics2D, line2D ); + } ! line2D.y1 -= pixelStep; ! line2D.y2 = line2D.y1; ! //---AXIS LABEL at the right ! if( rightAxisTypeProperties.showAxisLabels() ) ! { ! super.getAxisLabelsGroupRight().render( i, graphics2D, stringX , stringY ); ! } ! stringY -= pixelStep; ! } ! } } |
From: Chris M. <ki...@us...> - 2004-07-01 01:30:26
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6702/src/java/org/krysalis/jcharts/axisChart/axis Modified Files: Axis.java Log Message: Dual Y axis changes Index: Axis.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis/Axis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Axis.java 27 Aug 2003 04:37:44 -0000 1.3 --- Axis.java 1 Jul 2004 01:30:16 -0000 1.4 *************** *** 74,78 **** private float titleWidth; ! private float minimumWidthNeeded; private float minimumHeightNeeded; --- 74,80 ---- private float titleWidth; ! // private float minimumWidthNeeded; ! private float minimumLHSWidthNeeded; // width needed for Left Hand Side axis stuff ! private float minimumRHSWidthNeeded; // and the RHS if there private float minimumHeightNeeded; *************** *** 80,90 **** private TextTagGroup axisLabelsGroup; ! // Dual Y axis changes integrated CMC 25Aug03 ! // Variable to use to display the labels of the right Y axis ! // the corresponding methods are also implemented ! private TextTagGroup axisLabelsGroupRight; //---this number of items to plot on the Axis. Note, if no labels are displayed, axisLabelsGroup will be NULL so we can not depend on that. private int numberOfScaleItems; //---pixel location of tick start needed for reference when start drawing charts. --- 82,91 ---- private TextTagGroup axisLabelsGroup; ! // Variable to use to display the labels of the right Y axis ! private TextTagGroup axisLabelsGroupRight; //---this number of items to plot on the Axis. Note, if no labels are displayed, axisLabelsGroup will be NULL so we can not depend on that. private int numberOfScaleItems; + private int numberOfRightScaleItems; //---pixel location of tick start needed for reference when start drawing charts. *************** *** 99,102 **** --- 100,104 ---- private ScaleCalculator scaleCalculator; + private ScaleCalculator rightScaleCalculator; *************** *** 113,116 **** --- 115,132 ---- } + /************************************************************************************************** + * Constructor + * + * @param axisChart + * @param numberOfScaleItems + * @param numberOfRightScaleItems + ***************************************************************************************************/ + public Axis( AxisChart axisChart, int numberOfScaleItems, int numberOfRightScaleItems ) + { + this.axisChart = axisChart; + this.numberOfScaleItems= numberOfScaleItems; + this.numberOfRightScaleItems= numberOfRightScaleItems; + } + /************************************************************************************************** *************** *** 130,133 **** --- 146,154 ---- } + public int getNumberOfRightScaleItems() + { + return numberOfRightScaleItems; + } + public TextTagGroup getAxisLabelsGroup() *************** *** 143,148 **** ! // Dual Y axis changes integrated CMC 25Aug03 ! public TextTagGroup getAxisLabelsGroupRight() { return axisLabelsGroupRight; --- 164,168 ---- ! public TextTagGroup getAxisLabelsGroupRight() { return axisLabelsGroupRight; *************** *** 189,192 **** --- 209,213 ---- } + /* public final float getMinimumWidthNeeded() *************** *** 195,202 **** } - public final void setMinimumWidthNeeded( float minimumWidthNeeded ) { this.minimumWidthNeeded = minimumWidthNeeded; } --- 216,244 ---- } public final void setMinimumWidthNeeded( float minimumWidthNeeded ) { this.minimumWidthNeeded = minimumWidthNeeded; + } + */ + public final float getMinimumLHSWidthNeeded() + { + return this.minimumLHSWidthNeeded; + } + + + public final void setMinimumLHSWidthNeeded( float minimumWidthNeeded ) + { + this.minimumLHSWidthNeeded = minimumWidthNeeded; + } + + public final float getMinimumRHSWidthNeeded() + { + return this.minimumRHSWidthNeeded; + } + + + public final void setMinimumRHSWidthNeeded( float minimumWidthNeeded ) + { + this.minimumRHSWidthNeeded = minimumWidthNeeded; } *************** *** 243,246 **** --- 285,293 ---- } + public ScaleCalculator getRightScaleCalculator() + { + return rightScaleCalculator; + } + public void setScaleCalculator( ScaleCalculator scaleCalculator ) *************** *** 249,252 **** --- 296,304 ---- } + public void setRightScaleCalculator( ScaleCalculator scaleCalculator ) + { + this.rightScaleCalculator = scaleCalculator; + } + /********************************************************************************************* |
From: Chris M. <ki...@us...> - 2004-07-01 01:27:49
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6229/src/java/org/krysalis/jcharts/axisChart Modified Files: StackedBarChart.java Log Message: Fixes for stacked bar values to go negative and addition of render events Index: StackedBarChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/StackedBarChart.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StackedBarChart.java 17 May 2003 16:56:57 -0000 1.1 --- StackedBarChart.java 1 Jul 2004 01:27:41 -0000 1.2 *************** *** 42,45 **** --- 42,46 ---- import org.krysalis.jcharts.properties.DataAxisProperties; import org.krysalis.jcharts.properties.StackedBarChartProperties; + import org.krysalis.jcharts.axisChart.customRenderers.axisValue.AxisValueRenderEvent; import java.awt.*; *************** *** 213,236 **** 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; ! g2d.setPaint( iAxisChartDataSet.getPaint( j ) ); g2d.fill( rectangle ); --- 214,280 ---- float startingY ) { + float yPos, yNeg; //IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries(); + //---setup the total area rectangle + Rectangle2D.Float totalItemArea = new Rectangle2D.Float(); + totalItemArea.x = axisChart.getXAxis().getOrigin() + 1; + totalItemArea.y = axisChart.getYAxis().getOrigin() - axisChart.getYAxis().getPixelLength() + 1; + totalItemArea.width = axisChart.getXAxis().getScalePixelWidth() - 1; + totalItemArea.height = axisChart.getYAxis().getPixelLength() - 1; + + //---reuse the same Object for pre and post render events. + AxisValueRenderEvent axisValueRenderEvent = new AxisValueRenderEvent( axisChart, + iAxisChartDataSet, + g2d, + totalItemArea, + axisChart.getYAxis().getZeroLineCoordinate() ); + //LOOP //---initial postion of each line. for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ ) { + //---reset the paint as it might have changed for the outline drawing + g2d.setPaint( iAxisChartDataSet.getPaint( 0 ) ); + + //---set values for the preRender event + axisValueRenderEvent.setValueX( (float) rectangle.getCenterX() ); + axisValueRenderEvent.setValueY( axisChart.getYAxis().getZeroLineCoordinate() ); + axisValueRenderEvent.setValueIndex( i ); + //---draw each bar in stack + yNeg = yPos = startingY; + for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ ) { + axisValueRenderEvent.setDataSetIndex( j ); + //---if segment has a zero value, draw nothing. if( iAxisChartDataSet.getValue( j, i ) == 0 ) { + axisValueRenderEvent.setValueY( yNeg ); + stackedBarChartProperties.firePreRender( axisValueRenderEvent ); continue; } rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getYAxis().getOneUnitPixelSize() ); ! // negative values are stacked below the zero coord ! if( iAxisChartDataSet.getValue( j, i ) < 0 ) ! { ! rectangle.y = yNeg; //startingY; ! yNeg += rectangle.height; ! axisValueRenderEvent.setValueY( rectangle.y + rectangle.height ); ! } ! else ! { ! yPos -= rectangle.height; ! rectangle.y = yPos; ! axisValueRenderEvent.setValueY( rectangle.y ); ! } g2d.setPaint( iAxisChartDataSet.getPaint( j ) ); + //---we want to do this regardless if we render an item + stackedBarChartProperties.firePreRender( axisValueRenderEvent ); + g2d.fill( rectangle ); *************** *** 257,260 **** --- 301,307 ---- } + //---notify everyone we just rendered + stackedBarChartProperties.firePostRender( axisValueRenderEvent ); + rectangle.x += axisChart.getXAxis().getScalePixelWidth(); rectangle.y = startingY; |
From: Chris M. <ki...@us...> - 2004-07-01 01:26:29
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5935/src/java/org/krysalis/jcharts/axisChart Modified Files: LineChart.java Log Message: Dual Y axis changes Index: LineChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/LineChart.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LineChart.java 26 Sep 2003 00:44:02 -0000 1.3 --- LineChart.java 1 Jul 2004 01:26:20 -0000 1.4 *************** *** 66,72 **** LineChartProperties lineChartProperties=(LineChartProperties) iAxisChartDataSet.getChartTypeProperties(); lineChartProperties.validate( iAxisChartDataSet ); ! //DataAxisProperties dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties(); ! IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries(); //---cache the computed values --- 66,85 ---- LineChartProperties lineChartProperties=(LineChartProperties) iAxisChartDataSet.getChartTypeProperties(); lineChartProperties.validate( iAxisChartDataSet ); + + float scaleFactor = 1; + float minRHSValue = 0; + float minLHSValue = 0; + if (iAxisChartDataSet.getPlotAgainstRHS() == true) { + float maxLHSValue = (float)axisChart.getYAxis().getScaleCalculator().getMaxValue(); + float maxRHSValue = (float)axisChart.getYAxis().getRightScaleCalculator().getMaxValue(); + minLHSValue = (float)axisChart.getYAxis().getScaleCalculator().getMinValue(); + minRHSValue = (float)axisChart.getYAxis().getRightScaleCalculator().getMinValue(); ! // what happens if abs(minRHS) is larger than maxRHSValue???? ! scaleFactor = (maxLHSValue - minLHSValue) / (maxRHSValue - minRHSValue); ! } ! ! IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries(); ! //---cache the computed values *************** *** 85,99 **** if( iAxisChartDataSet.getValue( i, j ) != Double.NaN ) { - // Dual Y axis changes integrated CMC 25Aug03 //yAxisCoordinates[ i ][ j ]= axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(), // iAxisChartDataSet.getValue( i, j ), // axisChart.getYAxis().getScaleCalculator().getMinValue() ); ! // The coordinates of the line charts are drawn with the default scale and ! // multiplicate with the second scale for the right axis (by default equal 1) ! // if the second scale at the right is unchanged then there will be no impact ! yAxisCoordinates[ i ][ j ]= axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(), ! iAxisChartDataSet.getValue( i, j )*axisChart.axisProperties.getYAxisProperties().getSecondScaleRight(), ! axisChart.getYAxis().getScaleCalculator().getMinValue() ); //---if we are generating an ImageMap, store the image coordinates --- 98,112 ---- if( iAxisChartDataSet.getValue( i, j ) != Double.NaN ) { //yAxisCoordinates[ i ][ j ]= axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(), // iAxisChartDataSet.getValue( i, j ), // axisChart.getYAxis().getScaleCalculator().getMinValue() ); ! // The coordinates of the line charts are drawn against the LHS axis ! // so we recalculate with RHS scale factors (if present) to match LHS ! // need to adjust axis start temporarily to 0 point to make sure scale ! // factor is accurate ! yAxisCoordinates[ i ][ j ]= axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(), ! ((iAxisChartDataSet.getValue( i, j )-minRHSValue)*scaleFactor)+minLHSValue, ! axisChart.getYAxis().getScaleCalculator().getMinValue() ); //---if we are generating an ImageMap, store the image coordinates |
From: Chris M. <ki...@us...> - 2004-07-01 01:25:37
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5688/src/java/org/krysalis/jcharts/axisChart Modified Files: AxisChart.java Log Message: Dual Y axis changes Index: AxisChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/AxisChart.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AxisChart.java 14 Jun 2004 04:59:09 -0000 1.8 --- AxisChart.java 1 Jul 2004 01:25:23 -0000 1.9 *************** *** 70,78 **** import java.awt.geom.Rectangle2D; - // Dual Y axis changes integrated CMC 25Aug03 - //import java.lang.Math.*; - //import java.lang.Float.*; - - /************************************************************************************* --- 70,73 ---- *************** *** 161,212 **** { s = new AutomaticScaleCalculator(); ! // Dual Y axis changes integrated CMC 25Aug03 ! // s.setMaxValue( axisChartDataProcessor.getMaxValue() ); ! // s.setMinValue( axisChartDataProcessor.getMinValue() ); ! if (this.axisProperties.getYAxisProperties().getMaxRightAxis()>0) ! { ! s.setMaxValue( this.axisProperties.getYAxisProperties().getMaxRightAxis() ); ! } ! else ! { ! s.setMaxValue( axisChartDataProcessor.getMaxValue() ); ! } ! ! if (this.axisProperties.getYAxisProperties().getMinRightAxis()<0) ! { ! s.setMinValue( this.axisProperties.getYAxisProperties().getMinRightAxis() ); ! } ! else ! { ! s.setMinValue( axisChartDataProcessor.getMinValue() ); ! } ! } ! axis.setScaleCalculator( s ); } else { axis.setScaleCalculator( dataAxisProperties.getScaleCalculator() ); ! // Dual Y axis changes integrated CMC 25Aug03 ! // axis.getScaleCalculator().setMaxValue( axisChartDataProcessor.getMaxValue() ); ! // axis.getScaleCalculator().setMinValue( axisChartDataProcessor.getMinValue() ); ! ! if (this.axisProperties.getYAxisProperties().getMaxRightAxis()>0) ! { ! axis.getScaleCalculator().setMaxValue( this.axisProperties.getYAxisProperties().getMaxRightAxis() ); ! } ! else ! { ! axis.getScaleCalculator().setMaxValue( axisChartDataProcessor.getMaxValue() ); ! } ! ! if (this.axisProperties.getYAxisProperties().getMinRightAxis()<0) ! { ! axis.getScaleCalculator().setMinValue( this.axisProperties.getYAxisProperties().getMinRightAxis() ); ! } ! else ! { ! axis.getScaleCalculator().setMinValue( axisChartDataProcessor.getMinValue() ); ! } ! } axis.getScaleCalculator().setRoundingPowerOfTen( dataAxisProperties.getRoundToNearest() ); --- 156,170 ---- { s = new AutomaticScaleCalculator(); ! s.setMaxValue( axisChartDataProcessor.getMaxValue() ); ! s.setMinValue( axisChartDataProcessor.getMinValue() ); ! } ! axis.setScaleCalculator( s ); } else { axis.setScaleCalculator( dataAxisProperties.getScaleCalculator() ); ! axis.getScaleCalculator().setMaxValue( axisChartDataProcessor.getMaxValue() ); ! axis.getScaleCalculator().setMinValue( axisChartDataProcessor.getMinValue() ); ! } axis.getScaleCalculator().setRoundingPowerOfTen( dataAxisProperties.getRoundToNearest() ); *************** *** 305,338 **** NumericTagGroup numericTagGroup= setupDataAxisProperties( this.yAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext ); this.yAxis.setAxisLabelsGroup( numericTagGroup ); ! // Dual Y axis changes integrated CMC 25Aug03 ! // compute the labels of the right axis if necessary ! if ( this.axisProperties.getYAxisProperties().getSecondScaleRight()!=1 ) ! { ! NumericTagGroup numericTagGroup2 = new NumericTagGroup( dataAxisProperties.getScaleChartFontRight(), ! fontRenderContext, ! dataAxisProperties.useDollarSigns(), ! dataAxisProperties.usePercentSigns(), ! dataAxisProperties.useCommas(), ! dataAxisProperties.getRoundToNearest() ); ! int j=0; ! while (j<this.getYAxis().getNumberOfScaleItems()) ! { ! Float myFloat = new Float (this.yAxis.getAxisLabelsGroup().getTextTag(j).getText()); ! float temp = myFloat.floatValue(); ! // Rounding problems were causing errors ! //Integer myInteger = new Integer ( Math.round(Math.round((float)(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight()))/10)*10 ); ! //String myString = new String (""); ! //myString = myInteger.toString(); ! String myString = new String (String.valueOf(Math.round(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight())) ); ! numericTagGroup2.addLabel(myString); ! j++; ! } ! this.yAxis.setAxisLabelsGroupRight(numericTagGroup2); ! } } //---if yAxisTitle is null, do not show title ! this.yAxis.computeMinimumWidthNeeded( iDataSeries.getYAxisTitle() ); this.xAxis.computeMinimumHeightNeeded( iDataSeries.getXAxisTitle() ); } --- 263,306 ---- NumericTagGroup numericTagGroup= setupDataAxisProperties( this.yAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext ); this.yAxis.setAxisLabelsGroup( numericTagGroup ); ! // compute the labels of the right axis if necessary ! if ( this.axisProperties.getRightYAxisProperties().getShowAxis() ) ! { ! DataAxisProperties rightDataAxisProperties = ( DataAxisProperties ) this.getAxisProperties().getRightYAxisProperties(); ! NumericTagGroup numericTagGroup2 = new NumericTagGroup( rightDataAxisProperties.getScaleChartFont(), ! fontRenderContext, ! rightDataAxisProperties.useDollarSigns(), ! rightDataAxisProperties.usePercentSigns(), ! rightDataAxisProperties.useCommas(), ! rightDataAxisProperties.getRoundToNearest() ); ! ! if( rightDataAxisProperties.hasUserDefinedScale() ) ! { ! ScaleCalculator s = new UserDefinedScaleCalculator( rightDataAxisProperties.getUserDefinedMinimumValue(), ! rightDataAxisProperties.getUserDefinedIncrement() ); ! s.setRoundingPowerOfTen( rightDataAxisProperties.getRoundToNearest() ); ! s.setNumberOfScaleItems( rightDataAxisProperties.getNumItems() ); ! s.computeScaleValues(); ! numericTagGroup2.createAxisScaleLabels( s ); ! this.yAxis.setRightScaleCalculator( s ); ! ! } ! else ! { ! ScaleCalculator s = new AutomaticScaleCalculator(); ! s.setMaxValue( axisChartDataProcessor.getRightMaxValue() ); ! s.setMinValue( axisChartDataProcessor.getRightMinValue() ); ! s.setRoundingPowerOfTen( rightDataAxisProperties.getRoundToNearest() ); ! s.setNumberOfScaleItems( rightDataAxisProperties.getNumItems() ); ! s.computeScaleValues(); ! numericTagGroup2.createAxisScaleLabels( s ); ! this.yAxis.setRightScaleCalculator( s ); ! } ! this.yAxis.setAxisLabelsGroupRight(numericTagGroup2); ! } } //---if yAxisTitle is null, do not show title ! this.yAxis.computeMinimumWidthNeeded( iDataSeries.getYAxisTitle(), iDataSeries.getRightYAxisTitle() ); this.xAxis.computeMinimumHeightNeeded( iDataSeries.getXAxisTitle() ); } *************** *** 349,360 **** { //---SUBTRACT space for axis titles, labels, ticks... ! // Dual Y axis changes integrated CMC 25Aug03 ! // if there is a right axis to render we subtract twice the minimum width needed ! if (this.axisProperties.getYAxisProperties().getShowRightAxis()) ! xAxisWidth -= 2*this.yAxis.getMinimumWidthNeeded(); ! else ! xAxisWidth -= this.yAxis.getMinimumWidthNeeded(); ! yAxisHeight -= this.xAxis.getMinimumHeightNeeded(); //---SET THE PIXEL LENGTH OF THE AXIS --- 317,324 ---- { //---SUBTRACT space for axis titles, labels, ticks... ! // if there is a right axis to render we subtract the minimum width needed for that ! xAxisWidth = xAxisWidth - (this.yAxis.getMinimumLHSWidthNeeded() + this.yAxis.getMinimumRHSWidthNeeded()); ! yAxisHeight -= this.xAxis.getMinimumHeightNeeded(); //---SET THE PIXEL LENGTH OF THE AXIS *************** *** 376,380 **** || ( this.getLegend().getLegendProperties().getPlacement() == LegendAreaProperties.BOTTOM ) ) { ! this.xAxis.setOrigin( this.yAxis.getMinimumWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( yAxisHeight + super.getChartProperties().getEdgePadding() + chartTitleHeight ); } --- 340,344 ---- || ( this.getLegend().getLegendProperties().getPlacement() == LegendAreaProperties.BOTTOM ) ) { ! this.xAxis.setOrigin( this.yAxis.getMinimumLHSWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( yAxisHeight + super.getChartProperties().getEdgePadding() + chartTitleHeight ); } *************** *** 387,391 **** else if( this.getLegend().getLegendProperties().getPlacement() == LegendAreaProperties.TOP ) { ! this.xAxis.setOrigin( this.yAxis.getMinimumWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( super.getImageHeight() - super.getChartProperties().getEdgePadding() - this.xAxis.getMinimumHeightNeeded() ); } --- 351,355 ---- else if( this.getLegend().getLegendProperties().getPlacement() == LegendAreaProperties.TOP ) { ! this.xAxis.setOrigin( this.yAxis.getMinimumLHSWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( super.getImageHeight() - super.getChartProperties().getEdgePadding() - this.xAxis.getMinimumHeightNeeded() ); } *************** *** 393,397 **** else { ! this.xAxis.setOrigin( this.yAxis.getMinimumWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( yAxisHeight + super.getChartProperties().getEdgePadding() + chartTitleHeight ); } --- 357,361 ---- else { ! this.xAxis.setOrigin( this.yAxis.getMinimumLHSWidthNeeded() + super.getChartProperties().getEdgePadding() ); this.yAxis.setOrigin( yAxisHeight + super.getChartProperties().getEdgePadding() + chartTitleHeight ); } *************** *** 523,527 **** ! this.yAxis.render( g2d, this.getAxisProperties(), iAxisDataSeries.getYAxisTitle() ); this.xAxis.render( g2d, this.getAxisProperties(), iAxisDataSeries.getXAxisTitle() ); --- 487,491 ---- ! this.yAxis.render( g2d, this.getAxisProperties(), iAxisDataSeries.getYAxisTitle(), iAxisDataSeries.getRightYAxisTitle() ); this.xAxis.render( g2d, this.getAxisProperties(), iAxisDataSeries.getXAxisTitle() ); |
From: Chris M. <ki...@us...> - 2004-07-01 00:06:26
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25634/src/java/org/krysalis/jcharts Modified Files: Legend.java Log Message: Fix for Legend for combo charts where legend colors would get out of sync Index: Legend.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/Legend.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Legend.java 31 May 2004 21:11:51 -0000 1.11 --- Legend.java 1 Jul 2004 00:06:17 -0000 1.12 *************** *** 40,43 **** --- 40,45 ---- import java.awt.Paint; import java.awt.Shape; + import java.awt.Stroke; + import java.awt.BasicStroke; import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; *************** *** 87,91 **** private float width = 0; private float height = 0; ! //---used to extract the legendLabels and paints from the data set and make them easy to loop through --- 89,96 ---- private float width = 0; private float height = 0; ! ! // for Bar chart legend shape - size is automatically calculated later on ! private Rectangle2D barShape = new Rectangle2D.Double(0, 0, 0, 0); ! private Stroke barStroke = new BasicStroke(); //---used to extract the legendLabels and paints from the data set and make them easy to loop through *************** *** 93,96 **** --- 98,102 ---- private ArrayList paints; private ArrayList shapes = new ArrayList(); + private ArrayList strokes = new ArrayList(); private ArrayList fillPointsFlags = new ArrayList(); private ArrayList pointOutlinePaints = new ArrayList(); *************** *** 257,260 **** --- 263,267 ---- this.chartType = ChartType.LINE; this.lineChartProperties = (LineChartProperties) iAxisPlotDataSet.getChartTypeProperties(); + this.strokes.add( lineChartProperties.getLineStrokes()[ i ] ); if( lineChartProperties.getShapes() != null ) { *************** *** 262,265 **** --- 269,280 ---- } } + else + { + // just put place holder shape in as well as stroke so that order is maintained + // for combo bar and line charts. If we allow point/line/bar combos then we'll + // also have to add fillPointsFlags and Paints + this.shapes.add(barShape); + this.strokes.add(barStroke); + } } } *************** *** 504,508 **** // only Point and Line Charts will have shapes drawn ! if( this.shapes.size() > 0 && this.shapes.size() > labelIndex ) { //Shape shape = (Shape)this.shapes.get( labelIndex); --- 519,525 ---- // only Point and Line Charts will have shapes drawn ! if( this.shapes.size() > 0 && this.shapes.size() > labelIndex && ! !((Shape)this.shapes.get( labelIndex)).equals(barShape)) ! { //Shape shape = (Shape)this.shapes.get( labelIndex); *************** *** 544,548 **** double YOffset = shapeBounds.getHeight() / 2; ! g2d.setStroke(this.lineChartProperties.getLineStrokes()[ labelIndex]); Line2D.Double line = new Line2D.Double(0, YOffset, this.legendProperties.getIconLineStrokeLength(), YOffset); --- 561,566 ---- double YOffset = shapeBounds.getHeight() / 2; ! // g2d.setStroke(this.lineChartProperties.getLineStrokes()[ labelIndex]); ! g2d.setStroke((Stroke)this.strokes.get( labelIndex )); Line2D.Double line = new Line2D.Double(0, YOffset, this.legendProperties.getIconLineStrokeLength(), YOffset); |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:17:06
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13594/src/java/org/krysalis/jcharts/properties Modified Files: PieChart3DProperties.java Log Message: imports Index: PieChart3DProperties.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/properties/PieChart3DProperties.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PieChart3DProperties.java 19 May 2003 02:13:56 -0000 1.1 --- PieChart3DProperties.java 23 Jun 2004 02:16:56 -0000 1.2 *************** *** 37,42 **** --- 37,44 ---- import org.krysalis.jcharts.Chart; + import org.krysalis.jcharts.properties.util.ChartFont; import org.krysalis.jcharts.test.HTMLGenerator; import org.krysalis.jcharts.test.HTMLTestable; + import org.krysalis.jcharts.types.PieLabelType; *************** *** 50,55 **** { private int depth = 15; ! ! /********************************************************************************************* * --- 52,57 ---- { private int depth = 15; ! ! /********************************************************************************************* * |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:16:09
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13470/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart Modified Files: NonAxisChartTabs.java Log Message: Index: NonAxisChartTabs.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/NonAxisChartTabs.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NonAxisChartTabs.java 3 Jun 2004 00:59:01 -0000 1.2 --- NonAxisChartTabs.java 23 Jun 2004 02:15:56 -0000 1.3 *************** *** 1,3 **** - /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. --- 1,2 ---- *************** *** 37,70 **** ! import org.krysalis.jcharts.designer.tabs.TopLevelTabs; ! import javax.swing.*; ! /************************************************************************ * * @author Nathaniel Auvil * @version $Id$ ! ***********************************************************************/ ! public class NonAxisChartTabs extends JTabbedPane { ! private TopLevelTabs topLevelTabs; private NonAxisChartDataTab nonAxisChartDataTab; private PieChartTab pieChartTab; ! /******************************************************************************* ! * * @param topLevelTabs ! *******************************************************************************/ ! public NonAxisChartTabs( TopLevelTabs topLevelTabs ) { ! this.topLevelTabs= topLevelTabs; this.topLevelTabs.addTab( "Non Axis Charts", this ); ! this.nonAxisChartDataTab= new NonAxisChartDataTab( this ); ! this.pieChartTab= new PieChartTab( this ); ! } ! } --- 36,74 ---- ! import javax.swing.JTabbedPane; ! import org.krysalis.jcharts.designer.tabs.TopLevelTabs; ! import org.krysalis.jcharts.designer.tabs.nonAxisChart.pie3d.PieChart3dTab; ! /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id$ ! ****************************************************************************************/ ! public class NonAxisChartTabs extends JTabbedPane ! { private TopLevelTabs topLevelTabs; private NonAxisChartDataTab nonAxisChartDataTab; private PieChartTab pieChartTab; + private PieChart3dTab pieChart3dTab; ! /*************************************************************************************** ! * * @param topLevelTabs ! **************************************************************************************/ ! public NonAxisChartTabs( TopLevelTabs topLevelTabs ) ! { ! this.topLevelTabs = topLevelTabs; this.topLevelTabs.addTab( "Non Axis Charts", this ); ! this.nonAxisChartDataTab = new NonAxisChartDataTab( this ); ! this.pieChartTab = new PieChartTab( this ); + this.pieChart3dTab = new PieChart3dTab( this ); + this.addTab( "Pie Chart 3D", this.pieChart3dTab ); + } ! } \ No newline at end of file |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:15:58
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/pie3d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13446/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/pie3d Added Files: Depth.java PieChart3dTab.java Log Message: --- NEW FILE: Depth.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.nonAxisChart.pie3d; import javax.swing.BorderFactory; import javax.swing.JPanel; import org.krysalis.jcharts.designer.common.LabelledTextfield; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: Depth.java,v 1.1 2004/06/23 02:15:38 nathaniel_auvil Exp $ ****************************************************************************************/ public class Depth extends JPanel { private LabelledTextfield depth; /**************************************************************************** * ***************************************************************************/ public Depth() { super.setBorder( BorderFactory.createTitledBorder( "Depth" ) ); this.depth= new LabelledTextfield( "Depth", 3 ); super.add( this.depth ); } /***************************************************************************** * * @return int *****************************************************************************/ public int getDepth() { return Integer.parseInt( this.depth.getText() ); } } --- NEW FILE: PieChart3dTab.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.nonAxisChart.pie3d; import javax.swing.JPanel; import org.krysalis.jcharts.designer.common.stroke.StrokeChooser; import org.krysalis.jcharts.designer.tabs.nonAxisChart.NonAxisChartTabs; import org.krysalis.jcharts.properties.ChartProperties; import org.krysalis.jcharts.properties.ChartTypeProperties; import org.krysalis.jcharts.properties.PieChart3DProperties; import org.krysalis.jcharts.properties.util.ChartFont; import org.krysalis.jcharts.types.PieLabelType; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: PieChart3dTab.java,v 1.1 2004/06/23 02:15:38 nathaniel_auvil Exp $ ****************************************************************************************/ public class PieChart3dTab extends JPanel { private NonAxisChartTabs nonAxisChartTab; private Depth depth; private float zeroDegreeOffset; private PieLabelType labelType; private boolean isCurrency; private boolean showGrouping; private int roundingPowerOfTen; private ChartFont valueLabelFont; private float tickLength; /*************************************************************************************** * * @param nonAxisChartTab **************************************************************************************/ public PieChart3dTab( NonAxisChartTabs nonAxisChartTab ) { this.nonAxisChartTab = nonAxisChartTab; this.depth= new Depth(); super.add( depth ); } /****************************************************************************** * * @return ChartTypeProperties ***************************************************************************/ public ChartTypeProperties getChartTypeProperties() { PieChart3DProperties properties= new PieChart3DProperties(); properties.setDepth( this.depth.getDepth() ); return properties; } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:15:45
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/pie3d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13414/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/pie3d Log Message: Directory /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/pie3d added to the repository |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:15:23
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13381/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/data Added Files: DataTab.java Log Message: --- NEW FILE: DataTab.java --- /*********************************************************************************************** * Copyright 2004 (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.nonAxisChart.data; import javax.swing.*; import org.krysalis.jcharts.designer.common.LabelledTextfield; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: DataTab.java,v 1.1 2004/06/23 02:15:14 nathaniel_auvil Exp $ ****************************************************************************************/ public class DataTab extends JPanel { private LabelledTextfield labels; private LabelledTextfield data; private LabelledTextfield title; /*************************************************************************************** * **************************************************************************************/ public DataTab() { } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:15:21
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13346/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/data Log Message: Directory /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/nonAxisChart/data added to the repository |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:14:55
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13269/src/java/org/krysalis/jcharts/designer/tabs/common Added Files: DataTab.java Log Message: --- NEW FILE: DataTab.java --- /*********************************************************************************************** * Copyright 2004 (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.common; import javax.swing.*; import org.krysalis.jcharts.designer.common.LabelledTextfield; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: DataTab.java,v 1.1 2004/06/23 02:14:46 nathaniel_auvil Exp $ ****************************************************************************************/ public class DataTab extends JPanel { private LabelledTextfield labels; private LabelledTextfield data; private LabelledTextfield title; /*************************************************************************************** * **************************************************************************************/ public DataTab() { } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:14:50
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13252/src/java/org/krysalis/jcharts/designer/tabs/common Log Message: Directory /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/common added to the repository |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:14:39
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13219/src/java/org/krysalis/jcharts/designer/tabs/allChart/legendProperties Modified Files: LegendPropertiesTab.java Added Files: NumColumns.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.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LegendPropertiesTab.java 10 Jun 2004 12:03:51 -0000 1.2 --- LegendPropertiesTab.java 23 Jun 2004 02:14:27 -0000 1.3 *************** *** 63,66 **** --- 63,67 ---- //private int numColumns = COLUMNS_AS_MANY_AS_NEEDED; + private NumColumns numColumns; //---for LineCharts, length of line around point shapes as part of the icon in the legend. *************** *** 107,110 **** --- 108,114 ---- + this.numColumns= new NumColumns(); + jPanel.add( this.numColumns ); + super.setViewportView( jPanel ); } *************** *** 134,137 **** --- 138,142 ---- legendProperties.setPlacement( this.placementCombo.getSelectedIndex() ); + legendProperties.setNumColumns( this.numColumns.getNumberOfColumns() ); } } --- NEW FILE: NumColumns.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.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import org.krysalis.jcharts.designer.common.LabelledTextfield; import org.krysalis.jcharts.designer.exceptions.DesignerException; import org.krysalis.jcharts.properties.LegendAreaProperties; /***************************************************************************************** * * @author Nathaniel Auvil * @version $Id: NumColumns.java,v 1.1 2004/06/23 02:14:27 nathaniel_auvil Exp $ ****************************************************************************************/ public class NumColumns extends JPanel implements ActionListener, FocusListener { private JRadioButton asManyAsNeeded; private JRadioButton fitToImage; private JRadioButton specify; private JTextField numColumns; private int numberOfColumns= 0; /*************************************************************************************** * **************************************************************************************/ public NumColumns() { super.setBorder( BorderFactory.createTitledBorder( "Number Of Columns" ) ); this.setLayout( new BoxLayout( this, BoxLayout.X_AXIS ) ); JPanel jPanel= new JPanel(); this.asManyAsNeeded= new JRadioButton( "As Many As Needed" ); this.asManyAsNeeded.setActionCommand( "asManyAsNeeded" ); this.asManyAsNeeded.setSelected( true ); this.asManyAsNeeded.addActionListener( this ); jPanel.add( this.asManyAsNeeded ); this.fitToImage= new JRadioButton( "Fit To Image" ); this.fitToImage.setActionCommand( "fitToImage" ); this.fitToImage.addActionListener( this ); jPanel.add( this.fitToImage ); this.specify= new JRadioButton( "Specfic Number" ); this.specify.setActionCommand( "specificNumber" ); this.specify.addActionListener( this ); jPanel.add( this.specify ); this.numColumns= new JTextField( "1", 2 ); this.numColumns.addFocusListener( this ); jPanel.add( this.numColumns ); ButtonGroup radios= new ButtonGroup(); radios.add( this.asManyAsNeeded ); radios.add( this.fitToImage ); radios.add( this.specify ); super.add( jPanel ); } /************************************************************************ * * @param actionEvent ***********************************************************************/ public void actionPerformed( ActionEvent actionEvent ) { if( actionEvent.getSource().equals( this.asManyAsNeeded ) ) { this.numColumns.setEditable( false ); this.numberOfColumns= LegendAreaProperties.COLUMNS_AS_MANY_AS_NEEDED; } else if( actionEvent.getSource().equals( this.fitToImage ) ) { this.numColumns.setEditable( false ); this.numberOfColumns= LegendAreaProperties.COLUMNS_FIT_TO_IMAGE; } else if( actionEvent.getSource().equals( this.specify ) ) { this.numColumns.setEditable( true ); this.numberOfColumns= Integer.parseInt( this.numColumns.getText() ); } } public void focusGained( FocusEvent focusEvent ) { } public void focusLost( FocusEvent focusEvent ) { this.numberOfColumns= Integer.parseInt( this.numColumns.getText() ); } public int getNumberOfColumns() { return this.numberOfColumns; } } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:14:12
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/menuBar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13173/src/java/org/krysalis/jcharts/designer/menuBar Modified Files: DesignerMenuBar.java Log Message: Index: DesignerMenuBar.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/menuBar/DesignerMenuBar.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DesignerMenuBar.java 9 Aug 2003 17:07:22 -0000 1.1 --- DesignerMenuBar.java 23 Jun 2004 02:14:03 -0000 1.2 *************** *** 1,43 **** - /*************************************************************************************** - * File Info: $Id$ - * - * Description: - * - * Last Reviewed: NEVER - * Maintainer: Nathaniel Auvil - * Copyright: <copyright.icore> - ***************************************************************************************/ package org.krysalis.jcharts.designer.menuBar; import org.krysalis.jcharts.designer.Designer; - import javax.swing.*; - public class DesignerMenuBar extends JMenuBar { private Designer designer; ! ! public DesignerMenuBar( Designer designer ) { this.designer= designer; - - - /* this.fileMenu = this.addJMenu( "File", KeyEvent.VK_F ); this.createJMenuItem( "Load File...", KeyEvent.VK_L, new LoadFileAction( this, auditViewer.getAuditTableModel() ), this.fileMenu ); ! this.addFileMenuItem= this.createJMenuItem( "Add File...", KeyEvent.VK_A, new AddFileAction( this, auditViewer.getAuditTableModel() ), this.fileMenu ); ! this.addFileMenuItem.setEnabled( false ); ! this.refreshFileAction= new RefreshFileAction( this, auditViewer.getAuditTableModel() ); this.reloadFileMenuItem= this.createJMenuItem( "Reload File", KeyEvent.VK_R, this.refreshFileAction, this.fileMenu ); ! this.reloadFileMenuItem.setEnabled( false ); ! */ } --- 1,31 ---- package org.krysalis.jcharts.designer.menuBar; + import javax.swing.JMenuBar; import org.krysalis.jcharts.designer.Designer; public class DesignerMenuBar extends JMenuBar { private Designer designer; + //private JFileMenu fileMenu; ! public DesignerMenuBar( Designer designer ) ! { this.designer= designer; /* this.fileMenu = this.addJMenu( "File", KeyEvent.VK_F ); this.createJMenuItem( "Load File...", KeyEvent.VK_L, new LoadFileAction( this, auditViewer.getAuditTableModel() ), this.fileMenu ); ! this.addFileMenuItem= this.createJMenuItem( "Add File...", KeyEvent.VK_A, new AddFileAction( this, auditViewer.getAuditTableModel() ), this.fileMenu ); ! this.addFileMenuItem.setEnabled( false ); ! this.refreshFileAction= new RefreshFileAction( this, auditViewer.getAuditTableModel() ); this.reloadFileMenuItem= this.createJMenuItem( "Reload File", KeyEvent.VK_R, this.refreshFileAction, this.fileMenu ); ! this.reloadFileMenuItem.setEnabled( false ); + */ } |
From: Nathaniel G. A. <nat...@us...> - 2004-06-23 02:13:50
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/buttonBar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13107/src/java/org/krysalis/jcharts/designer/buttonBar Modified Files: ButtonPanel.java Added Files: ChartCombo.java Log Message: Index: ButtonPanel.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/buttonBar/ButtonPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ButtonPanel.java 9 Aug 2003 17:03:46 -0000 1.1 --- ButtonPanel.java 23 Jun 2004 02:13:42 -0000 1.2 *************** *** 37,43 **** import org.krysalis.jcharts.designer.tabs.LowerHalfPanel; - import javax.swing.*; --- 37,47 ---- + import javax.swing.BorderFactory; + import javax.swing.Box; + import javax.swing.BoxLayout; + import javax.swing.JPanel; + import org.krysalis.jcharts.designer.tabs.LowerHalfPanel; *************** *** 50,55 **** { private LowerHalfPanel lowerHalfPanel; - private RefreshChartButton refreshChartButton; /************************************************************************* --- 54,61 ---- { private LowerHalfPanel lowerHalfPanel; + private RefreshChartButton refreshChartButton; + private ChartCombo chartCombo; + /************************************************************************* *************** *** 59,70 **** public ButtonPanel( LowerHalfPanel lowerHalfPanel ) { - super(); - this.lowerHalfPanel = lowerHalfPanel; super.setBorder( BorderFactory.createEmptyBorder( 5, 5, 0, 5 ) ); - super.setLayout( new BoxLayout( this, BoxLayout.X_AXIS ) ); //---force button to the right super.add( Box.createHorizontalGlue() ); --- 65,76 ---- public ButtonPanel( LowerHalfPanel lowerHalfPanel ) { this.lowerHalfPanel = lowerHalfPanel; super.setBorder( BorderFactory.createEmptyBorder( 5, 5, 0, 5 ) ); super.setLayout( new BoxLayout( this, BoxLayout.X_AXIS ) ); + this.chartCombo= new ChartCombo(); + super.add( this.chartCombo ); + //---force button to the right super.add( Box.createHorizontalGlue() ); --- NEW FILE: ChartCombo.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.buttonBar; import org.krysalis.jcharts.designer.common.LabelledCombo; /************************************************************************************* * * @author Nathaniel Auvil * @version $Id: ChartCombo.java,v 1.1 2004/06/23 02:13:42 nathaniel_auvil Exp $ ************************************************************************************/ public class ChartCombo extends LabelledCombo { private static final String[] CHARTS= { "Pie Chart 2D", "Pie Chart 3D" }; /************************************************************************* * ************************************************************************/ public ChartCombo() { super( "Chart To Render", CHARTS ); } } |
From: Chris M. <ki...@us...> - 2004-06-18 22:35:15
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25805/src/java/org/krysalis/jcharts/axisChart/axis Modified Files: XAxis.java Log Message: 3D stacked bar chart added to list of charts that should not be started from 0 point on x axis Index: XAxis.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/axis/XAxis.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XAxis.java 14 Jun 2004 01:24:15 -0000 1.4 --- XAxis.java 18 Jun 2004 22:35:07 -0000 1.5 *************** *** 223,226 **** --- 223,227 ---- || iAxisPlotDataSet.getChartType().equals( ChartType.BAR_CLUSTERED ) || iAxisPlotDataSet.getChartType().equals( ChartType.BAR_STACKED ) + || iAxisPlotDataSet.getChartType().equals( ChartType.BAR_STACKED_3D ) || iAxisPlotDataSet.getChartType().equals( ChartType.LINE ) || iAxisPlotDataSet.getChartType().equals( ChartType.POINT ) |
From: Nathaniel G. A. <nat...@us...> - 2004-06-16 02:27:32
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18755/src/java/org/krysalis/jcharts/test Modified Files: ChartTestDriver.java ClusteredBarTestDriver.java AxisChartTestBase.java Log Message: Index: ChartTestDriver.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test/ChartTestDriver.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChartTestDriver.java 26 May 2004 01:58:07 -0000 1.3 --- ChartTestDriver.java 16 Jun 2004 02:27:23 -0000 1.4 *************** *** 75,79 **** stopWatch.start(); ! AxisChartTestBase.axisChartTest( "barChart", new BarTestDriver() ); /* --- 75,79 ---- stopWatch.start(); ! //AxisChartTestBase.axisChartTest( "barChart", new BarTestDriver() ); /* *************** *** 84,89 **** AxisChartTestBase.axisChartTest( "barChart", new BarTestDriver() ); AxisChartTestBase.axisChartTest( "stackedBarChart", new StackedBarTestDriver() ); AxisChartTestBase.axisChartTest( "clusteredBarChart", new ClusteredBarTestDriver() ); ! */ // AxisChartTestBase.axisChartTest( "comboChart", new ComboTestDriver() ); --- 84,90 ---- AxisChartTestBase.axisChartTest( "barChart", new BarTestDriver() ); AxisChartTestBase.axisChartTest( "stackedBarChart", new StackedBarTestDriver() ); + */ AxisChartTestBase.axisChartTest( "clusteredBarChart", new ClusteredBarTestDriver() ); ! // AxisChartTestBase.axisChartTest( "comboChart", new ComboTestDriver() ); Index: ClusteredBarTestDriver.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test/ClusteredBarTestDriver.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClusteredBarTestDriver.java 7 Dec 2003 14:03:51 -0000 1.2 --- ClusteredBarTestDriver.java 16 Jun 2004 02:27:23 -0000 1.3 *************** *** 94,97 **** --- 94,104 ---- clusteredBarChartProperties = new ClusteredBarChartProperties(); + if( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ) + { + ValueLabelRenderer valueLabelRenderer = new ValueLabelRenderer( false, false, false, 0 ); + valueLabelRenderer.setValueLabelPosition( ValueLabelPosition.ON_TOP ); + valueLabelRenderer.useVerticalLabels( false ); + clusteredBarChartProperties.addPostRenderEventListener( valueLabelRenderer ); + } axisChartDataSet = super.createAxisChartDataSet( ChartType.BAR_CLUSTERED, Index: AxisChartTestBase.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test/AxisChartTestBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AxisChartTestBase.java 27 May 2004 02:14:59 -0000 1.3 --- AxisChartTestBase.java 16 Jun 2004 02:27:23 -0000 1.4 *************** *** 88,92 **** DataSeries dataSeries= axisChartTestBase.getDataSeries(); ! boolean horizontalPlot= true; //( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ); boolean createImageMap= true; //( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ); --- 88,92 ---- DataSeries dataSeries= axisChartTestBase.getDataSeries(); ! boolean horizontalPlot= ( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ); boolean createImageMap= true; //( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ); |
From: Nathaniel G. A. <nat...@us...> - 2004-06-16 02:27:03
|
Update of /cvsroot/jcharts/krysalis-jcharts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18400 Modified Files: status.xml Log Message: Index: status.xml =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/status.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** status.xml 10 Jun 2004 12:04:18 -0000 1.20 --- status.xml 16 Jun 2004 02:26:51 -0000 1.21 *************** *** 3,7 **** <developers> - <person name="Nathaniel Auvil" email="nat...@us..." id="nathaniel_auvil"/> <!-- Add more people here --> </developers> --- 3,6 ---- *************** *** 48,51 **** --- 47,56 ---- <action dev="nathaniel_auvil" type="fix" context="code"> <code>PieChart2D</code> was not rendering correctly when Legend was placed on the LEFT side. + </action> + <action dev="Chris McKay" type="add" context="code"> + Added ability to display X-Axis labels at arbitrary angles. + </action> + <action dev="Steve Skillcorn / Chris McKay" type="add" context="code"> + Added 3D Stacked Bar Chart. </action> </release> |
From: Nathaniel G. A. <nat...@us...> - 2004-06-16 02:26:42
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18082/src/documentation/content/xdocs Modified Files: credits.xml Log Message: Index: credits.xml =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/credits.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** credits.xml 5 Jun 2004 13:21:57 -0000 1.4 --- credits.xml 16 Jun 2004 02:26:33 -0000 1.5 *************** *** 19,22 **** --- 19,30 ---- <td>Fixed Clustered Bar label when a zero value.</td> </tr> + <tr> + <td>Chris McKay</td> + <td>Added ability to display X-Axis labels at arbitrary angles.</td> + </tr> + <tr> + <td>Steve Skillcorn, Chris McKay</td> + <td>Added 3D Stacked Bar Chart.</td> + </tr> </table> </section> |
From: Chris M. <ki...@us...> - 2004-06-14 05:08:43
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9127/src/documentation/content/xdocs/samples Modified Files: stackedBar.xml Log Message: 3D stacked bar chart functionality added Index: stackedBar.xml =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/samples/stackedBar.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stackedBar.xml 28 May 2003 02:38:46 -0000 1.1 --- stackedBar.xml 14 Jun 2004 05:08:34 -0000 1.2 *************** *** 15,18 **** --- 15,23 ---- <p/> </section> + <section> + <title>Stacked 3D Bar Chart</title> + <figure src="images/samples/stackedBar/stacked3DBarChart.png" alt="Stacked 3D Bar Chart" width="550" height="360"/> + <p/> + </section> <section> <title>Horizontal Stacked Bar Chart</title> |
From: Chris M. <ki...@us...> - 2004-06-14 05:08:16
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/resources/images/samples/stackedBar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8885/src/documentation/resources/images/samples/stackedBar Added Files: stacked3DBarChart.png Log Message: 3D stacked bar chart functionality added --- NEW FILE: stacked3DBarChart.png --- (This appears to be a binary file; contents omitted.) |
From: Chris M. <ki...@us...> - 2004-06-14 05:01:04
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/types In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4328/src/java/org/krysalis/jcharts/types Modified Files: ChartType.java Log Message: 3D stacked bar chart functionality added Index: ChartType.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/types/ChartType.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChartType.java 31 May 2004 15:38:56 -0000 1.2 --- ChartType.java 14 Jun 2004 05:00:53 -0000 1.3 *************** *** 55,59 **** public static final ChartType AREA_STACKED=new ChartType( 6, true ); public static final ChartType STOCK=new ChartType( 7, false ); ! public static final ChartType SCATTER_PLOT=new ChartType( 8, false ); --- 55,60 ---- public static final ChartType AREA_STACKED=new ChartType( 6, true ); public static final ChartType STOCK=new ChartType( 7, false ); ! public static final ChartType SCATTER_PLOT=new ChartType( 8, false ); ! public static final ChartType BAR_STACKED_3D=new ChartType( 9, true ); |
From: Chris M. <ki...@us...> - 2004-06-14 05:00:38
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4140/src/java/org/krysalis/jcharts/test Added Files: StackedBar3DTestDriver.java Log Message: 3D stacked bar chart functionality added --- NEW FILE: StackedBar3DTestDriver.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.test; import java.awt.*; import org.krysalis.jcharts.axisChart.AxisChart; import org.krysalis.jcharts.axisChart.customRenderers.axisValue.renderers.ValueLabelPosition; import org.krysalis.jcharts.axisChart.customRenderers.axisValue.renderers.ValueLabelRenderer; import org.krysalis.jcharts.chartData.*; import org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries; import org.krysalis.jcharts.encoders.*; import org.krysalis.jcharts.imageMap.ImageMap; import org.krysalis.jcharts.properties.*; import org.krysalis.jcharts.properties.util.*; import org.krysalis.jcharts.types.ChartType; /****************************************************************************************** * This file provides examples of how to create all the different chart types provided by * this package. * * @author Steve Skillcorn * @version $Id: StackedBar3DTestDriver.java,v 1.1 2004/06/14 05:00:29 kiwicmc Exp $ *******************************************************************************************/ public class StackedBar3DTestDriver { boolean supportsImageMap() { return true; } public static void main(String[] args) throws PropertyException, ChartDataException { ChartProperties chartProperties = new ChartProperties(); StackedBarChart3DProperties stackedBarChart3DProperties = new StackedBarChart3DProperties();; IAxisDataSeries dataSeries; AxisChartDataSet axisChartDataSet; AxisProperties axisProperties = new AxisProperties(false); ChartFont axisScaleFont; ChartFont axisTitleFont; axisScaleFont = new ChartFont(new Font("Arial", Font.BOLD, 10), Color.black); axisTitleFont = new ChartFont(new Font("Arial", Font.BOLD, 10), Color.black); axisProperties.getYAxisProperties().setShowEndBorder(false); axisProperties.getXAxisProperties().setShowEndBorder(false); axisProperties.getXAxisProperties().setLabelRotationAngle(30); String[] axisLabels = {"Aug 13", "Aug 14", "Aug 15", "Aug 16", "Aug 17", "Aug 18", "Aug 19", "Aug 20"}; dataSeries = new DataSeries(axisLabels, " ", "Total Backup Events", null); //Set the width of the bars and don't show the outline stackedBarChart3DProperties.setWidthPercentage( 0.70f ); stackedBarChart3DProperties.setShowOutlinesFlag(false); //Bars double[][] barData = { { 11, 120, 163, 150, 107, 148, 152, 169}, { 0, 6, 4, 6, 9, 1, 0, 7}, { 0, 12, 0, 2, 1, 22, 5, 2}}; Paint[] paints = {new Color(0x00, 0x56,0x99), new Color(0xD1,0xD6,0x18), new Color(0xB3,0x05,0x05) }; String[] legendLabels = {"Successful", "Warnings", "Failures"}; axisChartDataSet = new AxisChartDataSet(barData, legendLabels, paints, ChartType.BAR_STACKED_3D, stackedBarChart3DProperties); dataSeries.addIAxisPlotDataSet(axisChartDataSet); axisProperties.getXAxisProperties().setScaleChartFont(axisScaleFont); axisProperties.getYAxisProperties().setScaleChartFont(axisTitleFont); axisProperties.getXAxisProperties().setTitleChartFont(axisScaleFont); axisProperties.getYAxisProperties().setTitleChartFont(axisTitleFont); axisProperties.getXAxisProperties().setAxisTitleChartFont(axisScaleFont); axisProperties.getYAxisProperties().setAxisTitleChartFont(axisTitleFont); LegendProperties legendProperties = new LegendProperties(); legendProperties.setBorderStroke(null); legendProperties.setChartFont(axisScaleFont); AxisChart axisChart = new AxisChart(dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 ); axisChart.renderWithImageMap(); ChartTestDriver.exportImage( axisChart, "c:/temp/jcharts/Stacked3DChart.png" ); } } |