graxml-commit Mailing List for GraXML (Page 10)
Brought to you by:
hrivnac
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
|
Aug
(12) |
Sep
(32) |
Oct
(41) |
Nov
(16) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(10) |
Feb
(10) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(12) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
(169) |
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(100) |
Nov
(14) |
Dec
(10) |
2008 |
Jan
(37) |
Feb
(4) |
Mar
(10) |
Apr
(73) |
May
(22) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Julius H. <hr...@us...> - 2007-10-15 15:46:12
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15364/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps Modified Files: S3D.java STC.java Track.java Log Message: cleaning Index: S3D.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/S3D.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** S3D.java 10 Oct 2007 18:48:38 -0000 1.4 --- S3D.java 15 Oct 2007 15:45:42 -0000 1.5 *************** *** 27,30 **** --- 27,31 ---- import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; + import javax.media.j3d.Material; import javax.media.j3d.PointAttributes; import javax.media.j3d.PointArray; *************** *** 56,59 **** --- 57,63 ---- * <pre> * $Log$ + * Revision 1.5 2007/10/15 15:45:42 hrivnac + * cleaning + * * Revision 1.4 2007/10/10 18:48:38 hrivnac * lines and points with sizes *************** *** 73,77 **** * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ // TBD: use HEP3D - // TBD: use static colors only if they are set public final class S3D extends JiveRep { --- 77,80 ---- *************** *** 102,125 **** String name = "S3D(" + storeGateKey + ")"; String info = name + "[1-" + count + "]"; - // Color is handled directly - //Appearance appearance = builder().appearance(name, name); - //setAppearance(appearance); - // Color is handled directly boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape = new Shape3D(); - Appearance appearance = new Appearance(); - appearance.setPointAttributes(new PointAttributes(_pointSize, true)); - shape.setAppearance(appearance); PointArray pointArray; ! Color3f color; for (int i = 0; i < count; i++) { ! color = new Color3f(_colorMap[_colorList[i]]); pointArray = new PointArray(1, GeometryArray.COORDINATES| GeometryArray.COLOR_3); ! pointArray.setCoordinate(0, new Point3f(xs[i] / SCALE, ! ys[i] / SCALE, ! zs[i] / SCALE)); pointArray.setColor(0, color); shape.addGeometry(pointArray); --- 105,137 ---- String name = "S3D(" + storeGateKey + ")"; String info = name + "[1-" + count + "]"; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape = new Shape3D(); PointArray pointArray; ! Appearance appearance; ! Material material; ! Color3f color = null;; for (int i = 0; i < count; i++) { ! // ColorList is set => get Appearance from Color ! if (_colorList == null) { ! appearance = builder().appearance(name, name); ! material = appearance.getMaterial(); ! material.getSpecularColor(color); ! } ! // ColorList is not set => get Color from Appearance ! else { ! appearance = new Appearance(); ! color = new Color3f(_colorMap[_colorList[i]]); ! appearance.setMaterial(new Material(color, color, color, color, 1f)); ! } ! appearance.setPointAttributes(new PointAttributes(_pointSize, true)); ! shape.setAppearance(appearance); ! setAppearance(appearance); pointArray = new PointArray(1, GeometryArray.COORDINATES| GeometryArray.COLOR_3); ! pointArray.setCoordinate(0, new Point3d(xs[i] / builder().norm(), ! ys[i] / builder().norm(), ! zs[i] / builder().norm())); pointArray.setColor(0, color); shape.addGeometry(pointArray); *************** *** 141,150 **** private static int[] _colorList; ! // TBD public static void setPointSize(int pointSize) { _pointSize = pointSize; } ! private static int _pointSize = 3; /** Logging . */ --- 153,164 ---- private static int[] _colorList; ! /** Set size of points, ! * the default is <code>4</code>. ! * @param lineWidth The size of points. */ public static void setPointSize(int pointSize) { _pointSize = pointSize; } ! private static int _pointSize = 4; /** Logging . */ Index: STC.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/STC.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** STC.java 10 Oct 2007 18:48:38 -0000 1.3 --- STC.java 15 Oct 2007 15:45:42 -0000 1.4 *************** *** 28,33 **** import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; - import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.LineAttributes; import javax.media.j3d.LineArray; --- 28,33 ---- import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.Appearance; + import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.LineArray; *************** *** 59,62 **** --- 59,65 ---- * <pre> * $Log$ + * Revision 1.4 2007/10/15 15:45:42 hrivnac + * cleaning + * * Revision 1.3 2007/10/10 18:48:38 hrivnac * lines and points with sizes *************** *** 73,77 **** * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ // TBD: use HEP3D - // TBD: use static colors only if they are set public final class STC extends JiveRep { --- 76,79 ---- *************** *** 105,135 **** // Draw all STCs - Point3d[] points = new Point3d[count]; String name = "STC(" + storeGateKey + ")"; String info = name + "[1-" + count + "]"; - // Color is handled directly - //Appearance appearance = builder().appearance(name, name); - //setAppearance(appearance); - //shape.setAppearance(appearance); boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape = new Shape3D(); - Appearance appearance = new Appearance(); - appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); - shape.setAppearance(appearance); LineArray lineArray; ! Color3f color; for (int i = 0; i < count; i++) { ! color = new Color3f(_colorMap[_colorList[i]]); lineArray = new LineArray(2, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); ! lineArray.setCoordinate(0, new Point3f(x0s[i] / SCALE, ! y0s[i] / SCALE, ! z0s[i] / SCALE)); ! lineArray.setCoordinate(1, new Point3f(x1s[i] / SCALE, ! y1s[i] / SCALE, ! z1s[i] / SCALE)); lineArray.setColor(0, color); lineArray.setColor(1, color); --- 107,145 ---- // Draw all STCs String name = "STC(" + storeGateKey + ")"; String info = name + "[1-" + count + "]"; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape = new Shape3D(); LineArray lineArray; ! Appearance appearance; ! Material material; ! Color3f color = null;; for (int i = 0; i < count; i++) { ! // ColorList is set => get Appearance from Color ! if (_colorList == null) { ! appearance = builder().appearance(name, name); ! material = appearance.getMaterial(); ! material.getSpecularColor(color); ! } ! // ColorList is not set => get Color from Appearance ! else { ! appearance = new Appearance(); ! color = new Color3f(_colorMap[_colorList[i]]); ! appearance.setMaterial(new Material(color, color, color, color, 1f)); ! } ! appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); ! shape.setAppearance(appearance); ! setAppearance(appearance); lineArray = new LineArray(2, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); ! lineArray.setCoordinate(0, new Point3d(x0s[i] / builder().norm(), ! y0s[i] / builder().norm(), ! z0s[i] / builder().norm())); ! lineArray.setCoordinate(1, new Point3d(x1s[i] / builder().norm(), ! y1s[i] / builder().norm(), ! z1s[i] / builder().norm())); lineArray.setColor(0, color); lineArray.setColor(1, color); *************** *** 155,164 **** private static int[] _colorList; ! // TBD public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } ! private static int _lineWidth = 3; /** Logging . */ --- 165,176 ---- private static int[] _colorList; ! /** Set width of line segments, ! * the default is <code>2</code>. ! * @param lineWidth The width of line segments. */ public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } ! private static int _lineWidth = 2; /** Logging . */ Index: Track.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/Track.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Track.java 10 Oct 2007 18:48:38 -0000 1.3 --- Track.java 15 Oct 2007 15:45:42 -0000 1.4 *************** *** 41,44 **** --- 41,45 ---- import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; + import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.LineArray; *************** *** 73,76 **** --- 74,80 ---- * <pre> * $Log$ + * Revision 1.4 2007/10/15 15:45:42 hrivnac + * cleaning + * * Revision 1.3 2007/10/10 18:48:38 hrivnac * lines and points with sizes *************** *** 113,116 **** --- 117,122 ---- float[] zs; int n; + + // Draw all Tracks String name; String info; *************** *** 119,122 **** --- 125,130 ---- Shape3D shape; LineArray lineArray; + Appearance appearance; + Material material; Color3f color = null; int j; *************** *** 131,149 **** info = name + "[1-" + n + "]"; shape = new Shape3D(); ! // Color is handled directly if _colorList is set ! // TBD: put "if" to other reps ! // TBD: loop over if not big enough if (_colorList == null) { ! Appearance appearance = builder().appearance(name, name); ! setAppearance(appearance); ! appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); ! shape.setAppearance(appearance); } else { ! Appearance appearance = new Appearance(); ! appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); ! shape.setAppearance(appearance); color = new Color3f(_colorMap[_colorList[_colorI++]]); } lineArray = new LineArray(2 * n, GeometryArray.COORDINATES| --- 139,157 ---- info = name + "[1-" + n + "]"; shape = new Shape3D(); ! // ColorList is set => get Appearance from Color if (_colorList == null) { ! appearance = builder().appearance(name, name); ! material = appearance.getMaterial(); ! material.getSpecularColor(color); } + // ColorList is not set => get Color from Appearance else { ! appearance = new Appearance(); color = new Color3f(_colorMap[_colorList[_colorI++]]); + appearance.setMaterial(new Material(color, color, color, color, 1f)); } + appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); + shape.setAppearance(appearance); + setAppearance(appearance); lineArray = new LineArray(2 * n, GeometryArray.COORDINATES| *************** *** 154,179 **** for (int i = 0; i < n; i++) { if (i > 0 && i < n - 1) { ! lineArray.setCoordinate(j, new Point3f(xs[i] / SCALE, ! ys[i] / SCALE, ! zs[i] / SCALE)); ! if (_colorList != null) { ! lineArray.setColor(j, color); ! } lineArray.setNormal(j, new Vector3f(0, 0, 0)); - j++; shape.addGeometry(lineArray); } ! lineArray.setCoordinate(j, new Point3f(xs[i] / SCALE, ! ys[i] / SCALE, ! zs[i] / SCALE)); ! if (_colorList != null) { ! lineArray.setColor(j, color); ! } lineArray.setNormal(j, new Vector3f(0, 0, 0)); - j++; shape.addGeometry(lineArray); } // Use Track use(shape, name, info); } // Clean --- 162,194 ---- for (int i = 0; i < n; i++) { if (i > 0 && i < n - 1) { ! lineArray.setCoordinate(j, new Point3d(xs[i] / builder().norm(), ! ys[i] / builder().norm(), ! zs[i] / builder().norm())); ! lineArray.setColor(j, color); lineArray.setNormal(j, new Vector3f(0, 0, 0)); shape.addGeometry(lineArray); + j++; } ! lineArray.setCoordinate(j, new Point3d(xs[i] / builder().norm(), ! ys[i] / builder().norm(), ! zs[i] / builder().norm())); ! lineArray.setColor(j, color); lineArray.setNormal(j, new Vector3f(0, 0, 0)); shape.addGeometry(lineArray); + j++; } // Use Track use(shape, name, info); + // Constructand Use Track label + // TBD: check pt, use pt + if (_text) { + _end = new Vector3d(xs[n - 1] / builder().norm(), + ys[n - 1] / builder().norm(), + zs[n - 1] / builder().norm()); + Group tmpTg = tg(); + BranchGroup bg = drawText(name, 0, name); + use(bg, name + "Txt", info); + setTg(tmpTg); + } } // Clean *************** *** 213,217 **** Group tmpTg = tg(); String name = "track(" + storeGateKey + ")"; ! String info = name; // TBD: add data Appearance appearance = builder().appearance(name, name); setAppearance(appearance); --- 228,232 ---- Group tmpTg = tg(); String name = "track(" + storeGateKey + ")"; ! String info = name; Appearance appearance = builder().appearance(name, name); setAppearance(appearance); *************** *** 275,281 **** /** Draw one Track {@link BillboardGroup}. * @param name The name of the Track. ! * @param pt The <code>pt</code> of the Track. * @param legenda The particle <code>name</code> of the Track to be shown. ! * @return The {@link BillboardGroup} representing the Track. */ private BillboardGroup drawText(String name, double pt, --- 290,296 ---- /** Draw one Track {@link BillboardGroup}. * @param name The name of the Track. ! * @param pt The <code>pt</code> of the Track (not used if <tt>0</tt>). * @param legenda The particle <code>name</code> of the Track to be shown. ! * @return The {@link BillboardGroup} representing the Track. */ private BillboardGroup drawText(String name, double pt, *************** *** 288,292 **** Transform3D it3d = new Transform3D(); double textSize = _textSizeFactor; ! if (pt < 1) { textSize = _textSizeFactor * pt; } --- 303,307 ---- Transform3D it3d = new Transform3D(); double textSize = _textSizeFactor; ! if (pt != 0 && pt < 1) { textSize = _textSizeFactor * pt; } *************** *** 311,315 **** * @param textPtCut The minimal pt of the Track to have textual description, * the default is <code>1.0</code>. ! * @see #setText . */ public static final void setTextPtCut(float textPtCut) { _textPtCut = textPtCut; --- 326,336 ---- * @param textPtCut The minimal pt of the Track to have textual description, * the default is <code>1.0</code>. ! * @see #setText . */ // TBD: 1.5 ! private int signum(double x) { ! if (x > 0) return 1; ! else if (x < 0) return -1; ! else return 0; ! } ! public static final void setTextPtCut(float textPtCut) { _textPtCut = textPtCut; *************** *** 317,321 **** /** Set text description drawing. ! * @param text Whether draw text description of the STr, * the default is <code>true</code>. * @see #setTextPtCut . */ --- 338,342 ---- /** Set text description drawing. ! * @param text Whether draw text description of the Track, * the default is <code>true</code>. * @see #setTextPtCut . */ *************** *** 330,334 **** private static boolean _text = true; ! private static double _textSizeFactor = 10.0f; /** Set {@link Color}s to be used for line segments. --- 351,355 ---- private static boolean _text = true; ! private static double _textSizeFactor = 20.0f; /** Set {@link Color}s to be used for line segments. *************** *** 347,356 **** private static int _colorI; ! // TBD public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } ! private static int _lineWidth = 3; /** Logging . */ --- 368,379 ---- private static int _colorI; ! /** Set width of line segments, ! * the default is <code>2</code>. ! * @param lineWidth The width of line segments. */ public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } ! private static int _lineWidth = 2; /** Logging . */ |
From: Julius H. <hr...@us...> - 2007-10-15 15:46:12
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15364/net/hep/atlas/graphics/JiveEvent/GeometricModel Modified Files: JiveEventBuilder.java PDG.java Removed Files: Evaluator.java Log Message: cleaning Index: JiveEventBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/JiveEventBuilder.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** JiveEventBuilder.java 10 Oct 2007 18:48:37 -0000 1.8 --- JiveEventBuilder.java 15 Oct 2007 15:45:42 -0000 1.9 *************** *** 22,25 **** --- 22,28 ---- * <pre> * $Log$ + * Revision 1.9 2007/10/15 15:45:42 hrivnac + * cleaning + * * Revision 1.8 2007/10/10 18:48:37 hrivnac * lines and points with sizes *************** *** 73,77 **** * @return The list of (embedded) demostration files. */ public String[] demos() { ! String[] demos = {"net/hep/atlas/graphics/JiveEvent/Test/data/JiveXML_5200_01388.xml"}; return demos; } --- 76,81 ---- * @return The list of (embedded) demostration files. */ public String[] demos() { ! //String[] demos = {"net/hep/atlas/graphics/JiveEvent/Test/data/JiveXML_5200_01388.xml"}; ! String[] demos = {}; return demos; } *************** *** 106,110 **** return _schemaEmbedded; } ! private static String _schema = "event.xsd"; --- 110,120 ---- return _schemaEmbedded; } ! ! /** Get renormalisation factor. ! * @return The renormalisation factor. */ ! public double norm() { ! return _norm; ! } ! private static String _schema = "event.xsd"; *************** *** 115,118 **** --- 125,130 ---- private static String _jaxb = "net.hep.atlas.graphics.JiveEvent.JAXB"; + private static double _norm = 100.0; + /** Logging . */ private static Logger log = Logger.getLogger(JiveEventBuilder.class); --- Evaluator.java DELETED --- Index: PDG.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/PDG.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PDG.java 2 Oct 2007 18:41:02 -0000 1.3 --- PDG.java 15 Oct 2007 15:45:42 -0000 1.4 *************** *** 19,23 **** import java.io.IOException; import static java.lang.Math.abs; ! // import static java.lang.Math.signum; // TBD: 1.5 // Log4J --- 19,23 ---- import java.io.IOException; import static java.lang.Math.abs; ! import static java.lang.Math.signum; // Log4J *************** *** 30,33 **** --- 30,36 ---- * <pre> * $Log$ + * Revision 1.4 2007/10/15 15:45:42 hrivnac + * cleaning + * * Revision 1.3 2007/10/02 18:41:02 hrivnac * S3D added *************** *** 106,110 **** * @param code The PDG code of the particle. * return The charge of the particle, <code>1</code> if unknown.. */ ! // TBD: ??? public int charge(int code) { Integer ch = _charges.get(abs(code)); --- 109,113 ---- * @param code The PDG code of the particle. * return The charge of the particle, <code>1</code> if unknown.. */ ! // TBD: ??? public int charge(int code) { Integer ch = _charges.get(abs(code)); *************** *** 121,131 **** /** Logging . */ private static Logger log = Logger.getLogger(PDG.class); - - // TBD: 1.5 - private int signum(double x) { - if (x > 0) return 1; - else if (x < 0) return -1; - else return 0; - } } --- 124,127 ---- |
From: Julius H. <hr...@us...> - 2007-10-15 15:45:51
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Test/data In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15364/net/hep/atlas/graphics/JiveEvent/Test/data Added Files: JiveXML_5200_01388.xml Removed Files: TileOnly.xml test_eventFast.xml Log Message: cleaning --- NEW FILE: JiveXML_5200_01388.xml --- <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="JiveXML_event.xsl"?> <?ATLAS Release: "None"?> <!--DOCTYPE Event SYSTEM "event.dtd"--> <Event version="None" runNumber="5200" eventNumber="1388" dateTime=""> <Cluster count="13" storeGateKey=""> <cells multiple="95.538462"> 759169278 759169280 759169282 759169284 759169286 759169790 759169792 759169794 759169796 759169798 759170302 759170304 759170306 759170308 759170310 759170814 759170816 759170818 759170820 759170822 759171326 759171328 759171330 759171332 759171334 757072446 757072448 757072958 757072960 757073470 757073472 757073982 757073984 757074494 757074496 757075006 757075008 757075518 757075520 757076030 757076032 757076542 757076544 757077054 757077056 757077566 757077568 757078078 757078080 757078590 757078592 757079102 757079104 757079614 757079616 757080126 757080128 757080638 757080640 757081150 757081152 757081662 757081664 757082174 757082176 757082686 757082688 757083198 757083200 757083710 757083712 757084222 757084224 757084734 757084736 757085246 757085248 [...86000 lines suppressed...] </tracks> <x> 8.162340 -1.217913 -1.035120 -1.588719 -1.734069 4.955536 0.027480 -0.008987 0.002016 0.000000 0.027469 -0.016207 -0.016208 -0.020935 -0.006929 0.000000 0.001040 -0.000483 -0.000019 0.001221 -0.000348 -0.000405 -0.000007 -0.000513 0.001101 -0.000082 </x> <y> 15.369394 -13.587709 16.610336 -3.691363 -3.878444 9.077147 0.059030 0.032665 0.000465 0.000000 0.059026 0.040134 0.040134 0.006516 0.003100 0.000000 -0.000023 -0.001290 0.000246 -0.000194 -0.001302 -0.000104 0.000249 0.000825 -0.000038 -0.001080 </y> <z> -5.204494 8.548170 -1.594421 5.682192 5.048850 -0.437959 3.681161 3.493203 3.700140 0.000000 3.681164 3.468160 3.468154 3.713604 3.706900 0.000000 3.710191 3.595890 3.742434 3.710086 3.593312 4.325494 3.744232 3.683528 3.707629 3.590901 </z> </RVx> </Event> --- test_eventFast.xml DELETED --- --- TileOnly.xml DELETED --- |
From: Julius H. <hr...@us...> - 2007-10-12 23:47:30
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/doc-files In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv408/net/hep/graphics/GraXML/doc-files Modified Files: Guide.html Log Message: monitoring (fps, mb) added Index: Guide.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/doc-files/Guide.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Guide.html 9 Oct 2007 17:17:51 -0000 1.22 --- Guide.html 12 Oct 2007 23:47:29 -0000 1.23 *************** *** 931,934 **** --- 931,935 ---- <li>Migrated to Java3D 1.5.1.</li> <li>Support for both i386 and amd64 architectures on Linux.</li> + <li>Performance monitoring (fps, mb) included.</li> </ul> <li>Bug fixes:</li> |
From: Julius H. <hr...@us...> - 2007-10-12 23:47:30
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv408/net/hep/graphics/GraXML/GUI Modified Files: RootWindow.java Log Message: monitoring (fps, mb) added Index: RootWindow.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/RootWindow.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RootWindow.java 11 Oct 2007 14:41:11 -0000 1.10 --- RootWindow.java 12 Oct 2007 23:47:28 -0000 1.11 *************** *** 79,82 **** --- 79,85 ---- * <pre> * $Log$ + * Revision 1.11 2007/10/12 23:47:28 hrivnac + * monitoring (fps, mb) added + * * Revision 1.10 2007/10/11 14:41:11 hrivnac * connection to Atlantis improved *************** *** 412,416 **** // South JToolBar south = new JToolBar(); ! _help = new HelpLabel(); south.add(_help); DemoPanel demo = new DemoPanel(_actionListener); --- 415,419 ---- // South JToolBar south = new JToolBar(); ! _help = new HelpPanel(); south.add(_help); DemoPanel demo = new DemoPanel(_actionListener); *************** *** 621,627 **** /** Set the help text. ! * @param text The text to be shown as he help. */ public final void setHelp(String text) { ! _help.setText(text); } --- 624,636 ---- /** Set the help text. ! * @param text The text to be shown as the help. */ public final void setHelp(String text) { ! _help.setHelp(text); ! } ! ! /** Set the <em>frame-per-second</em> speed. ! * @param text The text to be shown as the <em>frame-per-second</em> speed. */ ! public final void setFPS(String text) { ! _help.setFPS(text); } *************** *** 749,753 **** private JPanel _treePanel; ! private JLabel _help; private JLabel _speed; --- 758,762 ---- private JPanel _treePanel; ! private HelpPanel _help; private JLabel _speed; |
From: Julius H. <hr...@us...> - 2007-10-12 23:47:30
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/Components In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv408/net/hep/graphics/GraXML/GUI/Components Added Files: HelpPanel.java Removed Files: HelpLabel.java Log Message: monitoring (fps, mb) added --- NEW FILE: HelpPanel.java --- package net.hep.graphics.GraXML.GUI.Components; // Swing import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.BoxLayout; import javax.swing.border.TitledBorder; // Java import java.text.NumberFormat; /** Context sensitive Help {@link JLabel} * and performance feedback. * <br><img src="doc-files/HelpLabel.gif"> TBD * <p><font color="#880088"> * <pre> * $Log: HelpPanel.java,v $ * Revision 1.1 2007/10/12 23:47:28 hrivnac * monitoring (fps, mb) added * * </pre> * </font></p> * @version $Id: HelpPanel.java,v 1.1 2007/10/12 23:47:28 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class HelpPanel extends JPanel { public HelpPanel() { // Help _helpLabel = new JLabel(" Rotate - Zoom - Translate "); _helpLabel.setFont(Fonts.PLAIN); _helpLabel.setToolTipText("<html>Context Sensitive Help<br>" + "<small>Actual Mouse Buttons Functions</small></html>"); _helpLabel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), "Mouse", TitledBorder.CENTER, TitledBorder.TOP, Fonts.PLAIN)); // Feedback _feedbackLabel = new JLabel(" "); _feedbackLabel.setFont(Fonts.PLAIN); _feedbackLabel.setToolTipText("<html>Performance Monitor<br>" + "<small>Frames-per-second and MB of Memory</small></html>"); _feedbackLabel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), "Feedback", TitledBorder.CENTER, TitledBorder.TOP, Fonts.PLAIN)); // Panel setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(_helpLabel); add(_feedbackLabel); setFPS("(warming up) ???"); } /** Show help text . * @param text The text to show as help. */ public void setHelp(String text) { _helpLabel.setText(text); } /** Show <em>frames-per-second</em> text in feedback. * @param text The text to show as <em>frames-per-second</em> in feedback. */ public void setFPS(String text) { _feedbackLabel.setText(text + " f/s - " + _nf.format(Runtime.getRuntime().freeMemory() / 1024.0 / 1024.0) + " MB"); } private JLabel _helpLabel; private JLabel _feedbackLabel; private NumberFormat _nf = NumberFormat.getNumberInstance(); } --- HelpLabel.java DELETED --- |
From: Julius H. <hr...@us...> - 2007-10-12 23:47:30
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv408/net/hep/graphics/GraXML/Java3DExtensions Modified Files: J3DFrame.java Added Files: FPSCounter.java Log Message: monitoring (fps, mb) added --- NEW FILE: FPSCounter.java --- package net.hep.graphics.GraXML.Java3DExtensions; import net.hep.graphics.GraXML.GUI.RootWindow; // Java3D import javax.media.j3d.Alpha; import javax.media.j3d.Behavior; import javax.media.j3d.BoundingSphere; import javax.media.j3d.BranchGroup; import javax.media.j3d.Canvas3D; import javax.media.j3d.RotationInterpolator; import javax.media.j3d.Transform3D; import javax.media.j3d.TransformGroup; import javax.media.j3d.WakeupOnElapsedFrames; import javax.vecmath.Point3d; import com.sun.j3d.utils.applet.JMainFrame; import com.sun.j3d.utils.geometry.ColorCube; import com.sun.j3d.utils.universe.SimpleUniverse; // Swing import javax.swing.JOptionPane; // AWT import java.awt.BorderLayout; import java.awt.GraphicsConfiguration; // Java import java.applet.Applet; import java.text.NumberFormat; /** <p>This behavior calculates the frame rate and average frame rate of a Java3D * application. The behavior sets itself up to wakeup every time a new frame is * rendered.</p> * <p>The HotSpot(tm) compiler performs some initial optimizations before running * at optimal speed. Frame rates measured during this warmup period will be * inaccurate and not indicative of the true performance of the the application. * Therefore, before beginning the frame rate computation, the frame counter * waits for a fixed time period to allow the HotSpot(tm) compiler to * stablilize.</p> * <p>To avoid computing the frame rate too frequently (which would also hamper * rendering performance), the frame counter only computes the frame rate at * fixed time intervals. The default sampling duration is 10 seconds. After * waiting for the warmup period, the frame counter needs to calibrate itself. * It computes the number of frames rendered during the sampling period. After * doing this calibration, the frame counter reports the frame rate after these * many frames are rendered. It also reports the average frame rate after a * fixed number of sampling intervals (the default is 5).</p> * <p>The frame counter can be set up to run for a fixed number of sampling * intervals or to run indefinitely. The defaultis to run indefinitely.</p> * <pre> * @(#)FPSCounterDemo.java 1.3 02/10/21 13:38:59 * * Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistribution 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. * * Neither the name of Sun Microsystems, Inc. or the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * This software is provided "AS IS," without a warranty of any * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that Software is not designed,licensed or intended * for use in the design, construction, operation or maintenance of * any nuclear facility.</pre> * <p><font color="#880088"> * <pre> * $Log: FPSCounter.java,v $ * Revision 1.1 2007/10/12 23:47:29 hrivnac * monitoring (fps, mb) added * * </pre> * </font></p> * @version $Id: FPSCounter.java,v 1.1 2007/10/12 23:47:29 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ class FPSCounter extends Behavior { // Wakeup condition - framecount = 0 -> wakeup on every frame WakeupOnElapsedFrames FPSwakeup = new WakeupOnElapsedFrames(0); // Do calibration for these many millisec private static final long testduration = 1000; // Report frame rate after every sampleduration milliseconds private static final long sampleduration = 10000; // Flag to indicate that it is time to (re)calibrate private boolean doCalibration = true; // Flag to indicate the counter has started private boolean startup = true; // Wait for HotSpot compiler to perform optimizations private boolean warmup = true; // Time to wait for HotSpot compiler to stabilize (in milliseconds) private long warmupTime = 20000; // Counter for number of frames rendered private int numframes = 0; // Report frame rate after maxframe number of frames have been rendered private int maxframes = 1; // Variables to keep track of elapsed time private long startuptime = 0; private long currtime = 0; private long lasttime = 0; private long deltatime; // Run indefinitely or for a fixed duration private boolean finiteLoop = false; // No. of sampling intervals to run for if not running indefinitely private long maxLoops; // No. of sampling intervals run for so far private long numLoops = 0; // Total number of frames rendered so far private int sumFrames = 0; // Total time since last reporting of average frame rate private long sumTimes = 0; // Counts no. of sampling intervals private int loop = 0; // Average frame rate is reported after loopCount number of // sampling intervals private int loopCount = 5; private double sumFps = 0.0; private String symbol[] = { "\\", "|", "|", "/", "-", "|", "-" }; int index = 0; private NumberFormat nf = null; public FPSCounter(J3DFrame j3d) { _j3d = j3d; setEnable(true); nf = NumberFormat.getNumberInstance(); } // Called to init the behavior public void initialize() { // Set the trigger for the behavior to wakeup on every frame rendered wakeupOn(FPSwakeup); } // Called every time the behavior is activated public void processStimulus(java.util.Enumeration critera) { // Apply calibration algorithm to determine number of frames to // wait before computing frames per second. // sampleduration = 10000 -> to run test, pass for 10 seconds. // Start calibration if (doCalibration) { if (startup) { // Record time at which the behavior was first invoked startuptime = System.currentTimeMillis(); startup = false; } // Wait for the system to stabilize. else if (warmup) { //-- System.out.print("\rFPSCounter warming up..." + symbol[(index++) % symbol.length]); currtime = System.currentTimeMillis(); deltatime = currtime - startuptime; if (deltatime > warmupTime) { // Done waiting for warmup warmup = false; lasttime = System.currentTimeMillis(); //-- System.out.println("\rFPSCounter warming up...Done"); } } else { numframes += 1; // Wait till at least maxframe no. of frames have been rendered if (numframes >= maxframes) { currtime = System.currentTimeMillis(); deltatime = currtime - lasttime; // Do the calibration for testduration no. of millisecs if (deltatime > testduration) { // Compute total no. of frames rendered so far in the // current sampling duration maxframes = (int) Math.ceil((double) numframes * ((double) sampleduration / (double) deltatime)); // Done with calibration doCalibration = false; // Reset the value for the measurement numframes = 0; lasttime = System.currentTimeMillis(); } // Need to run the calibration routine for some more // time. Increase the no. of frames to be rendered else { maxframes *= 2; } } } } // Do the measurement else { numframes += 1; if (numframes >= maxframes) { currtime = System.currentTimeMillis(); deltatime = currtime - lasttime; // Time is in millisec, so multiply by 1000 to get frames/sec double fps = (double) numframes / ((double) deltatime / 1000.0); //-- System.out.println("Frame Rate : \n\tNo. of frames : " + numframes + "\n\tTime : " + ((double) deltatime / 1000.0) + " sec." + "\n\tFrames/sec : " + nf.format(fps)); _j3d.window().setFPS(nf.format(fps)); // Calculate average frame rate sumFrames += numframes; sumTimes += deltatime; sumFps += fps; loop++; if (loop >= loopCount) { double avgFps = (double) sumFrames * 1000.0 / (double) sumTimes; double ravgFps = sumFps / (double) loopCount; //-- System.out.println("Aggregate frame rate " + nf.format(avgFps) + " frames/sec"); //-- System.out.println("Average frame rate " + nf.format(ravgFps) + " frames/sec"); numLoops++; if (finiteLoop && numLoops >= maxLoops) { //-- System.out.println("************** The End **************\n"); setEnable(false); } loop = 0; sumFps = 0; } numframes = 0; lasttime = System.currentTimeMillis(); } } // Set the trigger for the behavior wakeupOn(FPSwakeup); } private J3DFrame _j3d; /** * The frame counter waits for some time before computing the frame rate. * This allows the HotSpot compiler to perform initial optimizations. The * amount of time to wait for is set by this method. The default is 20000 * (20 sec) * * @param Amount * of time to wait for before computing frame rate (specified in * milliseconds) */ public void setWarmupTime(long wt) { warmupTime = wt; } /** * Sets the number of sampling intervals to wait for before computing the * average frame rate. The default is 5. * * @param No. * of sampling intervals over which to compute frame rate. A * value of 0 implies the average frame rate is computed over one * sampling interval */ public void setLoopCount(int lc) { loopCount = lc; } /** * This method sets the number of sampling intervals for which the frame * counter should run. * * @param No. * of sampling intervals to run for */ public void setMaxLoops(int ml) { maxLoops = ml; finiteLoop = true; } } Index: J3DFrame.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/J3DFrame.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** J3DFrame.java 11 Oct 2007 14:41:11 -0000 1.8 --- J3DFrame.java 12 Oct 2007 23:47:29 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- import net.hep.graphics.GraXML.Java3DExtensions.Envelope; import net.hep.graphics.GraXML.Java3DExtensions.Clipper; + import net.hep.graphics.GraXML.Java3DExtensions.FPSCounter; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.Config; *************** *** 9,14 **** --- 10,19 ---- import net.hep.graphics.GraXML.Optimisator.OptimisationDB; import net.hep.graphics.GraXML.Disconnecter.ConnectionsDB; + import net.hep.graphics.GraXML.GUI.Components.Icons; import net.hep.graphics.GraXML.GUI.RootWindow; + // Swing + import javax.swing.ImageIcon; + // Java3D import javax.media.j3d.Background; *************** *** 41,44 **** --- 46,52 ---- * <pre> * $Log$ + * Revision 1.9 2007/10/12 23:47:29 hrivnac + * monitoring (fps, mb) added + * * Revision 1.8 2007/10/11 14:41:11 hrivnac * connection to Atlantis improved *************** *** 232,235 **** --- 240,247 ---- keyNavBeh.setSchedulingBounds(_bounds); _mouseT.addChild(keyNavBeh); + // FPSCounter + FPSCounter counter = new FPSCounter(this); + counter.setSchedulingBounds(new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0)); + _root.addChild(counter); // Compose _root.addChild(_mouseT); *************** *** 269,273 **** --- 281,287 ---- * @param window The {@link RootWindow} to be attached. */ public final void attachWindow(RootWindow window) { + _window = window; _frame = new MainFrame(window, 1000, 700); + _frame.setIconImage(Icons.about.getImage()); _frame.setTitle("GraXML " + GlobalOptions.version()); } *************** *** 381,384 **** --- 395,406 ---- // Environment --------------------------------------------------------------- + /** Give used {@link RootWindow}. + * @return The used {@link RootWindow}. */ + public RootWindow window() { + return _window; + } + + private RootWindow _window; + /** Give used {@link CapturingCanvas3D}. * @return The used {@link CapturingCanvas3D}. */ |
From: Julius H. <hr...@us...> - 2007-10-12 15:19:12
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23623/net/hep/graphics/GraXML Modified Files: MasterBuilder.java SceneGroup.java Log Message: refactoring Index: SceneGroup.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/SceneGroup.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SceneGroup.java 3 Oct 2007 15:41:42 -0000 1.4 --- SceneGroup.java 12 Oct 2007 15:19:12 -0000 1.5 *************** *** 28,31 **** --- 28,34 ---- * <pre> * $Log$ + * Revision 1.5 2007/10/12 15:19:12 hrivnac + * refactoring + * * Revision 1.4 2007/10/03 15:41:42 hrivnac * works in multithreaded env *************** *** 97,101 **** // Build using DOM or JAXB if (builder != null) { ! builder.build(stream1, document, this); } else { --- 100,104 ---- // Build using DOM or JAXB if (builder != null) { ! builder.build(stream1, this); } else { Index: MasterBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/MasterBuilder.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MasterBuilder.java 11 Oct 2007 14:41:09 -0000 1.16 --- MasterBuilder.java 12 Oct 2007 15:19:12 -0000 1.17 *************** *** 62,65 **** --- 62,68 ---- * <pre> * $Log$ + * Revision 1.17 2007/10/12 15:19:12 hrivnac + * refactoring + * * Revision 1.16 2007/10/11 14:41:09 hrivnac * connection to Atlantis improved *************** *** 205,223 **** throw new GraXMLException("Builder for " + top + " not found"); } ! try { ! _builder = (MasterBuilder)(Class.forName(builderName).newInstance()); ! } ! catch (ClassNotFoundException e) { ! throw new GraXMLException("Builder for " + top + " not found", e); ! } ! catch (InstantiationException e) { ! throw new GraXMLException("Builder for " + top + " can't be created", e); ! } ! catch (IllegalAccessException e) { ! throw new GraXMLException("Builder for " + top + " can't be accessed", e); ! } ! log.info("Using " + builderName + " " + _builder.version() + " builder for " + top + " ..."); ! _builder.configure(); ! return _builder; } --- 208,212 ---- throw new GraXMLException("Builder for " + top + " not found"); } ! return createBuilder(builderName); } *************** *** 228,232 **** * @return The proper {@link MasterBuilder} to build Geometric Model. * @throws GraXMLException If {@link MasterBuilder} can't be found or created. */ - // TBD: refactor public static final MasterBuilder createBuilder(String builderName) throws GraXMLException { try { --- 217,220 ---- *************** *** 263,351 **** * otherwise only non-graphical one. * @param file The XML file containing the Generic Model. - * @param document The DOM {@link Document} containing the Generic Model. * @param group The {@link BranchGroup} to be filled with the Geometric Model. * @throws GraXMLException If Geometric Model can't be build. */ - // TBD: JAXB currently doesn't use Document - // TBD: reafctor with stream-based build(...) public final void build(String file, - Document document, BranchGroup group) throws GraXMLException { - auxiliaryOutput(file); setSource(file); ! _group = group; ! ! // If RootWindow exists, run in graphical mode ! if (_window == null) { ! Config.setGraphical(false); ! } ! else if (!Config.configured()) { ! Config.set(); ! } ! log.info("Constructing and Optimizing Geometric Model (see sysout for progress report, GraXML.log for detailed messages) ..."); ! // Do build ! long time = System.currentTimeMillis(); ! if (jaxb() != null) { ! Object element = null; ! try { ! // Get Parser Factory ! System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl"); ! SAXParserFactory spf = SAXParserFactory.newInstance(); ! // Set Parser Factory Properties ! spf.setNamespaceAware(true); ! spf.setXIncludeAware(true); ! spf.setValidating(true); ! // Get Parser ! SAXParser saxParser = spf.newSAXParser(); ! // Set Parser Properties ! saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); ! saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schema()); ! // Get Reader ! XMLReader xmlReader = saxParser.getXMLReader(); ! // Set Reader Properties ! xmlReader.setFeature("http://apache.org/xml/features/xinclude", true); ! xmlReader.setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris", true); ! xmlReader.setFeature("http://apache.org/xml/features/xinclude/fixup-language", true); ! // Get Source ! SAXSource source = new SAXSource(xmlReader, new InputSource(new FileInputStream(file))); ! // Proccess as JAXB ! JAXBContext jc = JAXBContext.newInstance(jaxb()); ! Unmarshaller u = jc.createUnmarshaller(); ! u.setValidating(true); ! element = u.unmarshal(source); ! } ! catch (SAXNotRecognizedException e) { ! throw new GraXMLException("Can't find " + file, e); ! } ! catch (SAXNotSupportedException e) { ! throw new GraXMLException("Can't find " + file, e); ! } ! catch (SAXException e) { ! throw new GraXMLException("Can't find " + file, e); ! } ! catch (ParserConfigurationException e) { ! throw new GraXMLException("Can't find " + file, e); ! } ! catch (JAXBException e) { ! throw new GraXMLException("Can't create JAXB Generic Model from " + file, e); ! } ! catch (FileNotFoundException e) { ! throw new GraXMLException("Can't find " + file, e); ! } ! traverse(element, _group, ""); } ! else { ! throw new GraXMLException("JAXB model doesn't exist - can't traverse"); } - // Report about results - time = System.currentTimeMillis() - time; - log.info("\n"); - log.info(count() + " elements processed"); - log.info("Optimised:\n" + optDB().toString()); - log.debug("Stripified:\n" + org.freehep.j3d.Solid.stripifier().getStripifierStats()); - System.gc(); - log.info((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024 + " MB of memory used"); - log.info(time / 1000.0 + " s of CPU spent\n"); - finish(); } --- 251,266 ---- * otherwise only non-graphical one. * @param file The XML file containing the Generic Model. * @param group The {@link BranchGroup} to be filled with the Geometric Model. * @throws GraXMLException If Geometric Model can't be build. */ public final void build(String file, BranchGroup group) throws GraXMLException { auxiliaryOutput(file); setSource(file); ! try { ! build(new FileInputStream(file), group); } ! catch (FileNotFoundException e) { ! throw new GraXMLException("Can't find " + file, e); } } *************** *** 355,382 **** * otherwise only non-graphical one. * @param stream The XML {@link InputStream} containing the Generic Model. - * @param document The DOM {@link Document} containing the Generic Model. * @param group The {@link BranchGroup} to be filled with the Geometric Model. * @throws GraXMLException If Geometric Model can't be build. */ - // TBD: JAXB currently doesn't use Document public final void build(InputStream stream, - Document document, BranchGroup group) throws GraXMLException { ! ! //auxiliaryOutput(file); ! //setSource(file); ! _group = group; ! ! // If RootWindow exists, run in graphical mode ! if (_window == null) { ! Config.setGraphical(false); ! } ! else if (!Config.configured()) { ! Config.set(); ! } ! log.info("Constructing and Optimizing Geometric Model (see sysout for progress report, GraXML.log for detailed messages) ..."); ! // Do build ! long time = System.currentTimeMillis(); if (jaxb() != null) { - Object element = null; try { // Get Parser Factory --- 270,280 ---- * otherwise only non-graphical one. * @param stream The XML {@link InputStream} containing the Generic Model. * @param group The {@link BranchGroup} to be filled with the Geometric Model. * @throws GraXMLException If Geometric Model can't be build. */ public final void build(InputStream stream, BranchGroup group) throws GraXMLException { ! log.info("Parsing XML Stream with Generic Model ..."); ! Object element = null; if (jaxb() != null) { try { // Get Parser Factory *************** *** 392,396 **** saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); InputStream schema = MasterBuilder.class.getClassLoader().getResourceAsStream(schemaEmbedded()); ! saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schema); // Get Reader XMLReader xmlReader = saxParser.getXMLReader(); --- 290,300 ---- saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); InputStream schema = MasterBuilder.class.getClassLoader().getResourceAsStream(schemaEmbedded()); ! if (schema() == null) { ! saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", ! MasterBuilder.class.getClassLoader().getResourceAsStream(schemaEmbedded())); ! } ! else { ! saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schema()); ! } // Get Reader XMLReader xmlReader = saxParser.getXMLReader(); *************** *** 422,440 **** throw new GraXMLException("Can't create JAXB Generic Model from " + stream, e); } ! traverse(element, _group, ""); } else { ! throw new GraXMLException("JAXB model doesn't exist - can't traverse"); } - // Report about results - time = System.currentTimeMillis() - time; - log.info("\n"); - log.info(count() + " elements processed"); - log.info("Optimised:\n" + optDB().toString()); - log.debug("Stripified:\n" + org.freehep.j3d.Solid.stripifier().getStripifierStats()); - System.gc(); - log.info((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024 + " MB of memory used"); - log.info(time / 1000.0 + " s of CPU spent\n"); - finish(); } --- 326,334 ---- throw new GraXMLException("Can't create JAXB Generic Model from " + stream, e); } ! build(element, group); } else { ! throw new GraXMLException("JAXB model doesn't exist - can't parse"); } } *************** *** 444,457 **** * otherwise only non-graphical one. * @param element The JAXB top-level element. - * @param document The DOM {@link Document} containing the Generic Model. * @param group The {@link BranchGroup} to be filled with the Geometric Model. * @throws GraXMLException If Geometric Model can't be build. */ - // TBD: JAXB currently doesn't use Document - // TBD: refactor with other build()s public final void build(Object element, BranchGroup group) throws GraXMLException { - //auxiliaryOutput(file); - //setSource(file); _group = group; --- 338,346 ---- |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:39
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738 Modified Files: MasterBuilder.java Log Message: connection to Atlantis improved Index: MasterBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/MasterBuilder.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MasterBuilder.java 9 Oct 2007 17:17:50 -0000 1.15 --- MasterBuilder.java 11 Oct 2007 14:41:09 -0000 1.16 *************** *** 62,65 **** --- 62,68 ---- * <pre> * $Log$ + * Revision 1.16 2007/10/11 14:41:09 hrivnac + * connection to Atlantis improved + * * Revision 1.15 2007/10/09 17:17:50 hrivnac * both i386 and amd64 Linux supported; using Java3D 1.5.1 *************** *** 245,249 **** /** Give {@link MasterBuilder} subclass instance suitable pro supplied xml file. ! * @return The current associated @link MasterBuilder} subclass instance, * null if it is not set/found. */ public static MasterBuilder builder() { --- 248,252 ---- /** Give {@link MasterBuilder} subclass instance suitable pro supplied xml file. ! * @return The current associated {@link MasterBuilder} subclass instance, * null if it is not set/found. */ public static MasterBuilder builder() { *************** *** 733,749 **** String builder) throws GraXMLException { log.info("Setting builder " + builder + " for top Element " + topElement + " ..."); ! _builders.put(topElement, builder); ! try { ! Class cl = Class.forName(builder); ! _builderObjects.add((MasterBuilder)cl.newInstance()); ! } ! catch (ClassNotFoundException e) { ! throw new GraXMLException("Builder for " + topElement + " not found", e); ! } ! catch (InstantiationException e) { ! throw new GraXMLException("Builder for " + topElement + " can't be created", e); ! } ! catch (IllegalAccessException e) { ! throw new GraXMLException("Builder for " + topElement + " can't be accessed", e); } } --- 736,754 ---- String builder) throws GraXMLException { log.info("Setting builder " + builder + " for top Element " + topElement + " ..."); ! if (! _builders.containsKey(topElement)) { ! _builders.put(topElement, builder); ! try { ! Class cl = Class.forName(builder); ! _builderObjects.add((MasterBuilder)cl.newInstance()); ! } ! catch (ClassNotFoundException e) { ! throw new GraXMLException("Builder for " + topElement + " not found", e); ! } ! catch (InstantiationException e) { ! throw new GraXMLException("Builder for " + topElement + " can't be created", e); ! } ! catch (IllegalAccessException e) { ! throw new GraXMLException("Builder for " + topElement + " can't be accessed", e); ! } } } |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:17
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Disconnecter In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738/Disconnecter Modified Files: ViewerTreeFactory.java ViewerTreeMouseListener.java Added Files: ConnectionManager.java Log Message: connection to Atlantis improved Index: ViewerTreeFactory.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Disconnecter/ViewerTreeFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ViewerTreeFactory.java 18 Jan 2007 15:33:12 -0000 1.2 --- ViewerTreeFactory.java 11 Oct 2007 14:41:09 -0000 1.3 *************** *** 13,16 **** --- 13,19 ---- * <pre> * $Log$ + * Revision 1.3 2007/10/11 14:41:09 hrivnac + * connection to Atlantis improved + * * Revision 1.2 2007/01/18 15:33:12 hrivnac * multiple loading possible *************** *** 54,58 **** tree.putClientProperty("JTree.lineStyle", "Angled"); tree.setCellRenderer(new ViewerTreeCellRenderer(window.j3d().conDB())); ! tree.addMouseListener(new ViewerTreeMouseListener(window, tree)); return tree; } --- 57,63 ---- tree.putClientProperty("JTree.lineStyle", "Angled"); tree.setCellRenderer(new ViewerTreeCellRenderer(window.j3d().conDB())); ! ViewerTreeMouseListener listener = new ViewerTreeMouseListener(window, tree); ! tree.addMouseListener(listener); ! _connectionManager = listener.connectionManager(); return tree; } *************** *** 72,74 **** --- 77,86 ---- } + // TBD + public static ConnectionManager connectionManager() { + return _connectionManager; + } + + private static ConnectionManager _connectionManager; + } Index: ViewerTreeMouseListener.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Disconnecter/ViewerTreeMouseListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ViewerTreeMouseListener.java 18 Jan 2007 15:29:22 -0000 1.2 --- ViewerTreeMouseListener.java 11 Oct 2007 14:41:09 -0000 1.3 *************** *** 34,37 **** --- 34,40 ---- * <pre> * $Log$ + * Revision 1.3 2007/10/11 14:41:09 hrivnac + * connection to Atlantis improved + * * Revision 1.2 2007/01/18 15:29:22 hrivnac * multiple loading possible *************** *** 74,79 **** public ViewerTreeMouseListener(RootWindow window, JTree tree) { - _window = window; _tree = tree; } --- 77,82 ---- public ViewerTreeMouseListener(RootWindow window, JTree tree) { _tree = tree; + _manager = new ConnectionManager(window, tree); } *************** *** 85,101 **** * @param e The {@link MouseEvent}.*/ public final void mouseClicked(MouseEvent e) { ! _limit = false; ! if (e.getButton() == 2) { ! _limit = true; ! } ! TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); ! if (path != null) { ! String node = path.getLastPathComponent().toString(); ! _window.j3d().canvas().setCursor(new Cursor(Cursor.WAIT_CURSOR)); ! _level = 0; ! change(node); ! _window.updateTree(); ! _window.j3d().canvas().setCursor(new Cursor(Cursor.HAND_CURSOR)); ! } } --- 88,93 ---- * @param e The {@link MouseEvent}.*/ public final void mouseClicked(MouseEvent e) { ! _manager.act(_tree.getPathForLocation(e.getX(), e.getY()), ! e.getButton() == 2); } *************** *** 112,339 **** public final void mouseExited(MouseEvent e) {} - // Change Processors --------------------- - /** Start the change. Switch the status and propagate the change - * up and down the {@link ViewerTree} so that the change can happen. - * @param value The name of the {@link DetachableConnection} to be hanged. */ - public final void change(String value) { - DetachableConnection connection = _window.j3d().conDB().getConnection(value); - if (connection != null) { - // ON -> OFF - if (connection.isON()) { - if (OptimisationDB.groupOptimisation()) { - cleanLinks(connection); - } - else { - goUp(connection, false); - detach(connection); - goDown(connection, false); - connection.setOFF(); - } - } - // OFF,SEMI -> ON - else { - goDown(connection, true); - // OFF -> ON - if (connection.isOFF()) { - attach(connection); - } - goUp(connection, true); - connection.setON(); - } - } - } - - /** Switch {@link DetachableConnection} off. - * In a compressed SceneGraph (with {@link javax.media.j3d.Link}s), - * no {@link javax.media.j3d.Link} can - * be disconnected if other {@link javax.media.j3d.Link}s exist. This applies - * to any parent of the current connection. - * If {@link DetachableConnection} is a {@link javax.media.j3d.Link}, its non-link - * parent should be disconnected instead. - * @param connection The {@link DetachableConnection} to be cleaned and - * switched off. */ - private final void cleanLinks(DetachableConnection connection) { - // Get full path to the root connection - List<DetachableConnection> pathToRoot = new ArrayList<DetachableConnection>(); - DetachableConnection c = connection; - pathToRoot.add(c); - // Accumulate all connection up to the root connection - while (c != _window.j3d().conDB().getRoot()) { - c = c.parent(); - pathToRoot.add(c); - } - // Go down through accumulated list until first connections with Links is found - // Accumulate all Links corresponding to the found one - String linkName; - String originName; - int numOfLinks = 0; - boolean stay = true; - List<DetachableConnection> linksToBeCleaned = new ArrayList<DetachableConnection>(); - for (int i = pathToRoot.size() - 1; i >= 0 && stay; i--) { - c = pathToRoot.get(i); - linkName = c.name(); - originName = _window.j3d().optDB().links().getOrigin(linkName); - if (originName != null) { - for (String lName : _window.j3d().optDB().links().getLinks(originName)) { - linksToBeCleaned.add(_window.j3d().conDB().getConnection(lName)); - stay= false; - } - } - } - // If no Links has been found, use just the requested connection - if (linksToBeCleaned.size() == 0) { - linksToBeCleaned.add(connection); - } - // Clean all accumulated connections - DetachableConnection p; - for (DetachableConnection dc : linksToBeCleaned) { - p = dc.parent(); - detach(p); - goUp(p, false); - goDown(p, false); - p.setOFF(); - } - } - - /** Perform a change inside the SceneGraph while traversing up. - * As the node may be already in the required status, the requested end - * status is passed. If a change is needed, just a <code>SEMI</code> is - * set. - * @param connection The {@link DetachableConnection} to be changed. - * @param switchOn The requested end status. */ - private final void changeUp(DetachableConnection connection, - boolean switchOn) { - if (connection != null) { - // -> ON - if (switchOn) { - // OFF -> SEMI - if (connection.isOFF()) { - attach(connection); - connection.setSEMI(); - } - } - // -> OFF - else { - // ON -> SEMI - if (connection.isON()) { - connection.setSEMI(); - } - } - } - } - - /** Perform a change inside the SceneGraph while traversing down - * As the node may be already in the required status, the requested end - * status is passed. If a change to <code>ON</code> is needed, it is - * performed. If a change to <code>OFF</code> is needed, <code>SEMI</code> - * is set in case of {@link OptimisationDB#groupOptimisation} == <code>true</code>, - * <code>OFF</code> is set otherwise. - * @param connection The {@link DetachableConnection} to be changed. - * @param switchOn The requested end status. */ - private final void changeDown(DetachableConnection connection, - boolean switchOn) { - if (connection != null) { - // -> ON - if (switchOn) { - // OFF -> ON - if (connection.isOFF()) { - attach(connection); - connection.setON(); - } - // SEMI -> ON - else if (connection.isSEMI()) { - connection.setON(); - } - } - // -> OFF - else { - // ON -> SEMI,OFF - if (connection.isON()) { - // ON -> SEMI - if (OptimisationDB.groupOptimisation()) { - connection.setSEMI(); - } - // ON -> OFF - else { - detach(connection); - connection.setOFF(); - } - } - } - } - } - - /** Traverse the SceneGraph up. - * As the nodes may be already in the required status, the requested end - * status is passed. - * @param connection The {@link DetachableConnection}, whose parent should - * be processed. - * @param switchOn The requested end status. */ - private final void goUp(DetachableConnection connection, - boolean switchOn) { - DetachableConnection parent = connection.parent(); - if (parent != null) { - changeUp(parent, switchOn); - goUp(parent, switchOn); - } - } - - /** Traverse the SceneGraph down. If {@link #_limit} is - * set, check the depth defined by {@link ConnectionsDB#_levelLimit}. - * As the nodes may be already in the required status, the requested end - * status is passed. - * @param connection The {@link DetachableConnection}, whose children should - * be processed. - * @param switchOn The requested end status. */ - private final void goDown(DetachableConnection connection, - boolean switchOn) { - for (DetachableConnection child : connection.children()) { - if (child != null) { - if (! _limit || _level < ConnectionsDB._levelLimit) { - _level++; - goDown(child, switchOn); - _level--; - changeDown(child, switchOn); - } - } - } - } - - /** Attach {@link BranchGroup} into parent {@link javax.media.j3d.Group}. - * If this connection is just a {@link javax.media.j3d.Link}, - * attach the first {@link javax.media.j3d.Link} of this group so - * that the object is shown. - * @param connection {@link DetachableConnection} to be attahed. */ - private final void attach(DetachableConnection connection) { - String linkName = connection.name(); - String originName = _window.j3d().optDB().links().getOrigin(linkName); - // It is a Link - if (originName != null && ! linkName.equals(originName)) { - String firstLinkName = _window.j3d().optDB().links().getLinks(originName).get(0); - DetachableConnection firstConnection = _window.j3d().conDB().getConnection(firstLinkName); - // Traverse only the first Link - if (! firstLinkName.equals(linkName)) { - goDown(firstConnection, true); - } - } - // Attach - connection.group().addChild(connection.branch()); - } - - /** Detach {@link BranchGroup}. - * @param connection {@link DetachableConnection} to be detached. */ - private final void detach(DetachableConnection connection) { - connection.branch().detach(); - } - // Data ---------------------------------------------------------------------- ! private RootWindow _window; ! ! private JTree _tree; ! private int _level; ! private boolean _limit; /** Logging . */ --- 104,117 ---- public final void mouseExited(MouseEvent e) {} // Data ---------------------------------------------------------------------- ! // TBD ! public ConnectionManager connectionManager() { ! return _manager; ! } ! private ConnectionManager _manager; ! private JTree _tree; /** Logging . */ --- NEW FILE: ConnectionManager.java --- package net.hep.graphics.GraXML.Disconnecter; import net.hep.graphics.GraXML.Optimisator.OptimisationDB; import net.hep.graphics.GraXML.Optimisator.Links; import net.hep.graphics.GraXML.GUI.RootWindow; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; // Java import java.util.List; import java.util.ArrayList; import java.util.Iterator; // Log4J import org.apache.log4j.Logger; // AWT import java.awt.event.MouseListener; import java.awt.event.MouseEvent; import java.awt.Cursor; // Swing import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.TreePath; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; // Java3D import javax.media.j3d.BranchGroup; /** <code>Connectionmanager</code> handles the showing/hiding * of {@link DetachableConnection}s. * <p><font color="#880088"> * <pre> * $Log: ConnectionManager.java,v $ * Revision 1.1 2007/10/11 14:41:09 hrivnac * connection to Atlantis improved * * </pre> * </font></p> * @version $Id: ConnectionManager.java,v 1.1 2007/10/11 14:41:09 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class ConnectionManager{ // Constructor --------------------------------------------------------------- /** Create and connect with the framework. * @param window The main {@link RootWindow}. * @param tree The {@link ViewerTree} connected with the {@link ConnectionsDB}. */ public ConnectionManager(RootWindow window, JTree tree) { _window = window; _tree = tree; } // Handlers ------------------------------------------------------------------ /** Act on the mouse click according the leaf status and options. * If middle button is clicked, act only to the depth limited * by {@link ConnectionsDB#_levelLimit}. * @param path TBD * @param limit TBD*/ public final void act(TreePath path, boolean limit) { _limit = limit; if (path != null) { String node = path.getLastPathComponent().toString(); _window.j3d().canvas().setCursor(new Cursor(Cursor.WAIT_CURSOR)); _level = 0; change(node); _window.updateTree(); _window.j3d().canvas().setCursor(new Cursor(Cursor.HAND_CURSOR)); } } // Change Processors --------------------------------------------------------- // TBD // TBD: refactor public final void show(String value) { DetachableConnection connection = _window.j3d().conDB().getConnection(value); if (connection != null) { // OFF,SEMI -> ON if (!connection.isON()) { goDown(connection, true); // OFF -> ON if (connection.isOFF()) { attach(connection); } goUp(connection, true); connection.setON(); } } } // TBD // TBD: refactor public final void hide(String value) { DetachableConnection connection = _window.j3d().conDB().getConnection(value); if (connection != null) { // ON -> OFF if (connection.isON()) { if (OptimisationDB.groupOptimisation()) { cleanLinks(connection); } else { goUp(connection, false); detach(connection); goDown(connection, false); connection.setOFF(); } } } } /** Start the change. Switch the status and propagate the change * up and down the {@link ViewerTree} so that the change can happen. * @param value The name of the {@link DetachableConnection} to be hanged. */ public final void change(String value) { DetachableConnection connection = _window.j3d().conDB().getConnection(value); if (connection != null) { // ON -> OFF if (connection.isON()) { if (OptimisationDB.groupOptimisation()) { cleanLinks(connection); } else { goUp(connection, false); detach(connection); goDown(connection, false); connection.setOFF(); } } // OFF,SEMI -> ON else { goDown(connection, true); // OFF -> ON if (connection.isOFF()) { attach(connection); } goUp(connection, true); connection.setON(); } } } /** Switch {@link DetachableConnection} off. * In a compressed SceneGraph (with {@link javax.media.j3d.Link}s), * no {@link javax.media.j3d.Link} can * be disconnected if other {@link javax.media.j3d.Link}s exist. This applies * to any parent of the current connection. * If {@link DetachableConnection} is a {@link javax.media.j3d.Link}, its non-link * parent should be disconnected instead. * @param connection The {@link DetachableConnection} to be cleaned and * switched off. */ private final void cleanLinks(DetachableConnection connection) { // Get full path to the root connection List<DetachableConnection> pathToRoot = new ArrayList<DetachableConnection>(); DetachableConnection c = connection; pathToRoot.add(c); // Accumulate all connection up to the root connection while (c != _window.j3d().conDB().getRoot()) { c = c.parent(); pathToRoot.add(c); } // Go down through accumulated list until first connections with Links is found // Accumulate all Links corresponding to the found one String linkName; String originName; int numOfLinks = 0; boolean stay = true; List<DetachableConnection> linksToBeCleaned = new ArrayList<DetachableConnection>(); for (int i = pathToRoot.size() - 1; i >= 0 && stay; i--) { c = pathToRoot.get(i); linkName = c.name(); originName = _window.j3d().optDB().links().getOrigin(linkName); if (originName != null) { for (String lName : _window.j3d().optDB().links().getLinks(originName)) { linksToBeCleaned.add(_window.j3d().conDB().getConnection(lName)); stay= false; } } } // If no Links has been found, use just the requested connection if (linksToBeCleaned.size() == 0) { linksToBeCleaned.add(connection); } // Clean all accumulated connections DetachableConnection p; for (DetachableConnection dc : linksToBeCleaned) { p = dc.parent(); detach(p); goUp(p, false); goDown(p, false); p.setOFF(); } } /** Perform a change inside the SceneGraph while traversing up. * As the node may be already in the required status, the requested end * status is passed. If a change is needed, just a <code>SEMI</code> is * set. * @param connection The {@link DetachableConnection} to be changed. * @param switchOn The requested end status. */ private final void changeUp(DetachableConnection connection, boolean switchOn) { if (connection != null) { // -> ON if (switchOn) { // OFF -> SEMI if (connection.isOFF()) { attach(connection); connection.setSEMI(); } } // -> OFF else { // ON -> SEMI if (connection.isON()) { connection.setSEMI(); } } } } /** Perform a change inside the SceneGraph while traversing down * As the node may be already in the required status, the requested end * status is passed. If a change to <code>ON</code> is needed, it is * performed. If a change to <code>OFF</code> is needed, <code>SEMI</code> * is set in case of {@link OptimisationDB#groupOptimisation} == <code>true</code>, * <code>OFF</code> is set otherwise. * @param connection The {@link DetachableConnection} to be changed. * @param switchOn The requested end status. */ private final void changeDown(DetachableConnection connection, boolean switchOn) { if (connection != null) { // -> ON if (switchOn) { // OFF -> ON if (connection.isOFF()) { attach(connection); connection.setON(); } // SEMI -> ON else if (connection.isSEMI()) { connection.setON(); } } // -> OFF else { // ON -> SEMI,OFF if (connection.isON()) { // ON -> SEMI if (OptimisationDB.groupOptimisation()) { connection.setSEMI(); } // ON -> OFF else { detach(connection); connection.setOFF(); } } } } } /** Traverse the SceneGraph up. * As the nodes may be already in the required status, the requested end * status is passed. * @param connection The {@link DetachableConnection}, whose parent should * be processed. * @param switchOn The requested end status. */ private final void goUp(DetachableConnection connection, boolean switchOn) { DetachableConnection parent = connection.parent(); if (parent != null) { changeUp(parent, switchOn); goUp(parent, switchOn); } } /** Traverse the SceneGraph down. If {@link #_limit} is * set, check the depth defined by {@link ConnectionsDB#_levelLimit}. * As the nodes may be already in the required status, the requested end * status is passed. * @param connection The {@link DetachableConnection}, whose children should * be processed. * @param switchOn The requested end status. */ private final void goDown(DetachableConnection connection, boolean switchOn) { for (DetachableConnection child : connection.children()) { if (child != null) { if (! _limit || _level < ConnectionsDB._levelLimit) { _level++; goDown(child, switchOn); _level--; changeDown(child, switchOn); } } } } /** Attach {@link BranchGroup} into parent {@link javax.media.j3d.Group}. * If this connection is just a {@link javax.media.j3d.Link}, * attach the first {@link javax.media.j3d.Link} of this group so * that the object is shown. * @param connection {@link DetachableConnection} to be attahed. */ private final void attach(DetachableConnection connection) { String linkName = connection.name(); String originName = _window.j3d().optDB().links().getOrigin(linkName); // It is a Link if (originName != null && ! linkName.equals(originName)) { String firstLinkName = _window.j3d().optDB().links().getLinks(originName).get(0); DetachableConnection firstConnection = _window.j3d().conDB().getConnection(firstLinkName); // Traverse only the first Link if (! firstLinkName.equals(linkName)) { goDown(firstConnection, true); } } // Attach connection.group().addChild(connection.branch()); } /** Detach {@link BranchGroup}. * @param connection {@link DetachableConnection} to be detached. */ private final void detach(DetachableConnection connection) { connection.branch().detach(); } // Data ---------------------------------------------------------------------- private RootWindow _window; private JTree _tree; private int _level; private boolean _limit; /** Logging . */ private static Logger log = Logger.getLogger(ConnectionManager.class); // --------------------------------------------------------------------------- } |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:16
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738/Java3DExtensions Modified Files: J3DFrame.java Log Message: connection to Atlantis improved Index: J3DFrame.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/J3DFrame.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** J3DFrame.java 10 Oct 2007 18:47:42 -0000 1.7 --- J3DFrame.java 11 Oct 2007 14:41:11 -0000 1.8 *************** *** 41,44 **** --- 41,47 ---- * <pre> * $Log$ + * Revision 1.8 2007/10/11 14:41:11 hrivnac + * connection to Atlantis improved + * * Revision 1.7 2007/10/10 18:47:42 hrivnac * if running in a Thread, doesn't exist; ticks on axis *************** *** 154,158 **** enableEnvelope(false); enableClipper(false); ! _group.detach(); _group = null; _optDB.setup(); --- 157,163 ---- enableEnvelope(false); enableClipper(false); ! if (_group != null) { ! _group.detach(); ! } _group = null; _optDB.setup(); *************** *** 271,275 **** --- 276,287 ---- public void dispose() { _frame.dispose(); + _universe.removeAllLocales(); + _universe.cleanup(); + _view.removeAllCanvas3Ds(); _frame = null; + _universe = null; + _view = null; + _optDB.setup(); + _conDB.setup(); } |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:16
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738/GUI Modified Files: RootWindow.java Log Message: connection to Atlantis improved Index: RootWindow.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/RootWindow.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RootWindow.java 10 Oct 2007 18:47:42 -0000 1.9 --- RootWindow.java 11 Oct 2007 14:41:11 -0000 1.10 *************** *** 1,4 **** --- 1,5 ---- package net.hep.graphics.GraXML.GUI; + import net.hep.graphics.GraXML.FrontEnd.GraXMLThread; import net.hep.graphics.GraXML.GUI.Components.*; import net.hep.graphics.GraXML.Optimisator.OptimisationDB; *************** *** 78,81 **** --- 79,85 ---- * <pre> * $Log$ + * Revision 1.10 2007/10/11 14:41:11 hrivnac + * connection to Atlantis improved + * * Revision 1.9 2007/10/10 18:47:42 hrivnac * if running in a Thread, doesn't exist; ticks on axis *************** *** 200,205 **** /** Open this window. Second phase - starts thread. ! * @param thread The wrappin g {@link Thread}. */ ! public final void openThread(Thread thread) { _thread = thread; _interpreter.run(); --- 204,209 ---- /** Open this window. Second phase - starts thread. ! * @param thread The wrapping {@link GraXMLThread}. */ ! public final void openThread(GraXMLThread thread) { _thread = thread; _interpreter.run(); *************** *** 255,258 **** --- 259,263 ---- public void close() { log.info("Closing GraXML RootWindow ..."); + clean(); if (_thread == null) { System.exit(0); *************** *** 260,263 **** --- 265,272 ---- else { _j3d.dispose(); + _j3d = null; + _thread.detach(); + _thread = null; + System.gc(); } } *************** *** 413,417 **** } south.add(demo); ! _console = new Console(); _interpreter = new Interpreter(_console); try { --- 422,428 ---- } south.add(demo); ! _console = new JConsole(); ! _console.setWaitFeedback(true); ! //_console.setNameCompletion(...); _interpreter = new Interpreter(_console); try { *************** *** 502,506 **** /** Remove Tree. */ public final void removeTree() { ! _center.remove(_treePanel); _treePanel = null; } --- 513,519 ---- /** Remove Tree. */ public final void removeTree() { ! if (_center != null && _treePanel != null) { ! _center.remove(_treePanel); ! } _treePanel = null; } *************** *** 714,718 **** // Data ---------------------------------------------------------------------- ! private Thread _thread; private InteracterDB _interacters = new InteracterDB(); --- 727,731 ---- // Data ---------------------------------------------------------------------- ! private GraXMLThread _thread; private InteracterDB _interacters = new InteracterDB(); |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:12
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd/Test In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738/FrontEnd/Test Added Files: TestGraXMLThread.java Log Message: connection to Atlantis improved --- NEW FILE: TestGraXMLThread.java --- package net.hep.graphics.GraXML.FrontEnd.Test; import net.hep.graphics.GraXML.FrontEnd.GraXMLThread; /** <code>TestGraXMLThread</code> tests * {@link GraXMLThread}. * <p><font color="#880088"> * <pre> * $Log: TestGraXMLThread.java,v $ * Revision 1.1 2007/10/11 14:41:11 hrivnac * connection to Atlantis improved * * </pre> * </font></p> * @version $Id: TestGraXMLThread.java,v 1.1 2007/10/11 14:41:11 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class TestGraXMLThread { /** Perform the test. */ public static final void main(String[] argv) throws Exception { GraXMLThread graxml = GraXMLThread.instance(); //graxml.stop(); System.in.read(); graxml = GraXMLThread.instance(); } } |
From: Julius H. <hr...@us...> - 2007-10-11 14:41:08
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29738/FrontEnd Modified Files: GraXMLThread.java Log Message: connection to Atlantis improved Index: GraXMLThread.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd/GraXMLThread.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GraXMLThread.java 10 Oct 2007 18:47:35 -0000 1.5 --- GraXMLThread.java 11 Oct 2007 14:41:09 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * <pre> * $Log$ + * Revision 1.6 2007/10/11 14:41:09 hrivnac + * connection to Atlantis improved + * * Revision 1.5 2007/10/10 18:47:35 hrivnac * if running in a Thread, doesn't exist; ticks on axis *************** *** 68,71 **** --- 71,81 ---- } + // TBD + public void detach() { + _instance = null; + _root = null; + stop(); + } + /** Give singleton instance. * @return The singleton instance. */ |
From: Julius H. <hr...@us...> - 2007-10-11 14:40:12
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd/Test In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29371/FrontEnd/Test Log Message: Directory /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd/Test added to the repository |
From: Julius H. <hr...@us...> - 2007-10-10 18:48:39
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5601/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps Modified Files: S3D.java STC.java Track.java Log Message: lines and points with sizes Index: S3D.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/S3D.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** S3D.java 8 Oct 2007 19:42:38 -0000 1.3 --- S3D.java 10 Oct 2007 18:48:38 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; + import javax.media.j3d.PointAttributes; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; *************** *** 55,58 **** --- 56,62 ---- * <pre> * $Log$ + * Revision 1.4 2007/10/10 18:48:38 hrivnac + * lines and points with sizes + * * Revision 1.3 2007/10/08 19:42:38 hrivnac * moved to Java 1.6; fixed Track *************** *** 105,108 **** --- 109,115 ---- Interacter.setOutlined(false); Shape3D shape = new Shape3D(); + Appearance appearance = new Appearance(); + appearance.setPointAttributes(new PointAttributes(_pointSize, true)); + shape.setAppearance(appearance); PointArray pointArray; Color3f color; *************** *** 134,137 **** --- 141,151 ---- private static int[] _colorList; + // TBD + public static void setPointSize(int pointSize) { + _pointSize = pointSize; + } + + private static int _pointSize = 3; + /** Logging . */ private static Logger log = Logger.getLogger(S3D.class); Index: STC.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/STC.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** STC.java 8 Oct 2007 19:42:38 -0000 1.2 --- STC.java 10 Oct 2007 18:48:38 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; + import javax.media.j3d.LineAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.GeometryArray; *************** *** 58,61 **** --- 59,65 ---- * <pre> * $Log$ + * Revision 1.3 2007/10/10 18:48:38 hrivnac + * lines and points with sizes + * * Revision 1.2 2007/10/08 19:42:38 hrivnac * moved to Java 1.6; fixed Track *************** *** 111,114 **** --- 115,121 ---- Interacter.setOutlined(false); Shape3D shape = new Shape3D(); + Appearance appearance = new Appearance(); + appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); + shape.setAppearance(appearance); LineArray lineArray; Color3f color; *************** *** 148,151 **** --- 155,165 ---- private static int[] _colorList; + // TBD + public static void setLineWidth(int lineWidth) { + _lineWidth = lineWidth; + } + + private static int _lineWidth = 3; + /** Logging . */ private static Logger log = Logger.getLogger(STC.class); Index: Track.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/Track.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Track.java 8 Oct 2007 19:42:38 -0000 1.2 --- Track.java 10 Oct 2007 18:48:38 -0000 1.3 *************** *** 41,44 **** --- 41,45 ---- import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; + import javax.media.j3d.LineAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.GeometryArray; *************** *** 72,75 **** --- 73,79 ---- * <pre> * $Log$ + * Revision 1.3 2007/10/10 18:48:38 hrivnac + * lines and points with sizes + * * Revision 1.2 2007/10/08 19:42:38 hrivnac * moved to Java 1.6; fixed Track *************** *** 115,119 **** Shape3D shape; LineArray lineArray; ! Color3f color; int j; // Loop over Tracks --- 119,123 ---- Shape3D shape; LineArray lineArray; ! Color3f color = null; int j; // Loop over Tracks *************** *** 126,139 **** name = "Track(" + storeGateKey + "/" + k + ")"; info = name + "[1-" + n + "]"; - // Color is handled directly - //Appearance appearance = builder().appearance(name, name); - //setAppearance(appearance); - //shape.setAppearance(appearance); shape = new Shape3D(); lineArray = new LineArray(2 * n, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); - color = new Color3f(_colorMap[_colorList[_colorI++]]); j = 0; // Construct Track --- 130,153 ---- name = "Track(" + storeGateKey + "/" + k + ")"; info = name + "[1-" + n + "]"; shape = new Shape3D(); + // Color is handled directly if _colorList is set + // TBD: put "if" to other reps + // TBD: loop over if not big enough + if (_colorList == null) { + Appearance appearance = builder().appearance(name, name); + setAppearance(appearance); + appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); + shape.setAppearance(appearance); + } + else { + Appearance appearance = new Appearance(); + appearance.setLineAttributes(new LineAttributes(_lineWidth, LineAttributes.PATTERN_SOLID, true)); + shape.setAppearance(appearance); + color = new Color3f(_colorMap[_colorList[_colorI++]]); + } lineArray = new LineArray(2 * n, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); j = 0; // Construct Track *************** *** 143,147 **** ys[i] / SCALE, zs[i] / SCALE)); ! lineArray.setColor(j, color); lineArray.setNormal(j, new Vector3f(0, 0, 0)); j++; --- 157,163 ---- ys[i] / SCALE, zs[i] / SCALE)); ! if (_colorList != null) { ! lineArray.setColor(j, color); ! } lineArray.setNormal(j, new Vector3f(0, 0, 0)); j++; *************** *** 151,155 **** ys[i] / SCALE, zs[i] / SCALE)); ! lineArray.setColor(j, color); lineArray.setNormal(j, new Vector3f(0, 0, 0)); j++; --- 167,173 ---- ys[i] / SCALE, zs[i] / SCALE)); ! if (_colorList != null) { ! lineArray.setColor(j, color); ! } lineArray.setNormal(j, new Vector3f(0, 0, 0)); j++; *************** *** 329,332 **** --- 347,357 ---- private static int _colorI; + // TBD + public static void setLineWidth(int lineWidth) { + _lineWidth = lineWidth; + } + + private static int _lineWidth = 3; + /** Logging . */ private static Logger log = Logger.getLogger(Track.class); |
From: Julius H. <hr...@us...> - 2007-10-10 18:48:36
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5601/net/hep/atlas/graphics/JiveEvent/GeometricModel Modified Files: Evaluator.java JiveEventBuilder.java Log Message: lines and points with sizes Index: JiveEventBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/JiveEventBuilder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JiveEventBuilder.java 2 Oct 2007 18:41:02 -0000 1.7 --- JiveEventBuilder.java 10 Oct 2007 18:48:37 -0000 1.8 *************** *** 22,25 **** --- 22,28 ---- * <pre> * $Log$ + * Revision 1.8 2007/10/10 18:48:37 hrivnac + * lines and points with sizes + * * Revision 1.7 2007/10/02 18:41:02 hrivnac * S3D added *************** *** 70,74 **** * @return The list of (embedded) demostration files. */ public String[] demos() { ! String[] demos = {"net/hep/atlas/graphics/JiveEvent/Test/data/ttbar_t1_full_01.xml"}; return demos; } --- 73,77 ---- * @return The list of (embedded) demostration files. */ public String[] demos() { ! String[] demos = {"net/hep/atlas/graphics/JiveEvent/Test/data/JiveXML_5200_01388.xml"}; return demos; } Index: Evaluator.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Evaluator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Evaluator.java 4 Oct 2007 16:19:09 -0000 1.1 --- Evaluator.java 10 Oct 2007 18:48:37 -0000 1.2 *************** *** 12,15 **** --- 12,18 ---- * <pre> * $Log$ + * Revision 1.2 2007/10/10 18:48:37 hrivnac + * lines and points with sizes + * * Revision 1.1 2007/10/04 16:19:09 hrivnac * more complete interface to Atlantis *************** *** 21,25 **** public final class Evaluator { ! public static float SCALE = 1000f; /** Logging . */ --- 24,28 ---- public final class Evaluator { ! public static float SCALE = 100f; /** Logging . */ |
From: Julius H. <hr...@us...> - 2007-10-10 18:48:07
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5126/net/hep/graphics/GraXML/FrontEnd Modified Files: GraXMLThread.java Log Message: if running in a Thread, doesn't exist; ticks on axis Index: GraXMLThread.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/FrontEnd/GraXMLThread.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GraXMLThread.java 9 Oct 2007 17:17:50 -0000 1.4 --- GraXMLThread.java 10 Oct 2007 18:47:35 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * <pre> * $Log$ + * Revision 1.5 2007/10/10 18:47:35 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.4 2007/10/09 17:17:50 hrivnac * both i386 and amd64 Linux supported; using Java3D 1.5.1 *************** *** 51,55 **** /** Open {@link RootWindow}. */ public void run() { ! _root.openThread(); } --- 54,58 ---- /** Open {@link RootWindow}. */ public void run() { ! _root.openThread(this); } |
From: Julius H. <hr...@us...> - 2007-10-10 18:47:47
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/Interactivity In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5126/net/hep/graphics/GraXML/Java3DExtensions/Interactivity Modified Files: Interacter.java Log Message: if running in a Thread, doesn't exist; ticks on axis Index: Interacter.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/Interactivity/Interacter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Interacter.java 11 Jan 2007 13:56:48 -0000 1.7 --- Interacter.java 10 Oct 2007 18:47:42 -0000 1.8 *************** *** 27,30 **** --- 27,33 ---- * <pre> * $Log$ + * Revision 1.8 2007/10/10 18:47:42 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.7 2007/01/11 13:56:48 hrivnac * version 3.1.10 *************** *** 191,196 **** color.setCapability(Appearance.ALLOW_TEXTURE_READ); Material material = color.getMaterial(); ! material.setCapability(Material.ALLOW_COMPONENT_READ); ! material.setCapability(Material.ALLOW_COMPONENT_WRITE); TransparencyAttributes transparencyAtt = color.getTransparencyAttributes(); if (transparencyAtt == null) { --- 194,201 ---- color.setCapability(Appearance.ALLOW_TEXTURE_READ); Material material = color.getMaterial(); ! if (material != null) { ! material.setCapability(Material.ALLOW_COMPONENT_READ); ! material.setCapability(Material.ALLOW_COMPONENT_WRITE); ! } TransparencyAttributes transparencyAtt = color.getTransparencyAttributes(); if (transparencyAtt == null) { |
From: Julius H. <hr...@us...> - 2007-10-10 18:47:45
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5126/net/hep/graphics/GraXML/Java3DExtensions Modified Files: Envelope.java J3DFrame.java Log Message: if running in a Thread, doesn't exist; ticks on axis Index: J3DFrame.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/J3DFrame.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** J3DFrame.java 9 Oct 2007 17:17:51 -0000 1.6 --- J3DFrame.java 10 Oct 2007 18:47:42 -0000 1.7 *************** *** 41,44 **** --- 41,47 ---- * <pre> * $Log$ + * Revision 1.7 2007/10/10 18:47:42 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.6 2007/10/09 17:17:51 hrivnac * both i386 and amd64 Linux supported; using Java3D 1.5.1 *************** *** 261,266 **** * @param window The {@link RootWindow} to be attached. */ public final void attachWindow(RootWindow window) { ! MainFrame frame = new MainFrame(window, 1000, 700); ! frame.setTitle("GraXML " + GlobalOptions.version()); } --- 264,275 ---- * @param window The {@link RootWindow} to be attached. */ public final void attachWindow(RootWindow window) { ! _frame = new MainFrame(window, 1000, 700); ! _frame.setTitle("GraXML " + GlobalOptions.version()); ! } ! ! /** Dispose/close. */ ! public void dispose() { ! _frame.dispose(); ! _frame = null; } *************** *** 300,303 **** --- 309,314 ---- } + private MainFrame _frame; + private double _frontLimit; Index: Envelope.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/Java3DExtensions/Envelope.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Envelope.java 30 Mar 2005 12:44:31 -0000 1.1 --- Envelope.java 10 Oct 2007 18:47:42 -0000 1.2 *************** *** 7,14 **** --- 7,17 ---- import javax.media.j3d.Material; import javax.media.j3d.TransparencyAttributes; + import javax.media.j3d.PointAttributes; import javax.media.j3d.Shape3D; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; + import javax.media.j3d.GeometryArray; import javax.media.j3d.LineArray; + import javax.media.j3d.PointArray; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; *************** *** 21,24 **** --- 24,30 ---- * <pre> * $Log$ + * Revision 1.2 2007/10/10 18:47:42 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.1 2005/03/30 12:44:31 hrivnac * GraXML introduced *************** *** 45,49 **** public final class Envelope extends BranchGroup { ! /** Create and initialise. */ public Envelope() { --- 51,55 ---- public final class Envelope extends BranchGroup { ! /** Create and initialise. */ public Envelope() { *************** *** 54,106 **** // White Transparent Color3f transColor = new Color3f(0.5f, 0.5f, 0.5f); - TransparencyAttributes transAtt = new TransparencyAttributes(); - transAtt.setTransparency(0.8f); - transAtt.setTransparencyMode(TransparencyAttributes.NICEST); Appearance transparent = new Appearance(); transparent.setMaterial(new Material(transColor, transColor, transColor, transColor, 1.0f)); ! transparent.setTransparencyAttributes(transAtt); ! // Grey ! Color3f greyColor = new Color3f(0.8f, 0.8f, 0.8f); ! Appearance grey = new Appearance(); ! grey.setMaterial(new Material(greyColor, greyColor, greyColor, greyColor, 1.0f)); ! // Red ! Color3f redColor = new Color3f(1f, 0, 0); ! Appearance red = new Appearance(); ! red.setMaterial(new Material(redColor, redColor, redColor, redColor, 1.0f)); ! // Green ! Color3f greenColor = new Color3f(0, 1f, 0); ! Appearance green = new Appearance(); ! green.setMaterial(new Material(greenColor, greenColor, greenColor, greenColor, 1.0f)); ! // Blue ! Color3f blueColor = new Color3f(0, 0, 1f); ! Appearance blue = new Appearance(); ! blue.setMaterial(new Material(blueColor, blueColor, blueColor, blueColor, 1f)); // Texts if (_axis) { ! // x ! Transform3D t3dX = new Transform3D(); ! t3dX.set(0.1, new Vector3d(_radius, 0, 0)); ! TransformGroup tgX = new TransformGroup(t3dX); ! tgX.addChild(new BillboardGroup("x", ! green, ! _bounds)); ! addChild(tgX); ! // y ! Transform3D t3dY = new Transform3D(); ! t3dY.set(0.1, new Vector3d(0, _radius, 0)); ! TransformGroup tgY = new TransformGroup(t3dY); ! tgY.addChild(new BillboardGroup("y", ! blue, ! _bounds)); ! addChild(tgY); ! // z ! Transform3D t3dZ = new Transform3D(); ! t3dZ.set(0.1, new Vector3d(0, 0, _length / 2)); ! TransformGroup tgZ = new TransformGroup(t3dZ); ! tgZ.addChild(new BillboardGroup(_logo, ! red, ! _bounds)); ! addChild(tgZ); } --- 60,90 ---- // White Transparent Color3f transColor = new Color3f(0.5f, 0.5f, 0.5f); Appearance transparent = new Appearance(); transparent.setMaterial(new Material(transColor, transColor, transColor, transColor, 1.0f)); ! transparent.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, 1.0f)); ! // Grey, Red, Green, Blue ! Color3f grey = new Color3f(0.8f, 0.8f, 0.8f); ! Color3f red = new Color3f(1f, 0, 0 ); ! Color3f green = new Color3f(0, 1f, 0 ); ! Color3f blue = new Color3f(0, 0, 1f ); // Texts if (_axis) { ! addLabel("x[m ]", new double[]{_radius, 0, 0 }, green, 0.1, 0.2f, false); ! addLabel("y[m ]", new double[]{0, _radius, 0 }, blue, 0.1, 0.2f, false); ! addLabel("z[m ]", new double[]{0, 0, _length / 2}, red, 0.1, 0.2f, false); ! double r; ! double l; ! int n = (int)(_nTicks * _radius); ! for (int i = 1; i < n; i++) { ! r = _radius * i / n; ! l = _length * i / n / 2; ! addLabel(String.valueOf( r), new double[]{ r, 0, 0}, green, 0.02, 0.5f, true); ! addLabel(String.valueOf( r), new double[]{ 0, r, 0}, blue, 0.02, 0.5f, true); ! addLabel(String.valueOf( l), new double[]{ 0, 0, l}, red, 0.02, 0.5f, true); ! addLabel(String.valueOf(-r), new double[]{-r, 0, 0}, green, 0.02, 0.5f, true); ! addLabel(String.valueOf(-r), new double[]{ 0, -r, 0}, blue, 0.02, 0.5f, true); ! addLabel(String.valueOf(-l), new double[]{ 0, 0, -l}, red, 0.02, 0.5f, true); ! } } *************** *** 137,140 **** --- 121,166 ---- } + // TBD + private void addLabel(String text, + double[] place, + Color3f color, + double size, + float transparency, + boolean drawPoint) { + + Appearance appearance = new Appearance(); + appearance.setMaterial(new Material(color, color, color, color, 1.0f)); + appearance.setPointAttributes(new PointAttributes(5, true)); + + Appearance transparent = (Appearance)(appearance.cloneNodeComponent(true)); + transparent.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, transparency)); + + Transform3D t3d = new Transform3D(); + t3d.set(size, new Vector3d(place)); + TransformGroup tg = new TransformGroup(t3d); + + BillboardGroup label = new BillboardGroup(text, + transparent, + _bounds); + tg.addChild(label); + + + + if (drawPoint) { + Shape3D point = new Shape3D(); + point.setAppearance(appearance); + PointArray pointArray = new PointArray(1, + GeometryArray.COORDINATES| + GeometryArray.COLOR_3); + pointArray.setCoordinate(0, new Point3d(place)); + pointArray.setColor(0, color); + point.addGeometry(pointArray); + tg.addChild(point); + } + + addChild(tg); + + } + /** Set logo on the z-axis. * @param logo The text to be shown on z-axis, *************** *** 164,172 **** private static boolean _cylinder = false; ! private static final double _length = 5; ! private static final double _radius = 1; ! private static final BoundingSphere _bounds = new BoundingSphere(new Point3d(0, 0, 0), 100); } --- 190,215 ---- private static boolean _cylinder = false; ! // TBD ! public static final void setLength(double length) { ! _length = length; ! } ! private static double _length = 2; ! // TBD ! public static final void setRadius(double radius) { ! _radius = radius; ! } ! ! private static double _radius = 1; ! ! // TBD ! public static final void setNTicks(int nTicks) { ! _nTicks = nTicks; ! } ! ! private static int _nTicks = 10; ! ! private static final BoundingSphere _bounds = new BoundingSphere(new Point3d(0, 0, 0), 10); } |
From: Julius H. <hr...@us...> - 2007-10-10 18:47:43
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/Components In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5126/net/hep/graphics/GraXML/GUI/Components Modified Files: ScalerSlider.java Log Message: if running in a Thread, doesn't exist; ticks on axis Index: ScalerSlider.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/Components/ScalerSlider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ScalerSlider.java 9 Oct 2007 17:17:51 -0000 1.2 --- ScalerSlider.java 10 Oct 2007 18:47:42 -0000 1.3 *************** *** 10,13 **** --- 10,16 ---- * <pre> * $Log$ + * Revision 1.3 2007/10/10 18:47:42 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.2 2007/10/09 17:17:51 hrivnac * both i386 and amd64 Linux supported; using Java3D 1.5.1 *************** *** 35,39 **** public ScalerSlider(ChangeListener listener) { ! super(JSlider.VERTICAL, 1, 10000, 5000); setName("Scale"); addChangeListener(listener); --- 38,42 ---- public ScalerSlider(ChangeListener listener) { ! super(JSlider.VERTICAL, 1, 1000, 500); setName("Scale"); addChangeListener(listener); |
From: Julius H. <hr...@us...> - 2007-10-10 18:47:42
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5126/net/hep/graphics/GraXML/GUI Modified Files: RootActionListener.java RootWindow.java Log Message: if running in a Thread, doesn't exist; ticks on axis Index: RootWindow.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/RootWindow.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RootWindow.java 9 Oct 2007 17:17:50 -0000 1.8 --- RootWindow.java 10 Oct 2007 18:47:42 -0000 1.9 *************** *** 78,81 **** --- 78,84 ---- * <pre> * $Log$ + * Revision 1.9 2007/10/10 18:47:42 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.8 2007/10/09 17:17:50 hrivnac * both i386 and amd64 Linux supported; using Java3D 1.5.1 *************** *** 185,191 **** /** Open this window. Performs both phases. */ public final void open() { ! log.info("Opening RootWindow ..."); openInit(); ! openThread(); } --- 188,194 ---- /** Open this window. Performs both phases. */ public final void open() { ! log.info("Opening GraXML RootWindow ..."); openInit(); ! openThread(null); } *************** *** 196,201 **** } ! /** Open this window. Second phase - starts thread. */ ! public final void openThread() { _interpreter.run(); } --- 199,206 ---- } ! /** Open this window. Second phase - starts thread. ! * @param thread The wrappin g {@link Thread}. */ ! public final void openThread(Thread thread) { ! _thread = thread; _interpreter.run(); } *************** *** 247,250 **** --- 252,266 ---- } + /** Close. Shutdown if not connected to {@link Thread}. */ + public void close() { + log.info("Closing GraXML RootWindow ..."); + if (_thread == null) { + System.exit(0); + } + else { + _j3d.dispose(); + } + } + // Showing ------------------------------------------------------------------- *************** *** 698,701 **** --- 714,719 ---- // Data ---------------------------------------------------------------------- + private Thread _thread; + private InteracterDB _interacters = new InteracterDB(); Index: RootActionListener.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/RootActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RootActionListener.java 18 Jan 2007 16:04:59 -0000 1.3 --- RootActionListener.java 10 Oct 2007 18:47:37 -0000 1.4 *************** *** 40,43 **** --- 40,46 ---- * <pre> * $Log$ + * Revision 1.4 2007/10/10 18:47:37 hrivnac + * if running in a Thread, doesn't exist; ticks on axis + * * Revision 1.3 2007/01/18 16:04:59 hrivnac * clean button added *************** *** 148,152 **** RootWindow.reportException("Can't write .GraXML.transformations", e, log); } ! System.exit(0); } --- 151,155 ---- RootWindow.reportException("Can't write .GraXML.transformations", e, log); } ! _window.close(); } |
From: Julius H. <hr...@us...> - 2007-10-09 17:18:08
|
Update of /cvsroot/graxml/Graphics/GraXML/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16335 Modified Files: build.xml Log Message: both i386 and amd64 Linux supported; using Java3D 1.5.1 Index: build.xml =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/ant/build.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** build.xml 2 Oct 2007 23:06:18 -0000 1.16 --- build.xml 9 Oct 2007 17:18:07 -0000 1.17 *************** *** 34,48 **** <pathelement path="${JiveEvent.core}"/> <pathelement path="${JiveGeometry.core}"/> - <pathelement path="${JAXP-2.0.api}"/> - <pathelement path="${JAXB-2.0.api}"/> - <pathelement path="${JAXB-2.0.impl}"/> - <pathelement path="${JAXB-2.0.impl1}"/> - <pathelement path="${JAXB-2.0.xjc}"/> - <pathelement path="${JWSDP.activation}"/> - <pathelement path="${JWSDP.namespace}"/> - <pathelement path="${JWSDP.relax}"/> - <pathelement path="${JWSDP.qname}"/> - <pathelement path="${JWSDP.jsr173}"/> - <pathelement path="${JWSDP.xsd}"/> <pathelement path="${CLASSPATH}"/> <fileset dir="${lib}"> --- 34,37 ---- *************** *** 92,107 **** <fileset file="${JiveEvent.core}"/> <fileset file="${JiveGeometry.core}"/> ! <fileset file="${JAXP-2.0.api}"/> ! <fileset file="${JAXB-2.0.api}"/> ! <fileset file="${JAXB-2.0.impl}"/> ! <fileset file="${JAXB-2.0.impl1}"/> ! <fileset file="${JAXB-2.0.xjc}"/> ! <fileset file="${JWSDP.activation}"/> ! <fileset file="${JWSDP.namespace}"/> ! <fileset file="${JWSDP.relax}"/> ! <fileset file="${JWSDP.qname}"/> ! <fileset file="${JWSDP.jsr173}"/> ! <fileset file="${JWSDP.xsd}"/> ! <fileset dir="${Java3D.libdir}"/> </copy> <copy todir="${bin}"> --- 81,92 ---- <fileset file="${JiveEvent.core}"/> <fileset file="${JiveGeometry.core}"/> ! </copy> ! <mkdir dir="${lib}/i386"/> ! <copy todir="${lib}/i386"> ! <fileset dir="${Java3D.i386}"/> ! </copy> ! <mkdir dir="${lib}/amd64"/> ! <copy todir="${lib}/amd64"> ! <fileset dir="${Java3D.amd64}"/> </copy> <copy todir="${bin}"> *************** *** 209,215 **** </jar> <copy todir="${atlantis.lib}"> ! <fileset dir="${lib}" includes="*.so"/> ! <fileset dir="${lib}" includes="activation.jar ! bool.jar bsh-2.0b1.jar colt.jar --- 194,198 ---- </jar> <copy todir="${atlantis.lib}"> ! <fileset dir="${lib}" includes="bool.jar bsh-2.0b1.jar colt.jar *************** *** 220,240 **** j3dcore.jar j3dutils.jar - jaxb1-impl.jar - jaxb-api.jar - jaxb-impl.jar - jaxb-xjc.jar - jaxp-api.jar JiveEvent.jar - JiveGeometry.jar jlfgr.jar - jsr173_api.jar log4j-1.2.8.jar - relaxngDatatype.jar vecmath.jar xercesImpl.jar ! xml-apis.jar ! xsdlib.jar"/> </copy> ! </target> <!-- Distribution =========================================================--> --- 203,220 ---- j3dcore.jar j3dutils.jar JiveEvent.jar jlfgr.jar log4j-1.2.8.jar vecmath.jar xercesImpl.jar ! xml-apis.jar"/> </copy> ! <copy todir="${atlantis.lib}/i386"> ! <fileset dir="${lib}/i386" includes="*.so"/> ! </copy> ! <copy todir="${atlantis.lib}/amd64"> ! <fileset dir="${lib}/amd64" includes="*.so"/> ! </copy> ! </target> <!-- Distribution =========================================================--> *************** *** 248,253 **** compression="gzip"> <tarfileset dir="${lib}" prefix="lib"> - <include name="*.so"/> - <include name="activation.jar"/> <include name="bool.jar"/> <include name="bsh-2.0b1.jar"/> --- 228,231 ---- *************** *** 259,279 **** <include name="j3dcore.jar"/> <include name="j3dutils.jar"/> - <include name="jaxb1-impl.jar"/> - <include name="jaxb-api.jar"/> - <include name="jaxb-impl.jar"/> - <include name="jaxb-xjc.jar"/> - <include name="jaxp-api.jar"/> <include name="JiveEvent.jar"/> - <include name="JiveGeometry.jar"/> <include name="jlfgr.jar"/> - <include name="jsr173_api.jar"/> <include name="log4j-1.2.8.jar"/> - <include name="relaxngDatatype.jar"/> <include name="vecmath.jar"/> <include name="xercesImpl.jar"/> <include name="xml-apis.jar"/> - <include name="xsdlib.jar"/> </tarfileset> ! </tar> </target> --- 237,254 ---- <include name="j3dcore.jar"/> <include name="j3dutils.jar"/> <include name="JiveEvent.jar"/> <include name="jlfgr.jar"/> <include name="log4j-1.2.8.jar"/> <include name="vecmath.jar"/> <include name="xercesImpl.jar"/> <include name="xml-apis.jar"/> </tarfileset> ! <tarfileset dir="${lib}/i386" prefix="lib/i386"> ! <include name="*.so"/> ! </tarfileset> ! <tarfileset dir="${lib}/amd64" prefix="lib/amd64"> ! <include name="*.so"/> ! </tarfileset> ! </tar> </target> *************** *** 404,413 **** <group title="Java3DExtensions" packages="net.hep.graphics.GraXML.Java3DExtensions*"/> <group title="FrontEnd" packages="net.hep.graphics.GraXML.FrontEnd*"/> ! <link href="http://java.sun.com/j2se/1.5.0/docs/api"/> <link href="http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi/"/> <link href="http://www.beanshell.org/javadoc/"/> <link href="http://logging.apache.org/log4j/docs/api/"/> <link href="http://xml.apache.org/xerces2-j/javadocs/api/"/> - <link href="http://java.sun.com/xml/jaxb/api"/> <link href="http://www-itg.lbl.gov/~hoschek/colt/api/"/> <link href="http://hrivnac.home.cern.ch/hrivnac/Activities/Packages/HEP3D/JavaDoc/"/> --- 379,387 ---- <group title="Java3DExtensions" packages="net.hep.graphics.GraXML.Java3DExtensions*"/> <group title="FrontEnd" packages="net.hep.graphics.GraXML.FrontEnd*"/> ! <link href="http://java.sun.com/j2se/1.6.0/docs/api"/> <link href="http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi/"/> <link href="http://www.beanshell.org/javadoc/"/> <link href="http://logging.apache.org/log4j/docs/api/"/> <link href="http://xml.apache.org/xerces2-j/javadocs/api/"/> <link href="http://www-itg.lbl.gov/~hoschek/colt/api/"/> <link href="http://hrivnac.home.cern.ch/hrivnac/Activities/Packages/HEP3D/JavaDoc/"/> |
From: Julius H. <hr...@us...> - 2007-10-09 17:17:55
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/doc-files In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16219/net/hep/graphics/GraXML/doc-files Modified Files: Guide.html Log Message: both i386 and amd64 Linux supported; using Java3D 1.5.1 Index: Guide.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/doc-files/Guide.html,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Guide.html 2 Oct 2007 23:06:47 -0000 1.21 --- Guide.html 9 Oct 2007 17:17:51 -0000 1.22 *************** *** 929,932 **** --- 929,934 ---- <li>Migrated to JAXB 2.0.</li> <li>Capable running with Atlantis.</li> + <li>Migrated to Java3D 1.5.1.</li> + <li>Support for both i386 and amd64 architectures on Linux.</li> </ul> <li>Bug fixes:</li> *************** *** 938,943 **** <hr> ! <img width="0" height="0" src="http://hrivnac.home.cern.ch/hrivnac/cgi-bin/record.pl?page=GraXML_Guide"> ! <address><a href="http://hrivnac.home.cern.ch/hrivnac">J.Hrivnac</a>, @BUILD@</address> </body> --- 940,945 ---- <hr> ! <img width="0" height="0" src="http://cern.ch/hrivnac/cgi-bin/record.pl?page=GraXML_Guide"> ! <address><a href="http://cern.ch/hrivnac">J.Hrivnac</a>, @BUILD@</address> </body> |
From: Julius H. <hr...@us...> - 2007-10-09 17:17:54
|
Update of /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/Components In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16219/net/hep/graphics/GraXML/GUI/Components Modified Files: ScalerSlider.java Log Message: both i386 and amd64 Linux supported; using Java3D 1.5.1 Index: ScalerSlider.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXML/src/net/hep/graphics/GraXML/GUI/Components/ScalerSlider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ScalerSlider.java 30 Mar 2005 12:44:30 -0000 1.1 --- ScalerSlider.java 9 Oct 2007 17:17:51 -0000 1.2 *************** *** 10,13 **** --- 10,16 ---- * <pre> * $Log$ + * Revision 1.2 2007/10/09 17:17:51 hrivnac + * both i386 and amd64 Linux supported; using Java3D 1.5.1 + * * Revision 1.1 2005/03/30 12:44:30 hrivnac * GraXML introduced *************** *** 32,36 **** public ScalerSlider(ChangeListener listener) { ! super(JSlider.VERTICAL, 1, 200, 100); setName("Scale"); addChangeListener(listener); --- 35,39 ---- public ScalerSlider(ChangeListener listener) { ! super(JSlider.VERTICAL, 1, 10000, 5000); setName("Scale"); addChangeListener(listener); |