javax.rad.ui
Class Style

java.lang.Object
  extended by javax.rad.ui.Style
All Implemented Interfaces:
java.lang.Cloneable

public class Style
extends java.lang.Object
implements java.lang.Cloneable

The Style class is a simple container for style information. It allows to define additional style names.


Constructor Summary
Style(java.lang.String... pStyleNames)
          Creates a new instance of Style with given style names.
 
Method Summary
static Style addStyleNames(IComponent pComponent, java.lang.String... pName)
          Adds one or more style names to the given component.
 Style clone()
          
 boolean containsStyleName(java.lang.String pName)
          Gets whether the current style definition contains the given style name.
 boolean equals(java.lang.Object pObject)
          
 java.lang.String[] getStyleNames()
          Gets the list of already defined style names.
 int hashCode()
          
static Style parse(java.lang.String pStyleNames)
          Gets a Style with parsed values of the given style names.
static Style removeStyleNames(IComponent pComponent, java.lang.String... pName)
          Removes one or more style names from the given component.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Style

public Style(java.lang.String... pStyleNames)
Creates a new instance of Style with given style names.

Parameters:
pStyleNames - the style names
Method Detail

clone

public Style clone()

Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object pObject)

Overrides:
equals in class java.lang.Object

getStyleNames

public java.lang.String[] getStyleNames()
Gets the list of already defined style names.

Returns:
the list of style names or an empty list

containsStyleName

public boolean containsStyleName(java.lang.String pName)
Gets whether the current style definition contains the given style name.

Parameters:
pName - the style name to find
Returns:
true if given style name was found or false if not found

parse

public static Style parse(java.lang.String pStyleNames)
Gets a Style with parsed values of the given style names.

Parameters:
pStyleNames - the style names, separated with spaces
Returns:
the style information

addStyleNames

public static Style addStyleNames(IComponent pComponent,
                                  java.lang.String... pName)
Adds one or more style names to the given component.

Parameters:
pComponent - the component
pName - the style names
Returns:
the current style of the component

removeStyleNames

public static Style removeStyleNames(IComponent pComponent,
                                     java.lang.String... pName)
Removes one or more style names from the given component.

Parameters:
pComponent - the component
pName - the style names
Returns:
the current style of the component


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.