com.itmill.toolkit.ui
Class Embedded

java.lang.Object
  extended by com.itmill.toolkit.ui.AbstractComponent
      extended by com.itmill.toolkit.ui.Embedded
All Implemented Interfaces:
MethodEventSource, Paintable, Sizeable, VariableOwner, Component, EventListener

public class Embedded
extends AbstractComponent

Component for embedding external objects.

Since:
3.0
Version:
5.3.0
Author:
IT Mill Ltd.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener
 
Field Summary
static int TYPE_BROWSER
          Browser ("iframe") type.
static int TYPE_IMAGE
          Image types.
static int TYPE_OBJECT
          General object type.
 
Fields inherited from interface com.itmill.toolkit.terminal.Sizeable
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
Embedded()
          Creates a new empty Embedded object.
Embedded(String caption)
          Creates a new empty Embedded object with caption.
Embedded(String caption, Resource source)
          Creates a new Embedded object whose contents is loaded from given resource.
 
Method Summary
 String getArchive()
          Gets the archive attribute.
 String getClassId()
          Gets the classId attribute.
 String getCodebase()
          Gets the codebase, the root-path used to access resources with relative paths.
 String getCodetype()
          Gets the MIME-Type of the code.
 String getMimeType()
          Gets the MIME-Type of the object.
 String getParameter(String name)
          Gets the value of an object parameter.
 Iterator getParameterNames()
          Gets the embedded object parameter names.
 Resource getSource()
          Gets the resource contained in the embedded object.
 String getStandby()
          Gets the standby text displayed when the object is loading.
 String getTag()
          Gets the component UIDL tag.
 int getType()
          Gets the type of the embedded object.
 void paintContent(PaintTarget target)
          Invoked when the component state should be painted.
 void removeParameter(String name)
          Removes an object parameter from the list.
 void setArchive(String archive)
          Sets the archive attribute.
 void setClassId(String classId)
          Sets the classId attribute.
 void setCodebase(String codebase)
          Sets the codebase, the root-path used to access resources with relative paths.
 void setCodetype(String codetype)
          Sets the codetype, the MIME-Type of the code.
 void setMimeType(String mimeType)
          Sets the mimeType, the MIME-Type of the object.
 void setParameter(String name, String value)
          Sets an object parameter.
 void setSource(Resource source)
          Sets the object source resource.
 void setStandby(String standby)
          Sets the standby, the text to display while loading the object.
 void setType(int type)
          Sets the object type.
 
Methods inherited from class com.itmill.toolkit.ui.AbstractComponent
addListener, addListener, addListener, addListener, addStyleName, attach, changeVariables, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setWidth, setWidth, setWidth, setWidthUnits, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_OBJECT

public static final int TYPE_OBJECT
General object type.

See Also:
Constant Field Values

TYPE_IMAGE

public static final int TYPE_IMAGE
Image types.

See Also:
Constant Field Values

TYPE_BROWSER

public static final int TYPE_BROWSER
Browser ("iframe") type.

See Also:
Constant Field Values
Constructor Detail

Embedded

public Embedded()
Creates a new empty Embedded object.


Embedded

public Embedded(String caption)
Creates a new empty Embedded object with caption.

Parameters:
caption -

Embedded

public Embedded(String caption,
                Resource source)
Creates a new Embedded object whose contents is loaded from given resource. The dimensions are assumed if possible. The type is guessed from resource.

Parameters:
caption -
source - the Source of the embedded object.
Method Detail

getTag

public String getTag()
Gets the component UIDL tag.

Specified by:
getTag in class AbstractComponent
Returns:
the Component UIDL tag as string.

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Invoked when the component state should be painted.

Overrides:
paintContent in class AbstractComponent
Parameters:
target - the target UIDL stream where the component should paint itself to
Throws:
PaintException - if the paint operation failed.

setParameter

public void setParameter(String name,
                         String value)
Sets an object parameter. Parameters are optional information, and they are passed to the instantiated object. Parameters are are stored as name value pairs. This overrides the previous value assigned to this parameter.

Parameters:
name - the name of the parameter.
value - the value of the parameter.

getParameter

public String getParameter(String name)
Gets the value of an object parameter. Parameters are optional information, and they are passed to the instantiated object. Parameters are are stored as name value pairs.

Returns:
the Value of parameter or null if not found.

removeParameter

public void removeParameter(String name)
Removes an object parameter from the list.

Parameters:
name - the name of the parameter to remove.

getParameterNames

public Iterator getParameterNames()
Gets the embedded object parameter names.

Returns:
the Iterator of parameters names.

getCodebase

public String getCodebase()
Gets the codebase, the root-path used to access resources with relative paths.

Returns:
the code base.

getCodetype

public String getCodetype()
Gets the MIME-Type of the code.

Returns:
the MIME-Type of the code.

getMimeType

public String getMimeType()
Gets the MIME-Type of the object.

Returns:
the MIME-Type of the object.

getStandby

public String getStandby()
Gets the standby text displayed when the object is loading.

Returns:
the standby text.

setCodebase

public void setCodebase(String codebase)
Sets the codebase, the root-path used to access resources with relative paths.

Parameters:
codebase - the codebase to set.

setCodetype

public void setCodetype(String codetype)
Sets the codetype, the MIME-Type of the code.

Parameters:
codetype - the codetype to set.

setMimeType

public void setMimeType(String mimeType)
Sets the mimeType, the MIME-Type of the object.

Parameters:
mimeType - the mimeType to set.

setStandby

public void setStandby(String standby)
Sets the standby, the text to display while loading the object.

Parameters:
standby - the standby to set.

getClassId

public String getClassId()
Gets the classId attribute.

Returns:
the class id.

setClassId

public void setClassId(String classId)
Sets the classId attribute.

Parameters:
classId - the classId to set.

getSource

public Resource getSource()
Gets the resource contained in the embedded object.

Returns:
the Resource

getType

public int getType()
Gets the type of the embedded object.

This can be one of the following:

Returns:
the type.

setSource

public void setSource(Resource source)
Sets the object source resource. The dimensions are assumed if possible. The type is guessed from resource.

Parameters:
source - the source to set.

setType

public void setType(int type)
Sets the object type.

This can be one of the following:

Parameters:
type - the type to set.

getArchive

public String getArchive()
Gets the archive attribute.

Returns:
the archive attribute.

setArchive

public void setArchive(String archive)
Sets the archive attribute.

Parameters:
archive - the archive string to set.


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.