Fixed some things in ParticleTest

This commit is contained in:
Ziver Koc 2007-03-26 15:01:51 +00:00
parent 5800ccd567
commit 2cf9def34c
2 changed files with 26 additions and 13 deletions

View file

@ -26,7 +26,7 @@ public class ParticlesTest extends LWJGLGameWindow{
ptf.getJFrame().setVisible(true); ptf.getJFrame().setVisible(true);
p = new Particles("particle"); p = new Particles("particle");
p.setLocation(new Vector2f(200,200)); p.setLocation(new Vector2f(LWJGLGameWindow.getWidth()/2,LWJGLGameWindow.getHeight()/2));
rootNode.add(p); rootNode.add(p);
} }

View file

@ -41,7 +41,7 @@ public class ParticlesTestFrame{
public JFrame getJFrame() { public JFrame getJFrame() {
if (jFrame == null) { if (jFrame == null) {
jFrame = new JFrame(); jFrame = new JFrame();
jFrame.setSize(new Dimension(219, 627)); jFrame.setSize(new Dimension(281, 627));
jFrame.setTitle("ParticleTest"); jFrame.setTitle("ParticleTest");
jFrame.setContentPane(getJContentPane()); jFrame.setContentPane(getJContentPane());
} }
@ -104,6 +104,7 @@ public class ParticlesTestFrame{
regenerate = new JCheckBox(); regenerate = new JCheckBox();
regenerate.setSelected(true); regenerate.setSelected(true);
regenerate.setText("Regenerate"); regenerate.setText("Regenerate");
regenerate.setPreferredSize(new Dimension(125, 24));
regenerate.setName(""); regenerate.setName("");
} }
return regenerate; return regenerate;
@ -119,6 +120,7 @@ public class ParticlesTestFrame{
rainbow = new JCheckBox(); rainbow = new JCheckBox();
rainbow.setText("Rainbow"); rainbow.setText("Rainbow");
rainbow.setName("jCheckBox1"); rainbow.setName("jCheckBox1");
rainbow.setPreferredSize(new Dimension(125, 24));
rainbow.setSelected(true); rainbow.setSelected(true);
} }
return rainbow; return rainbow;
@ -140,6 +142,7 @@ public class ParticlesTestFrame{
slowdown.setSnapToTicks(true); slowdown.setSnapToTicks(true);
slowdown.setMinorTickSpacing(1); slowdown.setMinorTickSpacing(1);
slowdown.setMajorTickSpacing(1); slowdown.setMajorTickSpacing(1);
slowdown.setPreferredSize(new Dimension(250, 43));
slowdown.setValue(1); slowdown.setValue(1);
} }
return slowdown; return slowdown;
@ -154,12 +157,13 @@ public class ParticlesTestFrame{
if (yspeed == null) { if (yspeed == null) {
yspeed = new JSlider(); yspeed = new JSlider();
yspeed.setName("yspeed"); yspeed.setName("yspeed");
yspeed.setMaximum(1000); yspeed.setMaximum(2000);
yspeed.setPaintLabels(true); yspeed.setPaintLabels(true);
yspeed.setPaintTicks(false); yspeed.setPaintTicks(false);
yspeed.setValue(1); yspeed.setValue(1);
yspeed.setSnapToTicks(false); yspeed.setSnapToTicks(false);
yspeed.setMajorTickSpacing(200); yspeed.setMajorTickSpacing(400);
yspeed.setPreferredSize(new Dimension(250, 32));
yspeed.setToolTipText("yspeed"); yspeed.setToolTipText("yspeed");
} }
return yspeed; return yspeed;
@ -174,12 +178,13 @@ public class ParticlesTestFrame{
if (xspeed == null) { if (xspeed == null) {
xspeed = new JSlider(); xspeed = new JSlider();
xspeed.setName("xspeed"); xspeed.setName("xspeed");
xspeed.setMaximum(1000); xspeed.setMaximum(2000);
xspeed.setPaintLabels(true); xspeed.setPaintLabels(true);
xspeed.setPaintTicks(false); xspeed.setPaintTicks(false);
xspeed.setValue(1); xspeed.setValue(1);
xspeed.setSnapToTicks(false); xspeed.setSnapToTicks(false);
xspeed.setMajorTickSpacing(200); xspeed.setMajorTickSpacing(400);
xspeed.setPreferredSize(new Dimension(250, 32));
xspeed.setToolTipText("xspeed"); xspeed.setToolTipText("xspeed");
} }
return xspeed; return xspeed;
@ -200,6 +205,7 @@ public class ParticlesTestFrame{
maxSpeedX.setValue(400); maxSpeedX.setValue(400);
maxSpeedX.setSnapToTicks(false); maxSpeedX.setSnapToTicks(false);
maxSpeedX.setMajorTickSpacing(200); maxSpeedX.setMajorTickSpacing(200);
maxSpeedX.setPreferredSize(new Dimension(250, 32));
maxSpeedX.setToolTipText("MaxSpeedX"); maxSpeedX.setToolTipText("MaxSpeedX");
} }
return maxSpeedX; return maxSpeedX;
@ -220,6 +226,7 @@ public class ParticlesTestFrame{
maxSpeedY.setValue(400); maxSpeedY.setValue(400);
maxSpeedY.setSnapToTicks(false); maxSpeedY.setSnapToTicks(false);
maxSpeedY.setMajorTickSpacing(200); maxSpeedY.setMajorTickSpacing(200);
maxSpeedY.setPreferredSize(new Dimension(250, 32));
maxSpeedY.setToolTipText("MaxSpeedY"); maxSpeedY.setToolTipText("MaxSpeedY");
} }
return maxSpeedY; return maxSpeedY;
@ -240,6 +247,7 @@ public class ParticlesTestFrame{
maxSpeedZ.setValue(1); maxSpeedZ.setValue(1);
maxSpeedZ.setSnapToTicks(false); maxSpeedZ.setSnapToTicks(false);
maxSpeedZ.setMajorTickSpacing(200); maxSpeedZ.setMajorTickSpacing(200);
maxSpeedZ.setPreferredSize(new Dimension(250, 32));
maxSpeedZ.setToolTipText("MaxSpeedZ"); maxSpeedZ.setToolTipText("MaxSpeedZ");
} }
return maxSpeedZ; return maxSpeedZ;
@ -254,12 +262,13 @@ public class ParticlesTestFrame{
if (pullForceX == null) { if (pullForceX == null) {
pullForceX = new JSlider(); pullForceX = new JSlider();
pullForceX.setName("pullForceX"); pullForceX.setName("pullForceX");
pullForceX.setMaximum(50); pullForceX.setMaximum(100);
pullForceX.setPaintLabels(true); pullForceX.setPaintLabels(true);
pullForceX.setPaintTicks(false); pullForceX.setPaintTicks(false);
pullForceX.setValue(1); pullForceX.setValue(1);
pullForceX.setSnapToTicks(true); pullForceX.setSnapToTicks(true);
pullForceX.setMajorTickSpacing(5); pullForceX.setMajorTickSpacing(10);
pullForceX.setPreferredSize(new Dimension(250, 32));
pullForceX.setToolTipText("pullForceX"); pullForceX.setToolTipText("pullForceX");
} }
return pullForceX; return pullForceX;
@ -274,12 +283,13 @@ public class ParticlesTestFrame{
if (pullForceY == null) { if (pullForceY == null) {
pullForceY = new JSlider(); pullForceY = new JSlider();
pullForceY.setName("pullForceY"); pullForceY.setName("pullForceY");
pullForceY.setMaximum(50); pullForceY.setMaximum(100);
pullForceY.setPaintLabels(true); pullForceY.setPaintLabels(true);
pullForceY.setPaintTicks(false); pullForceY.setPaintTicks(false);
pullForceY.setValue(1); pullForceY.setValue(1);
pullForceY.setSnapToTicks(true); pullForceY.setSnapToTicks(true);
pullForceY.setMajorTickSpacing(5); pullForceY.setMajorTickSpacing(10);
pullForceY.setPreferredSize(new Dimension(250, 32));
pullForceY.setToolTipText("pullForceY"); pullForceY.setToolTipText("pullForceY");
} }
return pullForceY; return pullForceY;
@ -294,12 +304,13 @@ public class ParticlesTestFrame{
if (pullForceZ == null) { if (pullForceZ == null) {
pullForceZ = new JSlider(); pullForceZ = new JSlider();
pullForceZ.setName("pullForceZ"); pullForceZ.setName("pullForceZ");
pullForceZ.setMaximum(50); pullForceZ.setMaximum(100);
pullForceZ.setPaintLabels(true); pullForceZ.setPaintLabels(true);
pullForceZ.setPaintTicks(false); pullForceZ.setPaintTicks(false);
pullForceZ.setValue(1); pullForceZ.setValue(1);
pullForceZ.setSnapToTicks(true); pullForceZ.setSnapToTicks(true);
pullForceZ.setMajorTickSpacing(5); pullForceZ.setMajorTickSpacing(10);
pullForceZ.setPreferredSize(new Dimension(250, 32));
pullForceZ.setToolTipText("pullForceZ"); pullForceZ.setToolTipText("pullForceZ");
} }
return pullForceZ; return pullForceZ;
@ -320,6 +331,7 @@ public class ParticlesTestFrame{
life.setValue(1); life.setValue(1);
life.setSnapToTicks(true); life.setSnapToTicks(true);
life.setMajorTickSpacing(1); life.setMajorTickSpacing(1);
life.setPreferredSize(new Dimension(250, 32));
life.setToolTipText("life"); life.setToolTipText("life");
} }
return life; return life;
@ -338,8 +350,9 @@ public class ParticlesTestFrame{
size.setPaintLabels(true); size.setPaintLabels(true);
size.setPaintTicks(false); size.setPaintTicks(false);
size.setValue(5); size.setValue(5);
size.setSnapToTicks(true); size.setSnapToTicks(false);
size.setMajorTickSpacing(5); size.setMajorTickSpacing(5);
size.setPreferredSize(new Dimension(250, 32));
size.setToolTipText("size"); size.setToolTipText("size");
} }
return size; return size;