EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.internal
Class AbstractImage

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.internal.AbstractContainer
          extended by echopoint.internal.AbstractImage
All Implemented Interfaces:
Serializable, RenderIdSupport
Direct Known Subclasses:
ImageIcon, ImageMap

public abstract class AbstractImage
extends AbstractContainer

An abstract base class for components that render images.

Version:
$Id: AbstractImage.java 262 2009-12-18 21:29:16Z sptrakesh $
Author:
Rakesh 2009-12-18
See Also:
Serialized Form

Field Summary
static String PROPERTY_ACTION_COMMAND
          The property for storing the action command associated with an action event for the image.
static String PROPERTY_CURSOR
          The cursor to display when hovering over the image.
static String PROPERTY_IMAGE
          The image reference for the component.
static String PROPERTY_TEXT
          The alternate text to display is the image cannot be rendered.
static String PROPERTY_TOOL_TIP_TEXT
          The tool tip text to display is the image cannot be rendered.
 
Fields inherited from class echopoint.internal.AbstractContainer
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_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
 
Constructor Summary
AbstractImage()
           
 
Method Summary
 void addActionListener(ActionListener listener)
          Add the specified action listener to this component.
protected  void fireActionPerformed()
          Notifies all listeners that have registered for this event type.
 String getActionCommand()
          Return the value of PROPERTY_ACTION_COMMAND property.
 Cursor getCursor()
          Return the value of PROPERTY_CURSOR property.
 ImageReference getImage()
          Return the value of PROPERTY_IMAGE property.
 String getText()
          Return the value of PROPERTY_TEXT property.
 String getToolTipText()
          Return the value of PROPERTY_TOOL_TIP_TEXT property.
 boolean hasActionListeners()
          Determines if the button has any ActionListeners registered.
 void processInput(String inputName, Object inputValue)
          
 void removeActionListener(ActionListener listener)
          Remove the specified action listener from the component.
 void setActionCommand(String command)
          Set the value of PROPERTY_ACTION_COMMAND property.
 void setBackgroundImage(ImageReference backgroundImage)
          Over-ridden to be a noop since images do not support a background image.
 void setCursor(Cursor cursor)
          Set the value of PROPERTY_CURSOR property.
 void setImage(ImageReference image)
          Set the value of PROPERTY_IMAGE property.
 void setImage(String url)
          Set the value of the PROPERTY_IMAGE property.
 void setText(String text)
          Set the value of PROPERTY_TEXT property.
 void setToolTipText(String text)
          Set the value of PROPERTY_TOOL_TIP_TEXT property.
 
Methods inherited from class echopoint.internal.AbstractContainer
fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, setAlignment, setBorder, setHeight, setInsets, setWidth
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_ACTION_COMMAND

public static final String PROPERTY_ACTION_COMMAND
The property for storing the action command associated with an action event for the image.

See Also:
Constant Field Values

PROPERTY_IMAGE

public static final String PROPERTY_IMAGE
The image reference for the component. This property may be styled.

See Also:
Constant Field Values

PROPERTY_CURSOR

public static final String PROPERTY_CURSOR
The cursor to display when hovering over the image.

See Also:
Constant Field Values

PROPERTY_TEXT

public static final String PROPERTY_TEXT
The alternate text to display is the image cannot be rendered.

See Also:
Constant Field Values

PROPERTY_TOOL_TIP_TEXT

public static final String PROPERTY_TOOL_TIP_TEXT
The tool tip text to display is the image cannot be rendered.

See Also:
Constant Field Values
Constructor Detail

AbstractImage

public AbstractImage()
Method Detail

getActionCommand

public String getActionCommand()
Return the value of PROPERTY_ACTION_COMMAND property.

Returns:
The action command value.

setActionCommand

public void setActionCommand(String command)
Set the value of PROPERTY_ACTION_COMMAND property.

Parameters:
command - The action command value to set.

getImage

public ImageReference getImage()
Return the value of PROPERTY_IMAGE property.

Returns:
The image reference for the image.

setImage

public void setImage(ImageReference image)
Set the value of PROPERTY_IMAGE property.

Parameters:
image - The image reference to set.

setImage

public void setImage(String url)
Set the value of the PROPERTY_IMAGE property.

Parameters:
url - The URL for the image to use as the map region.

getCursor

public Cursor getCursor()
Return the value of PROPERTY_CURSOR property.

Returns:
The cursor style for the image.

setCursor

public void setCursor(Cursor cursor)
Set the value of PROPERTY_CURSOR property.

Parameters:
cursor - The cursor style to set.

getText

public String getText()
Return the value of PROPERTY_TEXT property.

Returns:
The alternate text for the image.

setText

public void setText(String text)
Set the value of PROPERTY_TEXT property.

Parameters:
text - The alternate text to set.

getToolTipText

public String getToolTipText()
Return the value of PROPERTY_TOOL_TIP_TEXT property.

Returns:
The tool tip text for the image.

setToolTipText

public void setToolTipText(String text)
Set the value of PROPERTY_TOOL_TIP_TEXT property.

Parameters:
text - The tool tip text to set.

processInput

public void processInput(String inputName,
                         Object inputValue)

Overrides:
processInput in class Component
See Also:
fireActionPerformed()

addActionListener

public void addActionListener(ActionListener listener)
Add the specified action listener to this component.

Overrides:
addActionListener in class AbstractContainer
Parameters:
listener - The action listener to add.
See Also:
Component.firePropertyChange(String, Object, Object)

fireActionPerformed

protected void fireActionPerformed()
Notifies all listeners that have registered for this event type.


removeActionListener

public void removeActionListener(ActionListener listener)
Remove the specified action listener from the component.

Overrides:
removeActionListener in class AbstractContainer
Parameters:
listener - The listener that is to be removed.
See Also:
Component.firePropertyChange(String, Object, Object)

hasActionListeners

public boolean hasActionListeners()
Determines if the button has any ActionListeners registered.

Overrides:
hasActionListeners in class AbstractContainer
Returns:
true if any action listeners are registered

setBackgroundImage

public void setBackgroundImage(ImageReference backgroundImage)
Over-ridden to be a noop since images do not support a background image.

Overrides:
setBackgroundImage in class AbstractContainer
Parameters:
backgroundImage - The backgroundImage to apply.

EchoPoint API - 3.0.0b5
App Webcontainer