Comments (4)
Well the FGauge is more or less a special wrapper around a Gauge. So you should not use a styled gauge like you did but more like in the following example.
`import java.util.logging.Logger;
import eu.hansolo.medusa.Gauge.SkinType;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.NodeOrientation;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class MainApp extends Application {
private static final Logger LOGGER = Logger.getLogger(MainApp.class.getName());
public static void main( String[] args ) {
launch(args);
}
private Gauge gauge;
private FGauge fgauge;
@Override public void init() throws Exception {
GaugeDesign design = GaugeDesign.NONE;
SkinType skin = Gauge.SkinType.SIMPLE_SECTION;
gauge = GaugeBuilder.create().build();
gauge.setMouseTransparent(true);
fgauge = FGaugeBuilder.create()
.gauge(gauge)
.build();
fgauge.addEventHandler(MouseEvent.MOUSE_PRESSED, e -> System.out.println("*** SELECTED"));
}
@Override public void start( Stage stage ) throws Exception {
StackPane pane = new StackPane(fgauge);
pane.setPadding(new Insets(20));
pane.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
Scene scene = new Scene(pane);
stage.setTitle("Medusa Clock Test");
stage.setScene(scene);
stage.show();
}
}
`
from medusa.
Thank you for the gauge.setMouseTransparent(true);
hint.
Have you seen the resize problem?
from medusa.
I sometimes see that the gauge is not aligned correctly which seems to be the case if I resize too fast. The whole FGauge control is more to show the possibility of using borders to create some kind of frame around a Gauge control. I would suggest not to use it in the current state. To be honest I was thinking about to remove the FGauge from the lib.
from medusa.
OK, I'll not use it.
Thank you
from medusa.
Related Issues (20)
- Remove Maven dependencies on javafx HOT 2
- Application is not running in Intellij IDE and JDK11. HOT 7
- GaugeBuilder for half skin ignores tick space HOT 1
- Exception in application start method HOT 1
- Change the fontsize of TickMarks HOT 9
- Level Gauge HOT 5
- Max value cannot be set with large values HOT 2
- How I use these gauges in my project? Can anyone give me some template.? HOT 2
- Smooth gradient precisely on gradient stop HOT 3
- [question] java: module not found: eu.hansolo.medusa HOT 3
- Issues when moving from version 11.7 to version 16.0.0 HOT 2
- Gauge.SkinType.DASHBOARD gets wobbly near max value HOT 2
- 16.0.1 version not in mvnrepository HOT 2
- Linear Bar functionality
- Setting a GaugeSkin removes Color Settings HOT 2
- Gauge Not Aligning in GridPane HOT 3
- counter-clockwise gauge HOT 7
- Can't find module HOT 2
- JFXCentral Badge
- Adding Gauge/Gauges to UI performance improvement and Marker valueProperty update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medusa.