cz.psika.numerist
Class SharedActions

java.lang.Object
  extended by cz.psika.numerist.SharedActions

public final class SharedActions
extends java.lang.Object

Shareable actions.

Author:
Tomas Psika

Nested Class Summary
static class SharedActions.Actions
          Shareable actions.
 
Constructor Summary
SharedActions()
           
 
Method Summary
static boolean actionTest(SharedActions.Actions action)
          Some tests used to make GUI interface behave dynamic.
static javax.swing.Action getAction(SharedActions.Actions action)
          Simple switch returning action handlers without parameters.
 javax.swing.Action getAction(SharedActions.Actions action, java.lang.Object param)
          Get parametrized action handlers.
static SharedActions getInstance()
          Get singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedActions

public SharedActions()
Method Detail

getInstance

public static final SharedActions getInstance()
Get singleton instance.

Returns:
single instance of this class

getAction

public static javax.swing.Action getAction(SharedActions.Actions action)
Simple switch returning action handlers without parameters.

Parameters:
action - action type
Returns:
action handler

getAction

public javax.swing.Action getAction(SharedActions.Actions action,
                                    java.lang.Object param)
Get parametrized action handlers.

Parameters:
action - action type
param - action parameter
Returns:
action handler
Throws:
java.lang.IllegalArgumentException - when called with action type which is not known

actionTest

public static boolean actionTest(SharedActions.Actions action)
Some tests used to make GUI interface behave dynamic.

Parameters:
action -
Returns:
true if action could be triggered, else false