Need help choosing a class name for CSS public API
Sven Reimers
sven.reimers at gmail.com
Tue Dec 11 05:58:13 PST 2012
+1 CSSMetaData (or CssMetaData)
Sven
On Tue, Dec 11, 2012 at 5:51 AM, Gerrit Grunwald <han.solo at muenster.de>wrote:
> +1 CSSMetaData
>
> Gerrit Grunwald
>
> Am 10.12.2012 um 22:03 schrieb Richard Bair <richard.bair at oracle.com>:
>
> > We started off with StyleablePropertyMetaData -- but it is really long.
> CSSMetaData is certainly shorter.
> >
> > I'm not really a fan of "Glue", I get sticky fingers just thinking about
> it! :-)
> >
> > Richard
> >
> > On Dec 10, 2012, at 12:35 PM, Quartam - Jan Schenkel <
> jan.schenkel at quartam.com> wrote:
> >
> >> How about CSSMetaData?
> >> If it's not already used elsewhere, it would seem reasonably short and
> to-the-point.
> >>
> >> Jan.
> >>
> >> On 10 Dec 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?
> >
>
--
Sven Reimers
* Senior Expert Software Architect
* NetBeans Dream Team Member: http://dreamteam.netbeans.org
* NetBeans Governance Board Member:
http://netbeans.org/about/os/governance.html
* Community Leader NetBeans: http://community.java.net/netbeans
Desktop Java:
http://community.java.net/javadesktop
* Duke's Choice Award Winner 2009
* Blog: http://nbguru.blogspot.com
* XING: https://www.xing.com/profile/Sven_Reimers8
* LinkedIn: http://www.linkedin.com/in/svenreimers
Join the NetBeans Groups:
* XING: http://www.xing.com/group-20148.82db20
* NUGM: http://haug-server.dyndns.org/display/NUGM/Home
* LinkedIn: http://www.linkedin.com/groups?gid=1860468
http://www.linkedin.com/groups?gid=107402
http://www.linkedin.com/groups?gid=1684717
* Oracle: https://mix.oracle.com/groups/18497
More information about the openjfx-dev
mailing list