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

## echopointng
Class ImageIcon

    java.lang.Object
      nextapp.echo2.app.Component
          echopointng.ComponentEx
              echopointng.AbleComponent
                  echopointng.ImageIcon

All Implemented Interfaces:
  AccessKeyable, Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Sizeable, ToolTipable, Widthable, java.io.Serializable, RenderIdSupport

    public class ImageIcon

extends AbleComponent

The `ImageIcon` class provides an component that displays an `ImageReference`. A height and width value can be specified to overide what may be defined in the `ImageReference` itself. This allows images to be "scaled" to different dimensions.

The advantage of `ImageIcon` over using a `nextapp.echo.LabelEx` is that you can scale `ImageReference` objects that you may not know the dimensions of, and it can be clicked on like a ButtonEx.

See Also:
  Serialized Form

Field Summary
`static Extent` | `DEFAULT_HEIGHT` default height is 32
`static Style` | `DEFAULT_STYLE`
`static Extent` | `DEFAULT_WIDTH` default width is 32
`static java.lang.String` | `PROPERTY_ACTION_COMMAND`
`static java.lang.String` | `PROPERTY_ICON`

Fields inherited from class echopointng.ComponentEx
`PROPERTY_HIDDEN`

Fields inherited from class nextapp.echo2.app.Component
`CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY`

Fields inherited from interface echopointng.able.AccessKeyable
`PROPERTY_ACCESS_KEY`

Fields inherited from interface echopointng.able.Borderable
`PROPERTY_BORDER`

Fields inherited from interface echopointng.able.MouseCursorable
`CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI`

Fields inherited from interface echopointng.able.Insetable
`DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS`

Fields inherited from interface echopointng.able.Widthable
`PROPERTY_WIDTH`

Fields inherited from interface echopointng.able.Heightable
`PROPERTY_HEIGHT`

Fields inherited from interface echopointng.able.ToolTipable
`PROPERTY_TOOL_TIP_TEXT`

Constructor Summary
`ImageIcon()` Constructs a `ImageIcon` with a null ImageReference.
`ImageIcon(ImageReference imageRef)` Constructs a `ImageIcon` and sets the width and height to be that of the ImageReference.
`ImageIcon(ImageReference imageRef, Extent width, Extent height)` Constructs a `ImageIcon` with the specified width and height
`ImageIcon(ImageReference imageRef, int width, int height)` Constructs a `ImageIcon` with the specified width and height

Method Summary
`void` | `addActionListener(ActionListener l)` Adds an `ActionListener`.
`void` | `fireActionPerformed()` Notifies all listeners that have registered for this event type.
`java.lang.String` | `getActionCommand()` Returns the action command for this ImageIcon.
`Extent` | `getHeight()` Retutns the height extent of the `Heightable`.
`ImageReference` | `getIcon()` Returns the ImageReference within.
`Extent` | `getWidth()` Returns the width extent of the `Widthable`.
`void` | `processInput(java.lang.String inputName, java.lang.Object inputValue)` Processes client input specific to the `Component` received from the `UpdateManager`.
`void` | `removeActionListener(ActionListener l)` Removes an `ActionListener`.
`void` | `setActionCommand(java.lang.String newValue)` Sets the ImageIcon's action command.
`void` | `setHeight(Extent newValue)` Sets the height extent of the `Heightable`.
`void` | `setIcon(ImageReference newValue)` Sets the ImageReference used by the ImageIcon.
`void` | `setWidth(Extent newValue)` Sets the width extent of the `Widthable`.

Methods inherited from class echopointng.AbleComponent
`getAccessKey, getBorder, getInsets, getMouseCursor, getMouseCursorURI, getOutsets, getToolTipText, setAccessKey, setBorder, setInsets, setMouseCursor, setMouseCursorURI, setOutsets, setToolTipText`

Methods inherited from class echopointng.ComponentEx
`getAttribute, getAttributeNames, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, setAttribute, setHidden, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty`

Methods inherited from class nextapp.echo2.app.Component
`add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf`

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

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Field Detail

### DEFAULT_HEIGHT

    public static final Extent DEFAULT_HEIGHT

  default height is 32

### DEFAULT_WIDTH

    public static final Extent DEFAULT_WIDTH

  default width is 32

### PROPERTY_ACTION_COMMAND

    public static final java.lang.String PROPERTY_ACTION_COMMAND

