private void bColorMapActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_bColorMapActionPerformed ColorMapDialog cmDialog = new ColorMapDialog(Frame.getFrameInstance(), true, generator.getColorMap()); cmDialog.setVisible(true); generator.setColorMap(cmDialog.getColorMap()); } // GEN-LAST:event_bColorMapActionPerformed
/** Creates new form ColorTableDialog */ public DropsConfiguration(java.awt.Frame parent, boolean modal, Rain generator) { super(parent, modal); this.setTitle(generator.getName().toString() + " Configuration"); this.generator = generator; initComponents(); tfsLength.setValue(generator.getRainLength()); tfsCount.setValue(generator.getDropsPerScreen()); tfsSpeed.setValue(generator.getBpm()); cbScrollMode.setModel(new DefaultComboBoxModel(RainDirection.values())); cbScrollMode.setSelectedItem(generator.getMode()); tfsLength.addTFSListener( new TFSListener() { @Override public void stateChanged(ChangeEvent e) { tpsLengthStateChanged(e); } }); tfsSpeed.addTFSListener( new TFSListener() { @Override public void stateChanged(ChangeEvent e) { tpsSpeedStateChanged(e); } }); tfsCount.addTFSListener( new TFSListener() { @Override public void stateChanged(ChangeEvent e) { tpsCountStateChanged(e); } }); setLocationRelativeTo(null); }
private void tpsCountStateChanged(ChangeEvent e) { int count = ((JTextFieldSlider) e.getSource()).getValue(); generator.setDrosPerScreen(count); }
private void tpsSpeedStateChanged(ChangeEvent e) { int speed = ((JTextFieldSlider) e.getSource()).getValue(); generator.setBpm(speed); }
private void tpsLengthStateChanged(ChangeEvent e) { int distance = ((JTextFieldSlider) e.getSource()).getValue(); generator.setRainLength(distance); }
private void jCheckBox1ActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jCheckBox1ActionPerformed generator.setRandom(jCheckBox1.isSelected()); } // GEN-LAST:event_jCheckBox1ActionPerformed
private void cbScrollModeActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cbScrollModeActionPerformed generator.setMode((RainDirection) cbScrollMode.getSelectedItem()); } // GEN-LAST:event_cbScrollModeActionPerformed