DhStyle Class

DhStyle Class

This Package | All Packages

DhStyleBase
  |
  +--DhStyle
public class DhStyle
extends DhStyleBase
implements DhIFilterableObject

Topic under construction.

Constructors
Name Description
DhStyle(String name) Creates a DhStyle object.
DhStyle() Creates a DhStyle object.

Methods
Name Description
addFilter(DhFilter filter) Topic under construction.
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 a delayed filter.
findFilter(Class filterClass) Retrieves the current filter with the specified filter class.
getName() Retrieves the underlying name for this style object as seen by the HTML object.
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 specified filter from this element.
replaceFilter(DhFilter filter1, DhFilter filter2) Replaces a specified filter with another filter.
replaceFilter(DhFilter filter1, DhFilter filter2, boolean bApply) Replaces a specified filter with another filter.
setName(String name) Sets the underlying name for the style object as seen by the HTML object.

Constructors

DhStyle.DhStyle

Syntax 1
public DhStyle( String name );
Parameters
name
Name of style to use for underlying HTML generation.
Description

Creates a DhStyle object. This constructor allows you to name your style and control the underlying HTML code that is generated by this object. Note, however, that this is completely handled for you in the default (empty) constructor.

See Also
DhStyle()



Syntax 2
public DhStyle();
Description

Creates a DhStyle object. Use this constructor to create the default style object.

Methods

DhStyle.addFilter

Syntax 1
public void addFilter( DhFilter filter );
Description

Topic under construction.



Syntax 2
public void addFilter( DhFilter filter, boolean bApply );
Parameters
filter
The DhFilter object to apply.
bApply
Set to true to apply the filter directly; set to false to delay the application of 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 t6hrown 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 directly; set to false to delay the application of 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 to flush filters that were previously applied to this element or 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

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

DhStyle.applyFilters

Syntax
public void applyFilters();
Description

Applies a delayed filter. 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

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

DhStyle.getName

Syntax
public synchronized String getName();
Return Value

Returns the string name of the style rule.

Description

Retrieves the underlying name for this style object as seen by the HTML object. This is an advanced feature and is not part of normal usage scenarios.

DhStyle.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 remove all filters immediately or delay removal.

DhStyle.removeFilter

Syntax 1
public void removeFilter( DhFilter filter );
Parameters
filter
A reference to 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
A reference to the filter to remove.
bApply
Set to true to reapply other filters left on this element; set to false to delay the application of the filter.
Description

Removes the specified 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.

DhStyle.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 specified filter with another filter. This method gives you a direct means of swapping filters. All changes that occur due to this swap are automatically applied 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

Replaces a specified filter with another filter. This method gives you a direct means of swapping filters. You can specify whether to apply all the changes due to this swap immediately or to delay making changes until later.

See Also
applyFilters

DhStyle.setName

Syntax
public synchronized void setName( String name );
Parameters
name
The string name of the style rule.
Description

Sets the underlying name for the style object as seen by the HTML object. This is an advanced feature and is not part of normal usage scenarios.