Make gravity of virtual flow styleable and dynamically alterable#35
Make gravity of virtual flow styleable and dynamically alterable#35JordanMartinez merged 3 commits intoFXMisc:masterfrom
Conversation
…rable via a public property.
|
|
||
| @SuppressWarnings("unchecked") // Because of the cast we have to perform, below | ||
| private static final CssMetaData<VirtualFlow, Gravity> GRAVITY = new CssMetaData<VirtualFlow, Gravity>( | ||
| "-fx-gravity", |
There was a problem hiding this comment.
In RTFX, we use the prefix -rtfx for any RTFX-specific CSS. So should this use the standard JavaFX prefix or a Flowless specific case?
There was a problem hiding this comment.
I think it's a plausible use case to use Flowless outside RichTextFX. We could use a Flowless specific prefix, e.g. -flfx-gravity?
There was a problem hiding this comment.
Mm.... See this SO question.
What if it's just -flowless-gravity? or even -flow-gravity? -flfx is hard to read partly because the l can be misread as an i, and it doesn't immediately relate back to this project (since it's not called FlowlessFX). fx appears in the -rtfx because that project name does end in FX (See afester's comment on that issue)
There was a problem hiding this comment.
Good point. I like -flowless-gravity (slightly more distinguishing), but either that or -flow-gravity seems fine to me.
There was a problem hiding this comment.
Since gravity is short, why not use -flowless-gravity?
| }; | ||
|
|
||
| @Override | ||
| public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { |
There was a problem hiding this comment.
This should return a static list.
There was a problem hiding this comment.
There should also be another method public static getClassCssMetaData() that returns the same static list
There was a problem hiding this comment.
Done. I copied the naming conventions for this from the Region class.
… return the same static list every time.
|
The wiki page documents the CSS you added here. |
This is the code described in issue #34, see there for more details