public void process() { if (start.getValue() == true) { if (counter >= to.getValue()) { counter = from.getValue(); } started = true; } if (stop.getValue()) { started = false; } if (delay.getValue() != oldImpuse) { oldImpuse = delay.getValue(); if (timer != null) timer.setDelay(delay.getValue()); } if (reset.getValue() == true) { counter = from.getValue(); outValue.setValue(counter); outValue.setChanged(true); element.notifyPin(0); } }
public void start() { timer = new javax.swing.Timer( delay.getValue(), new ActionListener() { public void actionPerformed(ActionEvent evt) { processX(); } }); started = false; counter = from.getValue(); outValue.setValue(counter); outValue.setChanged(true); element.notifyPin(0); timer.start(); }