| java.lang.Object com.ibm.richtext.styledtext.StyleModifier
StyleModifier | public class StyleModifier (Code) | | StyleModifier is the base class for operations on AttributeMap. To implement
an operation on AttributeMap, subclass StyleModifier and override
modifyStyle . StyleModifiers are used by MText.
For convenience, this class contains factory methods which will create a
StyleModifier for
certain common operations: attribute union, attribute removal, and AttributeMap
replacement.
See Also: AttributeMap See Also: AttributeSet See Also: MText |
Inner Class :final static class AttributeAddModifier extends StyleModifier | |
Inner Class :final static class StyleAddModifier extends StyleModifier | |
Inner Class :final static class StyleReplaceModifier extends StyleModifier | |
Inner Class :final static class StyleRemoveModifier extends StyleModifier | |
Constructor Summary | |
protected | StyleModifier() Create a StyleModifier. |
IDENTITY | final public static StyleModifier IDENTITY(Code) | | A StyleModifier which simply returns the given style.
|
StyleModifier | protected StyleModifier()(Code) | | Create a StyleModifier.
|
createAddModifier | public static StyleModifier createAddModifier(AttributeMap s)(Code) | | Create a StyleModifier whose operation is
style.addAttributes(s) ,
where style is the AttributeMap passed to
modifyStyle .
Parameters: s - the AttributeMap to union with a StyleModifier for this operation |
createAddModifier | public static StyleModifier createAddModifier(Object key, Object value)(Code) | | Create a StyleModifier whose operation is
style.addAttribute(key, value) ,
where style is the AttributeMap passed to
modifyStyle .
Parameters: key - the key to add Parameters: value - the value to add a StyleModifier for this operation |
createRemoveModifier | public static StyleModifier createRemoveModifier(AttributeSet s)(Code) | | Create a StyleModifier whose operation is
style.removeAttributes(s) ,
where style is the AttributeMap passed to
modifyStyle .
Parameters: s - the AttributeSet of attributes to remove a StyleModifier for this operation |
createReplaceModifier | public static StyleModifier createReplaceModifier(AttributeMap s)(Code) | | Create a StyleModifier whose operation returns s ,
ignoring the parameter to modifyStyle .
Parameters: s - the AttributeMap which will replace any other AttributeMap a StyleModifier for this operation |
modifyStyle | public AttributeMap modifyStyle(AttributeMap style)(Code) | | Return the result of this StyleModifier's operation on the given style.
Default implementation just returns the given style.
Parameters: style - the AttributeMap to perform the operation on |
|
|