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

LINEAR: Takes up to much space surrounding the Gauge #161

Closed
DJViking opened this issue Feb 3, 2019 · 2 comments
Closed

LINEAR: Takes up to much space surrounding the Gauge #161

DJViking opened this issue Feb 3, 2019 · 2 comments

Comments

@DJViking
Copy link

DJViking commented Feb 3, 2019

A simple LINEAR Gauge without ticks,labels and value visible takes up to much space.
Using this as an offset meter +/-500.

I have added a RED border around the Gauge:
screenshot_20190203_135753

If I resize down to acceptable size, then the Gauge becomes to small.
screenshot_20190203_135807

    Gauge gauge1 = GaugeBuilder.create()
                    .skinType(SkinType.LINEAR)
                    .prefSize(450, 450)
                    .minValue(-500.0)
                    .maxValue(500.0)
                    .decimals(2)
                    .startFromZero(true)
                    .minorTickMarksVisible(false)
                    .mediumTickMarksVisible(false)
                    .majorTickMarksVisible(false)
                    .tickLabelsVisible(false)
                    .tickLabelSectionsVisible(false)
                    .valueVisible(false)
                    .build();

    gauge1.setValue(250);

    gauge1.setOrientation(Orientation.HORIZONTAL);
    root.getChildren().add(gauge1);

    gauge1.setBorder(new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID,
                                                 CornerRadii.EMPTY, BorderWidths.DEFAULT)));
@DJViking
Copy link
Author

DJViking commented Feb 3, 2019

Perhaps the Nodes also should set Managed in addition to Visible.

@HanSolo
Copy link
Owner

HanSolo commented Feb 5, 2019

Instead of tweaking the existing skin it might be much easier to create a new skin with the needed functionality. Therefor you simply copy the LinearSkin and remove all things that you don't need. After that you can adjust the scaling in the skin. This is what I did with the PlainAmpSkin. So you could simply create the skin on your own and set it later on in your code. You can find an example on how to do that in the medusademo project on github.

@HanSolo HanSolo closed this as completed Feb 5, 2019
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