nl.lxtreme.ols.util.swing
Class StandardActionFactory

java.lang.Object
  extended by nl.lxtreme.ols.util.swing.StandardActionFactory

public final class StandardActionFactory
extends Object

Provides a Swing StandardActionFactory.CancelAction-factory for some commonly used actions.


Nested Class Summary
static class StandardActionFactory.CancelAction
          Denotes an action for an "Cancel" button.
static class StandardActionFactory.CloseAction
          Provides a generic close dialog action.
static class StandardActionFactory.DialogStatus
          Denotes the result status of a dialog.
static class StandardActionFactory.OkAction
          Denotes an action for an "Ok"/"Apply" button.
static interface StandardActionFactory.StatusAwareCloseableDialog
           
 
Field Summary
static String CLOSE_ACTION_ID
          Denotes the ID of a "close"/"cancel" action.
 
Method Summary
static Action createCancelAction()
          Creates a new cancel action instance.
static JButton createCancelButton()
          Creates a new button instance with a cancel action assigned to it.
static Action createCloseAction()
          Creates a new close action instance.
static JButton createCloseButton()
          Creates a new button instance with a close action assigned to it.
static Action createOkAction()
          Creates a new OK action instance.
static JButton createOkButton()
          Creates a new button instance with an OK action assigned to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSE_ACTION_ID

public static final String CLOSE_ACTION_ID
Denotes the ID of a "close"/"cancel" action.

See Also:
Constant Field Values
Method Detail

createCancelAction

public static final Action createCancelAction()
Creates a new cancel action instance.

Returns:
a cancel action instance, never null.

createCancelButton

public static final JButton createCancelButton()
Creates a new button instance with a cancel action assigned to it.

Returns:
a new cancel-button instance, never null.

createCloseAction

public static final Action createCloseAction()
Creates a new close action instance.

The close action will have a default shortcut key of CTRL/CMD + W on Mac OS platforms, and ESC on other platforms.

Returns:
a close action instance, never null.

createCloseButton

public static final JButton createCloseButton()
Creates a new button instance with a close action assigned to it.

The close action shortcut will be set as default operation on the returned button.

Returns:
a new close-button instance, never null.

createOkAction

public static final Action createOkAction()
Creates a new OK action instance.

Returns:
an OK action instance, never null.

createOkButton

public static final JButton createOkButton()
Creates a new button instance with an OK action assigned to it.

Returns:
a new OK-button instance, never null.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.