EchoPoint
1.0

echopoint
Class EmbeddedObject

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.EchoPointComponent
              extended byechopoint.EmbeddedObject
All Implemented Interfaces:
MouseCursorable, ReflectionSetter, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport

public class EmbeddedObject
extends EchoPointComponent

The EmbeddedObject class provides a Component that when rendered will present an embedded object on the client.

This could something like an ActiveX control or a Shockwave Flash movie.

Parameters can be passed to the client embedded object by using the addParameter method.

The setEmbedTagUsed() controls wheteher the EMBED tag is used when the component is rendered. Clients that use the Netscape Plugin architecture may require this tag to be used.

NOTE : use the setIdentifier to set the client side ID of the object.

Author:
Brad Baker
See Also:
Serialized Form

Nested Class Summary
static class EmbeddedObject.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
protected  java.lang.String classId
           
protected  java.lang.String codeBase
           
protected  java.lang.String codeType
           
protected  java.lang.String contentType
           
protected  java.lang.String data
           
protected  boolean embedTagUsed
           
protected  int height
           
static java.lang.String PARAMETER_CHANGED_PROPERTY
           
protected  java.util.HashMap parameterMap
           
static int PERCENT_UNITS
           
static int PIXEL_UNITS
           
protected  java.lang.String pluginsPage
           
static java.lang.String PROPERTY_CHANGED_PROPERTY
          The property change names
protected  java.lang.String src
           
protected  java.lang.String standBy
           
static java.lang.String STYLE_CLASS_ID
          A style constant for the Class Id property.
static java.lang.String STYLE_CODE_BASE
          A style constant for the CodeBase property.
static java.lang.String STYLE_CODE_TYPE
          A style constant for the CodeType property.
static java.lang.String STYLE_CONTENT_TYPE
          A style constant for the ContentType property.
static java.lang.String STYLE_EMBEDDED_TAG_USED
          A style constant for the EmbeddedTagUsed property.
static java.lang.String STYLE_HEIGHT
          A style constant for the Height property.
static java.lang.String STYLE_HEIGHT_UNITS
          A style constant for the Height Units property.
static java.lang.String STYLE_PLUGINS_PAGE
          A style constant for the PluginsPage property.
static java.lang.String STYLE_SRC
          A style constant for the Src property.
static java.lang.String STYLE_STANDBY
          A style constant for the StandBy property.
static java.lang.String STYLE_WIDTH
          A style constant for the Width property.
static java.lang.String STYLE_WIDTH_UNITS
          A style constant for the Width Units property.
protected  int width
           
 
Fields inherited from class echopoint.EchoPointComponent
STYLE_TOOL_TIP_TEXT, TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, 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, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Constructor Summary
EmbeddedObject()
          Constructs a EmbeddedObject with nothing in it
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
          Adds a parameters (name=value pair) that will be supplied to the client embedded object at run time.
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
 java.lang.String getClassId()
          This attribute may be used to specify the location of an object's implementation via a URI.
 java.lang.String getCodeBase()
          This attribute specifies the base path used to resolve relative URIs specified by the classId, and data attributes.
 java.lang.String getCodeType()
          This attribute specifies the content type of data expected when downloading the object specified by classId.
 java.lang.String getContentType()
          This attribute specifies the content type for the data specified by ther data attribute .
 java.lang.String getData()
          This attribute may be used to specify the location of the object's data, for instance image data for objects defining images, or more generally, a serialized form of an object which can be used to recreate it.
 int getHeight()
          Returns the height of the embedded object
 int getHeightUnits()
          Returns the heightUnits.
 java.lang.String getParameter(java.lang.String name)
          Returns the a single parameter value, keyed by name.
 java.lang.String[] getParameterNames()
          Returns the names of the parameters added to the component
 java.util.HashMap getParameters()
          Returns the HashMap of parameters, keyed by name.
 java.lang.String getPluginsPage()
          Returns the plugins page.
 java.lang.String getSrc()
          This is used to specify the src attribute.
 java.lang.String getStandBy()
          This attribute specifies a message that a client may render while loading the object's implementation and data.
 int getWidth()
          Returns the width of the embedded object.
 int getWidthUnits()
          Returns the widthUnits.
 boolean isEmbedTagUsed()
          This returns true if the EMBED tag will be used on the client when the component is rendered.
 void removeParameter(java.lang.String name)
          Removes a parameters (name=value pair) from the component
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setClassId(java.lang.String newClassId)
          This attribute may be used to specify the location of an object's implementation via a URI.
 void setCodeBase(java.lang.String newCodeBase)
          This attribute specifies the base path used to resolve relative URIs specified by the classId, and data attributes.
 void setCodeType(java.lang.String newCodeType)
          This attribute specifies the content type of data expected when downloading the object specified by classId.
 void setContentType(java.lang.String newContentType)
          This attribute specifies the content type for the data specified by ther data attribute .
 void setData(java.lang.String newData)
          This attribute may be used to specify the location of the object's data, for instance image data for objects defining images, or more generally, a serialized form of an object which can be used to recreate it.
 void setEmbedTagUsed(boolean newEmbedTagUsed)
          Controls whether the EMBED tag will be used on the client when the component is rendered.
 void setHeight(int newHeight)
          Sets the height of the embedded object.
 void setHeightUnits(int heightUnits)
          Sets the heightUnits.
 void setPluginsPage(java.lang.String newPluginsPage)
          Sets the plugins page.
 void setSrc(java.lang.String newSrc)
          This is used to specify the src attribute.
 void setStandBy(java.lang.String newStandBy)
          This attribute specifies a message that a client may render while loading the object's implementation and data.
 void setWidth(int newWidth)
          Sets the width of the embedded component.
 void setWidthUnits(int widthUnits)
          Sets the widthUnits.
 