See Also:
  Constant Field Values

### PROPERTY_ICON

    public static final java.lang.String PROPERTY_ICON

See Also:
  Constant Field Values

### DEFAULT_STYLE

    public static final Style DEFAULT_STYLE

Constructor Detail

### ImageIcon

    public ImageIcon()

  Constructs a `ImageIcon` with a null ImageReference. The width and height are set to DEFAULT_WIDTH and/or DEFAULT_HEIGHT.

### ImageIcon

    public ImageIcon(ImageReference imageRef)

  Constructs a `ImageIcon` and sets the width and height to be that of the ImageReference.

  Parameters:
    `imageRef` -

### ImageIcon

    public ImageIcon(ImageReference imageRef,
                     Extent width,
                     Extent height)

  Constructs a `ImageIcon` with the specified width and height

  Parameters:
    `imageRef` - - the ImageReference to display
    `width` - - the width to scale it to
    `height` - - the height to scale it to

### ImageIcon

    public ImageIcon(ImageReference imageRef,
                     int width,
                     int height)

  Constructs a `ImageIcon` with the specified width and height

  Parameters:
    `imageRef` - - the ImageReference to display
    `width` - - the width in pixels to scale it to
    `height` - - the height in pixels to scale it to

Method Detail

### processInput

    public void processInput(java.lang.String inputName,
                             java.lang.Object inputValue)

  Description copied from class: `Component`
  Processes client input specific to the `Component` received from the `UpdateManager`. Derivative implementations should take care to invoke `super.processInput()`.

  Overrides:
    `processInput` in class `Component`
  Parameters:
    `inputName` - the name of the input
    `inputValue` - the value of the input
  See Also:
    `Component.processInput(java.lang.String, java.lang.Object)`

### addActionListener

    public void addActionListener(ActionListener l)

  Adds an `ActionListener`.

  Parameters:
    `l` - The `ActionListener` to be added.

### fireActionPerformed

    public void fireActionPerformed()

  Notifies all listeners that have registered for this event type.

### getActionCommand

    public java.lang.String getActionCommand()

  Returns the action command for this ImageIcon.

  Returns:
    The action command for this button.

### getIcon

    public ImageReference getIcon()

  Returns the ImageReference within.

  Returns:
    ImageReference - the ImageReference within.

### removeActionListener

    public void removeActionListener(ActionListener l)

  Removes an `ActionListener`.

  Parameters:
    `l` - The `ActionListener` to be removed.

### setActionCommand

    public void setActionCommand(java.lang.String newValue)

  Sets the ImageIcon's action command.

  Parameters:
    `newValue` - The new action command for this ImageIcon.

### setIcon

    public void setIcon(ImageReference newValue)

  Sets the ImageReference used by the ImageIcon.

  Parameters:
    `newValue` -

### getHeight

    public Extent getHeight()

  Description copied from interface: `Heightable`
  Retutns the height extent of the `Heightable`.

  Specified by:
    `getHeight` in interface `Heightable`
  Overrides:
    `getHeight` in class `AbleComponent`
  Returns:
    the height extent of the `Heightable`.
  See Also:
    `Heightable.getHeight()`

### getWidth

    public Extent getWidth()

  Description copied from interface: `Widthable`
  Returns the width extent of the `Widthable`.

  Specified by:
    `getWidth` in interface `Widthable`
  Overrides:
    `getWidth` in class `AbleComponent`
  Returns:
    the width extent of the `Widthable`.
  See Also:
    `Widthable.getWidth()`

### setHeight

    public void setHeight(Extent newValue)

  Description copied from interface: `Heightable`
  Sets the height extent of the `Heightable`.

  Specified by:
    `setHeight` in interface `Heightable`
  Overrides:
    `setHeight` in class `AbleComponent`
  Parameters:
    `newValue` - - the new height extent of the `Heightable`
  See Also:
    `Heightable.setHeight(nextapp.echo2.app.Extent)`

### setWidth

    public void setWidth(Extent newValue)

  Description copied from interface: `Widthable`
  Sets the width extent of the `Widthable`.

  Specified by:
    `setWidth` in interface `Widthable`
  Overrides:
    `setWidth` in class `AbleComponent`
  Parameters:
    `newValue` - - the new width extent of the `Widthable`
  See Also:
    `Widthable.setWidth(nextapp.echo2.app.Extent)`

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