Need help choosing a class name for CSS public API
Jim Weaver
james.weaver at oracle.com
Mon Dec 10 11:59:03 PST 2012
I was going to suggest StyleGlue
Regards,
Jim Weaver
On 12/10/12 2:41 PM, Tom Eugelink wrote:
> Ahhh, yes, in light of the recent layout discussions, how about
> CSSGlue? Or CSSPropertyGlue? Since it glues stuff together. :-)
>
> Tom
>
>
>
> On 2012-12-10 19:25, Randahl Fink Isaksen wrote:
>> Alternatively, "StyleBridge". But that name will probably open up a
>> Java patterns discussion :-)
>>
>> Randahl
>>
>>
>> On Dec 10, 2012, at 19:23 , Randahl Fink Isaksen <randahl at rockit.dk>
>> wrote:
>>
>>> Top of my mind: StyleMedium
>>>
>>> – since it is the medium through which the style is communicated to
>>> the node.
>>>
>>> Randahl
>>>
>>>
>>>
>>> On Dec 10, 2012, at 19:18 , David Grieve <david.grieve at oracle.com>
>>> wrote:
>>>
>>>> In the CSS public API proposal
>>>> (https://wikis.oracle.com/display/OpenJDK/CSS+API+to+support+custom+UI+Controls),
>>>> I have a class name that is rather cumbersome and I'm trying to
>>>> find another name. The class name in the proposal is
>>>> StyleablePropertyMetaData and, to some extent, that is what the
>>>> class is since this is where the node's property and the css
>>>> property come together. The meta-data for Node's opacityProperty is
>>>> shown below. As you can see, there is some information about the
>>>> css property name (-fx-opacity), the type of value (a <size>) and
>>>> the initial property value. There are also two methods that are
>>>> used by CSS so that CSS can set the property value.
>>>>
>>>> So, I'm looking for a name for this thing thinking that there must
>>>> be something better than StyleablePropertyMetaData. I was thinking
>>>> StyleAgent since this class takes an active role in interacting
>>>> with the node property. But "agent" has the connotation of
>>>> something running in the background. Maybe StyleLiaison?
>>>>
>>>> private static final StyleablePropertyMetaData <Node,Number>
>>>> OPACITY =
>>>> new StyleablePropertyMetaData <Node,Number>("-fx-opacity",
>>>> SizeConverter.getInstance(), 1.0) {
>>>>
>>>> @Override
>>>> public boolean isSettable(Node node) {
>>>> return node.opacity == null ||
>>>> !node.opacity.isBound();
>>>> }
>>>>
>>>> @Override
>>>> public WritableValue<Number> getWritableValue(Node
>>>> node) {
>>>> return node.opacityProperty();
>>>> }
>>>> };
>>>>
>>>> Does anyone have a suggestion?
>
--
Regards,
Jim Weaver
Java Technology Ambassador
Oracle Corporation
james.weaver at oracle.com
More information about the openjfx-dev
mailing list