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

## org.jdesktop.swingx.action
Class ServerAction

    java.lang.Object
      javax.swing.AbstractAction
          org.jdesktop.swingx.action.ServerAction

All Implemented Interfaces:
  java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class ServerAction

extends javax.swing.AbstractAction

An action which will invoke an http POST operation.

Author:
  Mark Davidson
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
`ServerAction()`
`ServerAction(java.lang.String name)`
`ServerAction(java.lang.String name, javax.swing.Icon icon)`
`ServerAction(java.lang.String name, java.lang.String command)`
`ServerAction(java.lang.String name, java.lang.String command, javax.swing.Icon icon)`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent evt)` Invokes the server operation when the action has been invoked.
`void` | `addHeader(java.lang.String name, java.lang.String value)` Adds a name value pair which represents a url connection request property.
`void` | `addParam(java.lang.String name, java.lang.String value)` Adds a name value pair which represents a url parameter in an http POST request.
`java.util.Set<java.lang.String>` | `getHeaderNames()` Return a set of parameter names or null if there are no params
`java.lang.String` | `getHeaderValue(java.lang.String name)` Return a header value corresponding to name or null if it doesn't exist.
`java.util.Set<java.lang.String>` | `getParamNames()` Return a set of parameter names or null if there are no params
`java.lang.String` | `getParamValue(java.lang.String name)` Return a parameter value corresponding to name or null if it doesn't exist.
`java.lang.String` | `getURL()`
`void` | `setURL(java.lang.String url)` Set the url for the action.

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, toString, wait, wait, wait`

Constructor Detail

### ServerAction

    public ServerAction()

### ServerAction

    public ServerAction(java.lang.String name)

### ServerAction

    public ServerAction(java.lang.String name,
                        java.lang.String command)

Parameters:
  `name` - display name of the action
  `command` - the value of the action command key

### ServerAction

    public ServerAction(java.lang.String name,
                        javax.swing.Icon icon)

### ServerAction

    public ServerAction(java.lang.String name,
                        java.lang.String command,
                        javax.swing.Icon icon)

Parameters:
  `name` - display name of the action
  `command` - the value of the action command key
  `icon` - icon to display

Method Detail

### setURL

    public void setURL(java.lang.String url)

  Set the url for the action.

  Parameters:
    `url` - a string representation of the url

### getURL

    public java.lang.String getURL()

### addParam

    public void addParam(java.lang.String name,
                         java.lang.String value)

  Adds a name value pair which represents a url parameter in an http POST request.

### getParamValue

    public java.lang.String getParamValue(java.lang.String name)

  Return a parameter value corresponding to name or null if it doesn't exist.

### getParamNames

    public java.util.Set<java.lang.String> getParamNames()

  Return a set of parameter names or null if there are no params

### addHeader

    public void addHeader(java.lang.String name,
                          java.lang.String value)

  Adds a name value pair which represents a url connection request property. For example, name could be "Content-Type" and the value could be "application/x-www-form-urlencoded"

### getHeaderValue

    public java.lang.String getHeaderValue(java.lang.String name)

  Return a header value corresponding to name or null if it doesn't exist.

### getHeaderNames

    public java.util.Set<java.lang.String> getHeaderNames()

  Return a set of parameter names or null if there are no params

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent evt)

  Invokes the server operation when the action has been invoked.

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

Copyright © 2010. All Rights Reserved.