-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make gravity of virtual flow styleable and dynamically alterable #35
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since gravity
is short, why not use -flowless-gravity
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - done.
}; | ||
|
||
@Override | ||
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should return a static list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should also be another method public static getClassCssMetaData()
that returns the same static list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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