DhIFilterableObject Interface

DhIFilterableObject Interface

This Package | All Packages

public interface DhIFilterableObject

Represents an interface for objects with filters. Objects that implement this interface can have filters applied to them. The following classes implement this interface:

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.
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.
removeAllFilters() Removes all filters from this element.
removeAllFilters(boolean bApply) Removes all filters from this element.
removeFilter(DhFilter filter) Removes the given filter from this element.
removeFilter(DhFilter filter, boolean bApply) Removes the specified filter from this element.
replaceFilter(DhFilter filter1, DhFilter filter2) This method provides an easy way to swap filters.
replaceFilter(DhFilter filter1, DhFilter filter2, boolean bApply) This method provides an easy way to swap filters.

Methods

DhIFilterableObject.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 false 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 you want to flush filters that were previously applied to this element or whether you want this filter to be combined with those already present.

Exceptions

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

See Also
applyFilters, replaceFilter

DhIFilterableObject.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 the purpose of an extension (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

DhIFilterableObject.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 paramater. This function applies every filter that was added to this element.

See Also
addFilter(DhFilter,boolean), addFilter

DhIFilterableObject.findFilter

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

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

Description

Retrieves the current filter with the specified filter class.

DhIFilterableObject.removeAllFilters

Syntax 1
public void removeAllFilters();
Description

Removes all filters from this element. This method automatically clears any sign of 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.

DhIFilterableObject.removeFilter

Syntax 1
public void removeFilter( DhFilter filter );
Parameters
filter
A reference to the filter to remove.
Description

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

See Also
findFilter.



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

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

See Also
findFilter.

DhIFilterableObject.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

This method provides an easy way to swap filters. It automatically applies all the changes 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 visual changes immediately; set to false to delay making changes.
Description

This method provides an easy way to swap filters. You can specify whether to apply all the changes immediately or to delay making changes until later.

See Also
applyFilters