DhImage Class

DhImage Class

This Package | All Packages

DhStyleBase
  |
  +--DhElement
    |
    +--DhImage
public class DhImage
extends DhElement
implements DhIFilterableObject

Displays a bitmap file in the document. To create a dhImage object on your page, construct an object using the URL of the image (which can be relative to the HTML document).

Constructors
Name Description
DhImage(String url) Creates a DhImage obect.

Methods
Name Description
addFilter(DhFilter filter) Adds a filter to this element and applies it immediately.
addFilter(DhFilter filter, boolean bApply) Adds a filter to this element.
addFilter(DhFilter filter, boolean bApply, boolean bFlush) Adds a filter to this element.
addOnReadyStateChange ( DhEventHandler h ) Topic under construction.
addTransition(DhFilter trans) Adds a transition effect to this element.
applyFilters() Applies filters that were previously deferred.
findFilter(Class filterClass) Retrieves the current filter with the specified filter class.
getImageMap() Retrieves the DhImageMap object associated with this image.
getImageMapName() Retrieves the name of the image map associated with this image.
getLoadComplete() Determines if the image has been fully loaded.
getReadyState() Returns the current state of the image object.
getURL() Retrieves the current URL that refers to the location of the bitmap file.
removeAllFilters() Removes all filters from this element.
removeAllFilters(boolean bApply) Removes all filters from this element.
removeFilter(DhFilter filter) Removes the specified filter from this element.
removeFilter(DhFilter filter, boolean bApply) Removes the given filter from this element.
removeOnReadyStateChange ( DhEventHandler h ) Topic under construction.
replaceFilter(DhFilter filter1, DhFilter filter2) Replaces a filter with another filter.
replaceFilter(DhFilter filter1, DhFilter filter2, boolean bApply) Replaces a filter with a specified filter.
setImageMap( DhImageMap im ) Sets the DhImageMap to associate with this image.
setImageMapName( String strName ) Sets the name of the image map to associate with this image.
setURL(String url) Sets the URL of the bitmap file.

Constructors

DhImage.DhImage

Syntax
public DhImage( String url );
Parameters
url
The URL that refers to the bitmap file to display. The URL can be relative to the HTML document.
Description

Creates a DhImage obect.

Methods

DhImage.addFilter

Syntax 1
public void addFilter( DhFilter filter );
Parameters
filter
The DhFilter object to apply.
Description

Adds a filter to this element and applies it immediately. Filters added this way are combined with other filters that were previously added and not explicity flushed or removed.

Exceptions

wfc.html.DhCantAddElementException thrown if this type of filter already exists on this element.

See Also
replaceFilter



Syntax 2
public void addFilter( DhFilter filter, boolean bApply );
Parameters
filter
The DhFilter object to apply.
bApply
Set to true to apply the filter immediately; set to false to delay applying the filter.
Description

Adds a filter to this element. You can apply the filter immediately or delay application. Delaying application is useful if you are applying more than one filter to this element. Filters added this way are combined with other filters that were previously added and not explicity flushed or removed.

Exceptions

wfc.html.DhCantAddElementException thrown if this type of filter already exists on this element.

See Also
applyFilters, replaceFilter



Syntax 3
public void addFilter( DhFilter filter, boolean bApply, boolean bFlush );
Parameters
filter
The DhFilter object to apply.
bApply
Set to true to apply the filter immediately; set to false to delay applying the filter.
bFlush
Set to true to flush the previously applied filters; set to combine filter with those already present.
Description

Adds a filter to this element. You can apply the filter immediately or delay application. Delaying application is useful if you are applying more than one filter to this element. You can also specify whether to flush filters that were previously applied to this element or to combine this filter with those already present.

Exceptions

wfc.html.DhCantAddElementException thrown if this type of filter already exists on this element.

See Also
applyFilters, replaceFilter

DhImage.addOnReadyStateChange

Syntax
final public void addOnReadyStateChange ( DhEventHandler h );
Description

Topic under construction.

DhImage.addTransition

Syntax
public void addTransition( DhFilter trans );
Parameters
trans
The transition effect you will run.
Description

