Example usage for org.apache.commons.scxml2.model ModelException printStackTrace

List of usage examples for org.apache.commons.scxml2.model ModelException printStackTrace

Introduction

In this page you can find the example usage for org.apache.commons.scxml2.model ModelException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.github.woonsan.commons.scxml.examples.stopwatch.StopWatchFrame.java

public void actionPerformed(ActionEvent event) {
    String command = event.getActionCommand();

    try {//from   w  w w .j  a va  2s .  c  om
        if ("START".equals(command)) {
            executor.triggerEvent(new TriggerEvent("watch.start", TriggerEvent.SIGNAL_EVENT));

            startButton.setEnabled(false);
            stopButton.setEnabled(true);
            resetButton.setEnabled(false);

        } else if ("STOP".equals(command)) {
            executor.triggerEvent(new TriggerEvent("watch.stop", TriggerEvent.SIGNAL_EVENT));

            startButton.setEnabled(true);
            stopButton.setEnabled(false);
            resetButton.setEnabled(true);

        } else if ("RESET".equals(command)) {
            executor.triggerEvent(new TriggerEvent("watch.reset", TriggerEvent.SIGNAL_EVENT));

            startButton.setEnabled(true);
            stopButton.setEnabled(false);
            resetButton.setEnabled(false);

        }
    } catch (ModelException e) {
        e.printStackTrace();
    }
}