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);
p = new Particles("particle");
p.setLocation(new Vector2f(200,200));
p.setLocation(new Vector2f(LWJGLGameWindow.getWidth()/2,LWJGLGameWindow.getHeight()/2));
rootNode.add(p);
}

View file

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