Methods inherited from class echopoint.EchoPointComponent
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText, validate
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PIXEL_UNITS

public static int PIXEL_UNITS

PERCENT_UNITS

public static int PERCENT_UNITS

STYLE_HEIGHT

public static final java.lang.String STYLE_HEIGHT
A style constant for the Height property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_HEIGHT_UNITS

public static final java.lang.String STYLE_HEIGHT_UNITS
A style constant for the Height Units property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_WIDTH

public static final java.lang.String STYLE_WIDTH
A style constant for the Width property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_WIDTH_UNITS

public static final java.lang.String STYLE_WIDTH_UNITS
A style constant for the Width Units property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_CLASS_ID

public static final java.lang.String STYLE_CLASS_ID
A style constant for the Class Id property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_CODE_BASE

public static final java.lang.String STYLE_CODE_BASE
A style constant for the CodeBase property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_CODE_TYPE

public static final java.lang.String STYLE_CODE_TYPE
A style constant for the CodeType property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_CONTENT_TYPE

public static final java.lang.String STYLE_CONTENT_TYPE
A style constant for the ContentType property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_EMBEDDED_TAG_USED

public static final java.lang.String STYLE_EMBEDDED_TAG_USED
A style constant for the EmbeddedTagUsed property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_PLUGINS_PAGE

public static final java.lang.String STYLE_PLUGINS_PAGE
A style constant for the PluginsPage property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_SRC

public static final java.lang.String STYLE_SRC
A style constant for the Src property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_STANDBY

public static final java.lang.String STYLE_STANDBY
A style constant for the StandBy property. Values of this key must be of type String

See Also:
Constant Field Values

PROPERTY_CHANGED_PROPERTY

public static final java.lang.String PROPERTY_CHANGED_PROPERTY
The property change names

See Also:
Constant Field Values

PARAMETER_CHANGED_PROPERTY

public static final java.lang.String PARAMETER_CHANGED_PROPERTY
See Also:
Constant Field Values

src

protected java.lang.String src

classId

protected java.lang.String classId

codeBase

protected java.lang.String codeBase

codeType

protected java.lang.String codeType

contentType

protected java.lang.String contentType

data

protected java.lang.String data

standBy

protected java.lang.String standBy

pluginsPage

protected java.lang.String pluginsPage

width

protected int width

height

protected int height

embedTagUsed

protected boolean embedTagUsed

parameterMap

protected java.util.HashMap parameterMap
Constructor Detail

EmbeddedObject

public EmbeddedObject()
Constructs a EmbeddedObject with nothing in it

Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)
Adds a parameters (name=value pair) that will be supplied to the client embedded object at run time.


applyStyle

public void applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Specified by:
applyStyle in interface MouseCursorable
Overrides:
applyStyle in class EchoPointComponent
See Also:
Component.applyStyle(nextapp.echo.Style)

getClassId

public java.lang.String getClassId()
This attribute may be used to specify the location of an object's implementation via a URI.

Returns:
java.lang.String

getCodeBase

public java.lang.String getCodeBase()
This attribute specifies the base path used to resolve relative URIs specified by the classId, and data attributes.

When absent, its default value is the base URI of the current document.

Returns:
java.lang.String

getCodeType

public java.lang.String getCodeType()
This attribute specifies the content type of data expected when downloading the object specified by classId.

This attribute is optional but recommended when classId is specified since it allows the client to avoid loading information for unsupported content types.

