de.esprit.netsuite.client.gui.action

## Class ClientAction<C extends ClientContext>

- java.lang.Object
- - javax.swing.AbstractAction
  - - de.esprit.common.gui.ZAction<C>
    - - de.esprit.netsuite.client.gui.action.ClientAction<C>

- All Implemented Interfaces:
    ApplicationObject<C>, ErrorHandlerSupport, SimpleLogSupport, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
  Direct Known Subclasses:
    AgentAction, BurstOfSleeperAgentsAction, BurstOfWorkerAgentsAction, ClientConsoleAction, ClientListDataAction, ClientTableDataAction, ClientTextEditorAction, ClientToolAction, ClientTreeSelectionAction, HeavyLoadOnServerAction, ReleaseAllLocksAction, UserAuthenticationAction

      public abstract class ClientAction<C extends ClientContext>
      extends ZAction<C>

  This action manages a ClientContext reference. Furthermore it listens for connection changes and enables/disables automatically depending on what connection state it receives. The connection sensitivity can switched ON/OFF as needed (default is ON).
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.AbstractAction

      `changeSupport, enabled`

    - ### Fields inherited from interface javax.swing.Action

      `ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientAction(C clientCtx, NlsActionKey nls)`
    `ClientAction(C clientCtx, NlsActionKey nls, ActionValidator validator)`
    `ClientAction(C clientCtx, NlsActionKey nls, IconKey iconKey)`
    `ClientAction(C clientCtx, NlsActionKey nls, IconKey iconKey, ActionValidator validator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `actionFailed(java.lang.Exception e)` Is called when the action has thrown an Exception.
    `protected boolean` | `checkEnableCondition()` This condition is evaluated automatically after construction.
    `C` | `getClientContext()`
    `SessionId` | `getSessionId()`
    `boolean` | `isConnectionSensitive()`
    `boolean` | `isLoggedIn()`
    `boolean` | `isOffline()`
    `boolean` | `isOnline()`
    `void` | `setConnectionSensitive(boolean isSensitive)` Allows for switching off/on the connection sensitivity.

    - ### Methods inherited from class de.esprit.common.gui.ZAction

      `actionConfirmed, actionDenied, actionFired, actionPerformed, actionPrepare, actionSucceeded, fire, getApplicationContext, getButtonText, getIcon, getLogChannel, getMenuText, getName, getPressedIcon, getTipText, isForced, isHandleError, isLogDebug, isLogVerbose, isPermitted, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, performAvailabilityCheck, setBusyAnimationEnabled, setHandleError, setIcon, setIcon, setLogChannel, setName, setPressedIcon, setPressedIcon, setText, setTipText, setValidator, showError, showError, showError, showInfo, showInfo, showWarning, showWarning, toString`

    - ### Methods inherited from class javax.swing.AbstractAction

      `addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ClientAction

          public ClientAction(C clientCtx,
                      NlsActionKey nls)

    - #### ClientAction

          public ClientAction(C clientCtx,
                      NlsActionKey nls,
                      ActionValidator validator)

    - #### ClientAction

          public ClientAction(C clientCtx,
                      NlsActionKey nls,
                      IconKey iconKey)

    - #### ClientAction

          public ClientAction(C clientCtx,
                      NlsActionKey nls,
                      IconKey iconKey,
                      ActionValidator validator)

  - ### Method Detail

    - #### isLoggedIn

          public final boolean isLoggedIn()

    - #### getClientContext

          public final C getClientContext()

    - #### getSessionId

          public final SessionId getSessionId()

    - #### isConnectionSensitive

          public final boolean isConnectionSensitive()

      See Also:
        `setConnectionSensitive(boolean)`

    - #### setConnectionSensitive

          public final void setConnectionSensitive(boolean isSensitive)

      Allows for switching off/on the connection sensitivity. By default it is switched on.
      See Also:
        `isConnectionSensitive()`

    - #### actionFailed

          protected void actionFailed(java.lang.Exception e)

      Description copied from class: `ZAction`
      Is called when the action has thrown an Exception. By default pops up an error dialog. May be overridden to handle the Exception in a different way.
      Overrides:
        `actionFailed` in class `ZAction<C extends ClientContext>`

    - #### checkEnableCondition

          protected boolean checkEnableCondition()

      Description copied from class: `ZAction`
      This condition is evaluated automatically after construction. The action enables/disables accordingly. Does not change the current enable state by default.
      Overrides:
        `checkEnableCondition` in class `ZAction<C extends ClientContext>`

    - #### isOnline

          public final boolean isOnline()

    - #### isOffline

          public boolean isOffline()

Copyright © 2014 EsprIT-Systems. All Rights Reserved.