org.opencms.gwt
Class CmsIconCssRuleBuilder

java.lang.Object
  extended by org.opencms.gwt.CmsIconCssRuleBuilder

public class CmsIconCssRuleBuilder
extends Object

This is a helper class for creating the text of the CSS rule for a single icon based on resource type and file suffix.

Since:
8.0.0

Constructor Summary
CmsIconCssRuleBuilder()
           
 
Method Summary
 void addSelectorForSubType(String type, String suffix, boolean small)
          Adds a selector for a resource type and a file suffix.
 void addSelectorForType(String type, boolean small)
          Adds a selector for a resource type.
 void setImageUri(String imageUri)
          Sets the URI of the icon image file.
 void writeCss(StringBuffer buffer)
          Writes the CSS to a string buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsIconCssRuleBuilder

public CmsIconCssRuleBuilder()
Method Detail

addSelectorForSubType

public void addSelectorForSubType(String type,
                                  String suffix,
                                  boolean small)
Adds a selector for a resource type and a file suffix.

Parameters:
type - the resource type name
suffix - the file suffix
small - true if the selector should be for the small icon

addSelectorForType

public void addSelectorForType(String type,
                               boolean small)
Adds a selector for a resource type.

Parameters:
type - the name of the resource type
small - true if the selector should be for the small icon

setImageUri

public void setImageUri(String imageUri)
Sets the URI of the icon image file.

Parameters:
imageUri - the URI of the icon image file

writeCss

public void writeCss(StringBuffer buffer)
Writes the CSS to a string buffer.

Parameters:
buffer - the string buffer to which the