Adds a transition effect to this element. You must call this method before you can run the effect. Note that this functionality is provided for extension only (see the sample classes). This package does provide transition effects.

Exceptions

wfc.html.DhCantAddElementException thrown if this type of transition effect already exists on this element.

See Also
replaceFilter

DhImage.applyFilters

Syntax
public void applyFilters();
Description

Applies filters that were previously deferred. Use this method if you called addFilter(DhFilter,boolean) with false for the second parameter. This function applies every filter that was added to this element.

See Also
addFilter(DhFilter,boolean), addFilter

DhImage.findFilter

Syntax
public DhFilter findFilter( Class filterClass );
Parameters
filterClass
The class of the filter you are looking for.
Return Value

Returns the DhFilter object (if found) that is of type filterClass.

Description

Retrieves the current filter with the specified filter class.

DhImage.getImageMap

Syntax
public DhImageMap getImageMap();
Return Value

Returns a DhImageMap object, or returns null if none is set.

Description

Retrieves the DhImageMap object associated with this image.

DhImage.getImageMapName

Syntax
public String getImageMapName();
Return Value

Returns the name of the image map, or returns a null string if none is set.

Description

Retrieves the name of the image map associated with this image.

DhImage.getLoadComplete

Syntax
public boolean getLoadComplete();
Return Value

Returns true if loading of the image is complete; otherwise, returns false. .

Description

Determines if the image has been fully loaded.

See Also
addReadyStateChange, getReadyState

DhImage.getReadyState

Syntax
public String getReadyState();
Return Value

Returns the current state.

Description

Returns the current state of the image object.

Possible values include:

DhImage.getURL

Syntax
public String getURL();
Return Value

Returns the URL that refers to the bitmap file to display.

Description

Retrieves the current URL that refers to the location of the bitmap file.

DhImage.removeAllFilters

Syntax 1
public void removeAllFilters();
Description

Removes all filters from this element. This method automatically clears all filters on this element.



Syntax 2
public void removeAllFilters( boolean bApply );
Description

Removes all filters from this element. You can clear all filters on this element or delay removal.

DhImage.removeFilter

Syntax 1
public void removeFilter( DhFilter filter );
Parameters
filter
The filter to remove.
Description

Removes the specified filter from this element. This method automatically reapplies filters that may be left after this method is called.

See Also
findFilter.



Syntax 2
public void removeFilter( DhFilter filter, boolean bApply );
Parameters
filter
The filter to remove.
bApply
Set to true to reapply other filters left on this element; set to false to delay applying the filters.
Description

Removes the given filter from this element. You can reapply filters that may be left after this method is called, or you can delay application if you are removing more than one filter.

See Also
findFilter.

DhImage.removeOnReadyStateChange

Syntax
final public void removeOnReadyStateChange ( DhEventHandler h );
Description

Topic under construction.

DhImage.replaceFilter

Syntax 1
public void replaceFilter( DhFilter filter1, DhFilter filter2 );
Parameters
filter1
The filter to be replaced.
filter2
The filter that is to replace filter1.
Description

Replaces a filter with another filter. This method provides an easy way to swap filters. This method applies all changes due to this swap immediately.



Syntax 2
public void replaceFilter( DhFilter filter1, DhFilter filter2, boolean bApply );
Parameters
filter1
The filter to be replaced.
filter2
The filter that is to replace filter1
bApply
Set to true to apply the filter immediately; set to false to delay applying the filter. If you set this parameter to false, you can call applyFilters when you want to apply the filters.
Description

Replaces a filter with a specified filter. This method provides an easy way to swap filters. You can specify whether to apply all the changes due to this swap immediately or to delay application until later.

See Also
applyFilters

DhImage.setImageMap

Syntax
public void setImageMap( DhImageMap im );
Parameters
im
The DhImageMap.
Description

Sets the DhImageMap to associate with this image.

DhImage.setImageMapName

Syntax
public void setImageMapName( String strName );
Parameters
strName
The name of the image map to associate with the image.
Description

Sets the name of the image map to associate with this image.

DhImage.setURL

Syntax
public void setURL( String url );
Parameters
url
The URL that refers to the bitmap file to display. The URL can be relative to the HTML document.
Description

Sets the URL of the bitmap file.