Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

WIP: Additional stylable properties support for ImageView #30

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

WIP: Additional stylable properties support for ImageView #30

wants to merge 2 commits into from

Conversation

aalmiray
Copy link
Contributor

Relates to #29.
Intended as a the start of discussion as not all properties (viewport, x, y still missing) have been added as stylable.

@Override
public Boolean convert(ParsedValue<String, Boolean> value, Font font) {
final String sval = value != null ? value.getValue() : null;
return "true".equalsIgnoreCase(sval);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we define "true" as a const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 9 there is a public API javafx.css.converter.BooleanConverter that should be used.

SizeConverter.getInstance(), 0.0) {

@Override
public boolean isSettable(ImageView n) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general question: should we define params in new code as final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this code was C&P from Node thus it follows the same code semantics and structure as previously existing code. Changing ImageView would require updating all other classes that follow the same programming idioms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, that's why I said 'general question' ;) Do not make sense to do it here. Just something that came in my mind when I saw your PR.

@Override
public Boolean convert(ParsedValue<String, Boolean> value, Font font) {
final String sval = value != null ? value.getValue() : null;
return "true".equalsIgnoreCase(sval);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 9 there is a public API javafx.css.converter.BooleanConverter that should be used.

@eugener eugener added the enhancement New feature or request label Mar 24, 2018
@johanvos
Copy link
Collaborator

@andres can you target this PR to develop branch (instead of master)? That way, appveyor might pass.
Also, can you comment on the suggestions from @svenreimers

@aalmiray
Copy link
Contributor Author

Yes, I’ll rebase the PR with develop and apply the suggestion by @svenreimers. Give me 1 day and it’ll be done 😄

@aalmiray aalmiray changed the base branch from master to develop March 27, 2018 21:00
@svenreimers
Copy link

Will we need an update on the css reference document as well?

@aalmiray
Copy link
Contributor Author

@svenreimers yes, absolutely.

@abhinayagarwal
Copy link
Contributor

abhinayagarwal commented Aug 22, 2018

Is this PR waiting for an update on the css reference document?

@kevinrushforth
Copy link
Collaborator

No, this issue never got to the point where it is ready for code review. There are API design issues that would need to be hammered out first, such as whether we should add more styleable properties for nodes such as ImageView; if so, which attributes; how it interacts with layout.

@aalmiray
Copy link
Contributor Author

@kevinrushforth should the discussion be moved to the mailing list?

@kevinrushforth kevinrushforth added the WIP Work In Progress label Feb 16, 2019
@kevinrushforth kevinrushforth changed the title Additional stylable properties support for ImageView [WIP] Additional stylable properties support for ImageView Feb 16, 2019
@kevinrushforth kevinrushforth changed the title [WIP] Additional stylable properties support for ImageView WIP: Additional stylable properties support for ImageView Oct 1, 2019
@kevinrushforth
Copy link
Collaborator

kevinrushforth commented Oct 1, 2019

As announced in this message, the official jfx repository is moving from hg.openjdk.java.net/openjfx/jfx-dev/rt to github.com/openjdk/jfx.

This sandbox repository is being retired on 1-Oct-2019. You will need to migrate your WIP pull request to the openjdk/jfx repo if you want to continue working on it. Here are instructions for migrating your pull request. The updated CONTRIBUTING.md doc has additional information on how to proceed.

Once you have done this, it would be helpful to add a comment with a pointer to the new PR.

NOTE: since this is a feature / enhancement request it needs to be discussed on the openjfx-dev mailing list if you want it to be considered.


The new openjdk/jfx repo will be open for pull requests on Wednesday, 2-Oct-2019. I will send email to the openjfx-dev mailing list announcing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants