예제 #1
0
  public void applyProperties() {
    visible = visibleCbx.isSelected();
    float f = (float) (slider.getValue() / 100.0f);
    color = new Color3f(f, f, f);
    location =
        new Point3d(
            new Double(locationXFld.getText()).doubleValue(),
            new Double(locationYFld.getText()).doubleValue(),
            new Double(locationZFld.getText()).doubleValue());

    direction =
        new Vector3f(
            new Float(directionXFld.getText()).floatValue(),
            new Float(directionYFld.getText()).floatValue(),
            new Float(directionZFld.getText()).floatValue());

    updateLight();
  }
예제 #2
0
 private JTextField makeField(String s, ObjectListener listener, String tip) {
   JTextField fld = new JTextField(s, 3);
   if (listener != null) fld.addActionListener(listener);
   fld.setToolTipText(tip);
   return fld;
 }