Skip to content
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

Gauge Not Aligning in GridPane #219

Open
cfbristow71 opened this issue Sep 26, 2022 · 3 comments
Open

Gauge Not Aligning in GridPane #219

cfbristow71 opened this issue Sep 26, 2022 · 3 comments

Comments

@cfbristow71
Copy link

cfbristow71 commented Sep 26, 2022

Not sure this is an issue or by design, but I am currently using medusa gauges and running the 11.7 version. The reason for the old version is compatibility with the system I am running then on. Below is a snippet of code and it just seems to aligns to top and middle.
image

gridPane.setAlignment(Pos.CENTER); Gauge gauge = new Gauge(); GridPane.setHalignment(gauge, HPos.LEFT); GridPane.setValignment(gauge, VPos.BOTTOM); gridPane.add(gauge,3, 2, 1, 1);

@HanSolo
Copy link
Owner

HanSolo commented Sep 28, 2022

Sorry for the late reply, I’m currently a lot on the road but will take a look at it asap.

@HanSolo
Copy link
Owner

HanSolo commented Sep 28, 2022

Ok, so I took a look at it and it is on purpose because you can define the startAngle and angle extend for the gauge. Meaning to say a gauge could also span a full circle so I always reserve the space for the full gauge, even if it is not used. The reason for this is it makes the whole resizing more simple.

@cfbristow71
Copy link
Author

cfbristow71 commented Sep 28, 2022

Thanks for the quick response. Is there any way at to do alignment other than setting position manually. Some gauges seem to push against the right and some are centered. It seems almost random. For example, the image below has a setTranslateX and setTranslateY both set to 10, but it is clearly further than that away. Some other gauges have the same setting in a different grid cell and they are pushed to the right. Am I missing something in the way JavaFX coordinates work.

Edit: The gauge below uses the HSkin
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants