[API Review] Make Scene styleable through CSS
Richard Bair
richard.bair at oracle.com
Mon Jul 1 14:58:43 PDT 2013
Does it need a default style class, or can we just use the type selector instead?
Richard
On Jun 25, 2013, at 2:18 PM, David Grieve <david.grieve at oracle.com> wrote:
> https://javafx-jira.kenai.com/browse/RT-31282
>
> Scene has a fillProperty which should be styleable via CSS but this would require making Scene implement the javafx.css.Styleable interface. The interesting bits from the interface are
>
> public String getId()
> public ObservableList<String> getStyleClass()
> public String getStyle()
> public ObservableSet<PseudoClass> getPseudoClassStates()
>
> Scene will have a "scene" style-class by default.
>
> getId() and getStyle() will be backed by corresponding properties with setters.
>
> public void setId(String newId)
> public final StringProperty idProperty()
> public void setStyle(String style)
> public final StringProperty styleProperty()
>
> There is no setPseudoClassStates method since pseudo-class states are handled internally. The only pseudo-class state for Scene is :dir which corresponds to node orientation.
>
> public String getTypeSelector() will return "Scene".
>
> The following CSS properties will be supported for Scene:
>
> -fx-cursor: <cursor | url>;
> -fx-fill: <paint>;
More information about the openjfx-dev
mailing list