Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command
Class GuiCommands

    java.lang.Object
      com.pietschy.command.GuiCommands

    public class GuiCommands

extends java.lang.Object

Provides the entry point for loading command configuration and changing library defaults.

To get started using the library please see `ActionCommand`, `CommandGroup` and `CommandContainer`.

See Also:
  `load(ResourceBundle)`, `defaults()`

Method Summary
`static void` | `bindAnnotatedCommands(CommandContainer container, java.lang.Object target)` This method scans the specified target object scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`.
`static void` | `bindAnnotatedCommands(javax.swing.JComponent component)` This method scans the specified component scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`.
`static void` | `bindAnnotatedCommands(javax.swing.JComponent component, java.lang.Object target)` This method scans the specified target object scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`.
`static Logger` | `createLogger(java.lang.Class<? extends java.lang.Object> aClass)` Creates a logger instance for internal use by GUI Command classes.
`static Defaults` | `defaults()` Gets the library defaults.
`static HoverManager` | `getHoverManagerFor(java.awt.Window window)` Get the `HoverManager` that will fire events for command hoverings in the specified window.
`static LoggerFactory` | `getLoggerFactory()` Gets the logger factory used by the library to create internal logger instances.
`static void` | `load(java.util.ResourceBundle bundle)` Loads the configuration from the specified `ResourceBundle`.
`static void` | `load(java.lang.String bundleName)` Loads the configuration from the specified `ResourceBundle` using the same semantics as `ResourceBundle.getBundle(String)`.
`static void` | `setLoggerFactory(LoggerFactory factory)` Sets the logger factory used by the library to create internal logger instances..

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### defaults

    public static Defaults defaults()

  Gets the library defaults.

  Returns:
    the library defaults.

### load

    public static void load(java.util.ResourceBundle bundle)
                     throws ParseException

  Loads the configuration from the specified `ResourceBundle`.

  Parameters:
    `bundle` - the bundle to load.
  Throws:
    `ParseException` - if there was an error loading the configuration.

### load

    public static void load(java.lang.String bundleName)
                     throws ParseException

  Loads the configuration from the specified `ResourceBundle` using the same semantics as `ResourceBundle.getBundle(String)`.

  Parameters:
    `bundleName` - the name of the bundle to load as per `ResourceBundle.getBundle(String)`.
  Throws:
    `ParseException` - if there was an error loading the configuration.

### bindAnnotatedCommands

    public static void bindAnnotatedCommands(CommandContainer container,
                                             java.lang.Object target)

  This method scans the specified target object scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`. If found a command is instantiated and bound to the specified container.

  Parameters:
    `container` - the container to bind to
    `target` - the object containing annotated methods.

### bindAnnotatedCommands

    public static void bindAnnotatedCommands(javax.swing.JComponent component,
                                             java.lang.Object target)

  This method scans the specified target object scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`. If found a command is instantiated and bound to component.

  Parameters:
    `component` - the containing to bind the commands to.
    `target` - the object container the annotated methods.

### bindAnnotatedCommands

    public static void bindAnnotatedCommands(javax.swing.JComponent component)

  This method scans the specified component scanning for any methods that have been annotated with either `@ActionCommand` or `@SwingWorkerCommand`. If found a command is instantiated and bound to component.

  Parameters:
    `component` - the containing the annotated methods.

### getHoverManagerFor

    public static HoverManager getHoverManagerFor(java.awt.Window window)

  Get the `HoverManager` that will fire events for command hoverings in the specified window.

  This method simply delegates to `HoverManager.getInstanceFor(Window)`.

  Parameters:
    `window` - the window of interest.
  Returns:
    the hover manager for the specified window.

### createLogger

    public static Logger createLogger(java.lang.Class<? extends java.lang.Object> aClass)

  Creates a logger instance for internal use by GUI Command classes.

  Parameters:
    `aClass` - the class
  Returns:
    a logger instance for the class
  See Also:
    `setLoggerFactory(LoggerFactory)`

### setLoggerFactory

    public static void setLoggerFactory(LoggerFactory factory)

  Sets the logger factory used by the library to create internal logger instances..

  Parameters:
    `factory` -

### getLoggerFactory

    public static LoggerFactory getLoggerFactory()

  Gets the logger factory used by the library to create internal logger instances.

  Returns:
    the logger factory used by the library for internal logger instances.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch