krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke StrokeChooser.java,1.1,1.2 EndCapsCombo.java,1.1,1.2 LineJoinsCombo.java,1.1,1.2
"Nathaniel G. Auvil" <[email protected]> Tue, 25 May 2004 01:04:09 +0000
| Newsgroups | gmane.comp.krysalis.jcharts.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3969/src/java/org/krysalis/jcharts/designer/common/stroke
Modified Files:
StrokeChooser.java EndCapsCombo.java LineJoinsCombo.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.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StrokeChooser.java 9 Aug 2003 17:05:38 -0000 1.1
--- StrokeChooser.java 25 May 2004 01:04:07 -0000 1.2
***************
*** 37,41 ****
--- 37,46 ----
+ import java.awt.BasicStroke;
+ import java.awt.Color;
+ import java.awt.Stroke;
+
import org.krysalis.jcharts.designer.common.LabelledTextfield;
+ import org.krysalis.jcharts.properties.util.ChartStroke;
import javax.swing.*;
***************
*** 64,68 ****
this.setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );
! this.widthField= new LabelledTextfield( "Width" );
super.add( this.widthField );
--- 69,73 ----
this.setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );
! this.widthField= new LabelledTextfield( "Width", 4 );
super.add( this.widthField );
***************
*** 89,93 ****
this.setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );
! this.widthField= new LabelledTextfield( "Width" );
super.add( this.widthField );
--- 94,99 ----
this.setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );
! this.widthField= new LabelledTextfield( "Width", 3 );
! this.widthField.setText( "1" );
super.add( this.widthField );
***************
*** 100,102 ****
--- 106,120 ----
+ /*****************************************************************
+ *
+ * @return ChartStroke
+ ****************************************************************/
+ public ChartStroke getChartStroke()
+ {
+ Stroke stroke= new BasicStroke( Float.valueOf( this.widthField.getText() ).floatValue(),
+ this.endCaps.getEndCapsConstant(),
+ this.lineJoins.getLineJoinsConstant() );
+ return new ChartStroke( stroke, Color.BLACK );
+ //TODO need to get the Paint
+ }
}
Index: LineJoinsCombo.java
===================================================================
RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke/LineJoinsCombo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LineJoinsCombo.java 9 Aug 2003 17:05:38 -0000 1.1
--- LineJoinsCombo.java 25 May 2004 01:04:07 -0000 1.2
***************
*** 50,54 ****
static
{
! ALL_LINE_JOINS= new String[]{ "BEVEL", "MITER", "ROUND" };
}
--- 50,54 ----
static
{
! ALL_LINE_JOINS= new String[]{ "MITER", "BEVEL", "ROUND" };
}
***************
*** 62,64 ****
--- 62,74 ----
}
+
+ /*****************************************************************
+ *
+ * @return int the Constant value for the selected value
+ * @see java.awt.BasicStroke
+ *****************************************************************/
+ public int getLineJoinsConstant()
+ {
+ return super.getSelectedIndex();
+ }
}
Index: EndCapsCombo.java
===================================================================
RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/common/stroke/EndCapsCombo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EndCapsCombo.java 9 Aug 2003 17:05:38 -0000 1.1
--- EndCapsCombo.java 25 May 2004 01:04:07 -0000 1.2
***************
*** 62,64 ****
--- 62,74 ----
}
+
+ /**************************************************************
+ *
+ * @return int
+ * @see java.awt.BasicStroke
+ *************************************************************/
+ protected int getEndCapsConstant()
+ {
+ return super.getSelectedIndex();
+ }
}
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click