When absent, it defaults to the value of the contentType attribute.

Returns:
java.lang.String

getContentType

public java.lang.String getContentType()
This attribute specifies the content type for the data specified by ther data attribute .

This attribute is optional but recommended when data is specified since it allows the client to avoid loading information for unsupported content types.

Returns:
java.lang.String

getData

public java.lang.String getData()
This attribute may be used to specify the location of the object's data, for instance image data for objects defining images, or more generally, a serialized form of an object which can be used to recreate it.

If given as a relative URI, it should be interpreted relative to the codeBase attribute.

Returns:
java.lang.String

getHeight

public int getHeight()
Returns the height of the embedded object

Returns:
int

getHeightUnits

public int getHeightUnits()
Returns the heightUnits.

Returns:
int

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the a single parameter value, keyed by name.


getParameterNames

public java.lang.String[] getParameterNames()
Returns the names of the parameters added to the component


getParameters

public java.util.HashMap getParameters()
Returns the HashMap of parameters, keyed by name.


getPluginsPage

public java.lang.String getPluginsPage()
Returns the plugins page. Used for client that use the Netscape plugin architecture.

Returns:
java.lang.String

getSrc

public java.lang.String getSrc()
This is used to specify the src attribute. Used by clients that use the Netscape plugin architecture.

Returns:
java.lang.String

getStandBy

public java.lang.String getStandBy()
This attribute specifies a message that a client may render while loading the object's implementation and data.

Returns:
java.lang.String

getWidth

public int getWidth()
Returns the width of the embedded object.

Returns:
int

getWidthUnits

public int getWidthUnits()
Returns the widthUnits.

Returns:
int

isEmbedTagUsed

public boolean isEmbedTagUsed()
This returns true if the EMBED tag will be used on the client when the component is rendered. Older clients require this tag.

Returns:
boolean

removeParameter

public void removeParameter(java.lang.String name)
Removes a parameters (name=value pair) from the component


setClassId

public void setClassId(java.lang.String newClassId)
This attribute may be used to specify the location of an object's implementation via a URI.

Parameters:
newClassId - java.lang.String

setCodeBase

public void setCodeBase(java.lang.String newCodeBase)
This attribute specifies the base path used to resolve relative URIs specified by the classId, and data attributes.

When absent, its default value is the base URI of the current document.

Parameters:
newCodeBase - java.lang.String

setCodeType

public void setCodeType(java.lang.String newCodeType)
This attribute specifies the content type of data expected when downloading the object specified by classId.

This attribute is optional but recommended when classId is specified since it allows the client to avoid loading information for unsupported content types.

When absent, it defaults to the value of the contentType attribute.

Parameters:
newCodeType - java.lang.String

setContentType

public void setContentType(java.lang.String newContentType)
This attribute specifies the content type for the data specified by ther data attribute .

This attribute is optional but recommended when data is specified since it allows the client to avoid loading information for unsupported content types.

Parameters:
newContentType - java.lang.String

setData

public void setData(java.lang.String newData)
This attribute may be used to specify the location of the object's data, for instance image data for objects defining images, or more generally, a serialized form of an object which can be used to recreate it.

If given as a relative URI, it should be interpreted relative to the codeBase attribute.

Parameters:
newData - java.lang.String

setEmbedTagUsed

public void setEmbedTagUsed(boolean newEmbedTagUsed)
Controls whether the EMBED tag will be used on the client when the component is rendered. Older clients require this tag.

Parameters:
newEmbedTagUsed - boolean

setHeight

public void setHeight(int newHeight)
Sets the height of the embedded object.

Parameters:
newHeight - String

setHeightUnits

public void setHeightUnits(int heightUnits)
Sets the heightUnits.

Parameters:
heightUnits - The heightUnits to set

setPluginsPage

public void setPluginsPage(java.lang.String newPluginsPage)
Sets the plugins page. Used by clients that use the Netscape plugin architecture.

Parameters:
newPluginsPage - java.lang.String

setSrc

public void setSrc(java.lang.String newSrc)
This is used to specify the src attribute. Used by clients that use the Netscape plugin architecture.

Parameters:
newSrc - java.lang.String

setStandBy

public void setStandBy(java.lang.String newStandBy)
This attribute specifies a message that a client may render while loading the object's implementation and data.

Parameters:
newStandBy - java.lang.String

setWidth

public void setWidth(int newWidth)
Sets the width of the embedded component.

Parameters:
newWidth - int

setWidthUnits

public void setWidthUnits(int widthUnits)
Sets the widthUnits.

Parameters:
widthUnits - The widthUnits to set

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0