| |
|
| com.jgoodies.animation.tutorial.component.AlphaConverter
AlphaConverter | final class AlphaConverter extends AbstractConverter (Code) | | This implementation of ValueModel converts integers
between 0 and 255 to Color instances that use this integer as alpha value.
author: Karsten Lentzsch version: $Revision: 1.3 $ See Also: Color |
Constructor Summary | |
| AlphaConverter(ValueModel subject) Constructs an AlphaConverter on the given subject. |
Method Summary | |
public Object | convertFromSubject(Object subjectValue) Converts a Color to the color's alpha value. | public void | setValue(Object newValue) Converts an alpha value between 0 and 255 to a Color with that
integer as brightness. |
AlphaConverter | AlphaConverter(ValueModel subject)(Code) | | Constructs an AlphaConverter on the given subject.
Parameters: subject - the underlying ValueModel |
convertFromSubject | public Object convertFromSubject(Object subjectValue)(Code) | | Converts a Color to the color's alpha value.
Parameters: subjectValue - the subject's Color the color's alpha value throws: ClassCastException - if the subject value is not of typeColor |
setValue | public void setValue(Object newValue)(Code) | | Converts an alpha value between 0 and 255 to a Color with that
integer as brightness.
Parameters: newValue - the new alpha value throws: ClassCastException - if the new value is not of typeInteger |
|
|
|