hansolo / tilesfx Goto Github PK
View Code? Open in Web Editor NEWA JavaFX library containing tiles that can be used for dashboards.
License: Apache License 2.0
A JavaFX library containing tiles that can be used for dashboards.
License: Apache License 2.0
It seems that if I call showNotifier(boolean) too soon, before the TileSkin is listening for TileEvents (TileSkin.registerListeners()), that the showNotifier call is ignored, and nothing is shown on the tile.
I have a class that subclasses FlowGridPane, and in its constructor I create multiple tiles (Tile.SkinType.SWITCH) via TileBuilder, and then immediately after the creation of each tile I call showNotifier(boolean), before adding the tile to the FlowGridPane (so at this point the Tile is not visible yet).
Trying to defer the showNotifier call by wrapping it in a Platform.runLater() works sometimes, but not other times. The issue is definitely time dependent.
As a potential workaround, could a ".showNotifier(boolean) be added to TileBuilder? Otherwise (or in addition to), you'll need a property to track the setting of the notification, that can be inspected when the Tile/skin is first visible, and not just rely on the "SHOW_NOTIFIER" event for showing the notification.
Thanks for all your hard work, you create great stuff!
hi,
i have problem to set title,text,description alignment on CUSTOM Skin. In all of Skins (i think) there is no alignment support for text and title and surprisingly setDescriptionAlignemnt wont work on CustomSkin (at least for me).
i want to write RTL and i need to write from right edge, so i will be grateful if such method exist.
I'm using GaugeSparkLineTile with temperature values oscilating around 45°C and min/max range 0/100. At the beginning the included trend 's Y range is from 0 to 40 with small trend line located in trend's top part (see attached image start.png). After some time when trend line fills whole trend area, the range and trend line changes in a strange way - it somehow zooms around the oscilating value, but trend Y values are displayed twice (see attached image later.png). At least the doubled Y values should not be displayed and might be nice to be able to configure what range should be displayed or enable/disable "zoom" behaviour. I've also observed, that when gradientStops are defined, it behaves incorrectly according to different zoom levels of trend's Y axe (if zoomed, gradientStops are applied as when the whole range is displayed). Thank you.
Hey HanSolo,
Very great work this library!!! Got it added in my application in just a few minutes.
Some questions about the text tile...
Best regards,
Frank
In file build.gradle
line14
plugins {
id 'com.gradle.build-scan' version '1.5'
id 'idea'
id 'java'
id 'maven-publish'
id 'net.nemerosa.versioning' version '1.6.0'
id 'com.jfrog.bintray' version '1.6'
}com.gradle.build-scan 's version is too old to build
please update version to 1.9.1
No error..
Setting a custom font neither works with the TileBuilder, nor with calling tile.setCustomFont(...).
Hi,
I'm trying to use both SwitchTile and SwitchSliderTile.
But how do I detect the state of the switch button ?
I've tried using both :
switchTile.setOnSwitchPressed(e -> System.out.println(switchTile.getCurrentValue());
and
switchTile.setOnSwitchPressed(e -> System.out.println(switchTile.isActive());
to print out the state or the value of the toggle switch but nothing shows up in the stack trace.
My goal is that if I toggle off the switch in SwitchSliderTile, the whole slider bar should have the value of zero.
Thanks for any insight and keep up the good work!
-mokun
Hey
Any idea why this error is thrown?
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: TypeError: undefined is not a function (evaluating 'document.changeMapProvider(window.provider)')
at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128)
at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
at com.sun.webkit.WebPage.executeScript(WebPage.java:1439)
at javafx.scene.web.WebEngine.executeScript(WebEngine.java:982)
at eu.hansolo.tilesfx.skins.MapTileSkin.lambda$changeMapProvider$15(MapTileSkin.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$50(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)
This is a portion of my code:
private static Tile mapTile;
public static void main(String[] args) throws IOException {
log.info("Application started");
// Show UI
launch(args);
}
@Override
public void init() {
// Initialisation
mapTile = TileBuilder.create()
.skinType(SkinType.MAP)
.prefSize(360, 250)
.title("Map")
.textVisible(false)
.mapProvider(MapProvider.TOPO)
.build();
}
@Override
public void start(Stage primaryStage)
{
// The main holder
VBox root = new VBox();
root.setPadding(new Insets(5));
root.setSpacing(10);
...
// Shape
VBox shape = new VBox();
shape.setSpacing(5);
main.getChildren().add(shape);
shape.getChildren().add(mapTile);
// Open the UI
primaryStage.setScene(new Scene(root, 1000, 800));
primaryStage.show();
}
Hello!
I would like to make a ticket with this issue:
When i try to build a new Tile with series of type XYChart<Number, Number> to use it for dynamic visualization i am getting:
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at javafx.scene.chart.CategoryAxis.toNumericValue(CategoryAxis.java:67)
at javafx.scene.chart.AreaChart.updateAxisRange(AreaChart.java:175)
at javafx.scene.chart.XYChart.layoutChartChildren(XYChart.java:660)
at javafx.scene.chart.Chart$1.layoutChildren(Chart.java:94)
at javafx.scene.Parent.layout(Parent.java:1087)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Scene.doLayoutPass(Scene.java:552)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2397)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
To reproduce problem use snippet and put it into Main code:
private void init(Stage primaryStage) {
//-- Chart Series
Series series = new XYChart.Series<Number, Number>();
series.setName("Temperature");
Tile sc = TileBuilder.create()
.prefSize(800, 240)
.skinType(Tile.SkinType.AREA_CHART)
.series(series)
.animated(true)
.build();
for(int i=0;i<100;i++)
series.getData().add(new XYChart.Data(i, i+1));;
primaryStage.setScene(new Scene(sc));
primaryStage.setWidth(800);
primaryStage.setHeight(240);
primaryStage.show();
}
The method registerItemListeners() sets the format string thus overwriting what the application set in setFormatString(). Commenting out this line (see below) prevents the overwrite, but it might not be the correct fix.
private void registerItemListeners() {
tile.getLeaderBoardItems().forEach(item -> {
//item.setFormatString(formatString);
item.addChartDataEventListener(updateHandler);
EventHandler<MouseEvent> clickHandler = e -> tile.fireTileEvent(new TileEvent(TileEvent.EventType.SELECTED_CHART_DATA, item.getChartData()));
handlerMap.put(item, clickHandler);
item.addEventHandler(MouseEvent.MOUSE_PRESSED, clickHandler);
});
}
Hi,
I'm trying to increase the font size for tiles (specifically: the bar chart tile). I'm using the TileBuilder and I call customFontEnabled(true)
and customFont(Fonts.latoRegular(25.0))
, but the font size does not change.
How can I change the font size for the text elements on tiles?
Hello,
First thanks for this awesome library!
I'm using a text tile built like this (in Kotlin)
val blockHeightTile = TileBuilder.create()
.prefSize(TILE_SIZE, TILE_SIZE)
.skinType(Tile.SkinType.TEXT)
.title("Block Height")
.build()
At some point of time, I'm able to update text
property (using setText()
), but not description
property (using setDescription()
) because change isn't displayed.
Looking at source code it is perhaps we don't use this.fireTileEvent(this.REDRAW_EVENT);
in setDescription()
like for text
, but this.fireTileEvent(this.VISIBILITY_EVENT);
.
What do you think?
I am writing a Kotlin/TornadoFX app using TilesFX, and I've reached the point where I'm ready to interact with them. I created a DataFormat such that
private var TILES: DataFormat = DataFormat("eu.hansolo.tilesfx.Tile")
But in my java app, it says
java.lang.IllegalArgumentException: DataFormat 'eu.hansolo.tilesfx.Tile' already exists.
Is there an existing DataFormat for a tile in TilesFX?
Just a heads up more then an issue. The default font can become hard to read (especially the tile headings) with use on laptops.
Suggestion for another tile - a "Cam Tile". Say something that just takes a feed from EarthCam. Could take TilesFX into the "surveillance" area. Thanks for your great work.
In version 1.3.6, if I run GpxParseDemo in Eclipse IDE with jdk 8u121. only 3 of the choices (namely B&W, Bright, and Dark) can show the map, the other 3 (Street, Sat, Topo) show nothing other than the route.
hi,first thanks for this Great Lib!!
when i set a Tile in my .fxml file and set skin in builder scene to Spark_line and then in the controler i want to setUnit, the setUnit method won't work unless i set a Unit and after that i setSkinType to Spark_line again!!! and this problem is for setGradientStops method too.....
if i want to change anything in my code i should set Style after the setting
sparkLineTile.setPrefSize(TILE_SIZE,TILE_SIZE);
sparkLineTile.setUnit(" g/KG");
sparkLineTile.setGradientStops(new Stop(0, Tile.GREEN),
new Stop(0.5, Tile.YELLOW),
new Stop(1.0, Tile.RED));
sparkLineTile.setTitle("Humidity");
sparkLineTile.setStrokeWithGradient(true);
sparkLineTile.setPrefSize(TILE_SIZE,TILE_SIZE);
sparkLineTile.setUnit(" g/KG");
sparkLineTile.setGradientStops(new Stop(0, Tile.GREEN),
new Stop(0.5, Tile.YELLOW),
new Stop(1.0, Tile.RED));
sparkLineTile.setTitle("Humidity");
sparkLineTile.setStrokeWithGradient(true);
sparkLineTile.setSkinType(Tile.SkinType.SPARK_LINE); //added
Thanks.
The SparkLineTileSkin
s y-Axis cannot handle negative values, they are simply not shown. In my case I have values that can range from -1.0 to 1.0 and the only tick that is shown when the value is 0 is 0.5.
I was trying to get the tiles to stretch and resize like in the demo video. I made the following changes in Demo.java
@Override public void start(Stage stage) {
// FlowPane pane = new FlowPane(Orientation.HORIZONTAL, 5, 5,
// percentageTile, clockTile, gaugeTile, sparkLineTile, areaChartTile,
// lineChartTile, timerControlTile, numberTile, textTile,
// highLowTile, plusMinusTile, sliderTile, switchTile, timeTile,
// barChartTile, customTile, leaderBoardTile, worldTile, mapTile);//, weatherTile);
// pane.setPrefWrapLength(1);
// pane.setAlignment(Pos.CENTER);
// pane.setCenterShape(true);
// pane.setPadding(new Insets(5));
// pane.setPrefSize(780, 395);
// pane.setBackground(new Background(new BackgroundFill(Color.web("#101214"), CornerRadii.EMPTY, Insets.EMPTY)));
FlowGridPane pane = new FlowGridPane(5, 4,
percentageTile, clockTile, gaugeTile, sparkLineTile, areaChartTile,
lineChartTile, timerControlTile, numberTile, textTile,
highLowTile, plusMinusTile, sliderTile, switchTile, timeTile,
barChartTile, customTile, leaderBoardTile, mapTile);//, weatherTile);
// pane.setPrefWrapLength(1);
pane.setAlignment(Pos.CENTER);
pane.setAlignment(Pos.CENTER);
pane.setHgap(5);
pane.setVgap(5);
pane.setCenterShape(true);
pane.setPrefSize(1200, 800);
pane.setBackground(new Background(new BackgroundFill(Color.web("#101214"), CornerRadii.EMPTY, Insets.EMPTY)));
Scene scene = new Scene(pane);
stage.setTitle("TilesFX");
stage.setScene(scene);
stage.show();
timer.start();
mapTile.addPoiLocation(new Location(51.85, 7.75, "Test"));
mapTile.removePoiLocation(new Location(51.85, 7.75, "Test"));
}
When the demo is run (gradlew Demo) the tiles are not stretched to the full extent:
If one drags the bottom edge up, the tiles will compress:
If one drags the right edge across such that the FlowGridPane changes from 4 rows by 5 cols to 5 rows by 4 cols, and then drags the right edge back to the original position, the tiles are now fully stretched.
Not sure if this is a bug or I've missed a setting somewhere?
I want to use this lib with scenebuilder and netbeans but I couldn't use gradle in netbeans for some reason
You cannot get the Chart Data out of a TreeNode using a TileEvent.EventType.SELECTED_CHART_DATA on a Sunburst Chart.
when i run the tilesfxdemo in eclipse, everything is perfect,but i try to remove same item,there is a problem:
`pane.setAlignment(Pos.CENTER);
pane.setCenterShape(true);
pane.setPadding(new Insets(5));
//pane.setPrefSize(800, 600);
pane.setBackground(new Background(new BackgroundFill(Color.web("#101214"), CornerRadii.EMPTY, Insets.EMPTY)));
PerspectiveCamera camera = new PerspectiveCamera();
camera.setFieldOfView(10);
Scene scene = new Scene(pane);
scene.setCamera(camera);
**pane.getChildren().clear();**
stage.setTitle("TilesFX");
stage.setScene(scene);
stage.show();`
WARNING: Exception while evaluating select-binding [window, showing]
July 23, 2018 6:59:06 AM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
WARNING: Exception while evaluating select-binding [window, showing]
July 23, 2018 6:59:06 AM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
......
......
Hello, you don't mind I "spam" you?
Had this error with the MAP tile:
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: TypeError: undefined is not a function (evaluating 'java.update(parseFloat(map.getCenter().lat), parseFloat(map.getCenter().lng))')
at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:137)
at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
at com.sun.webkit.WebPage.executeScript(WebPage.java:1473)
at javafx.scene.web.WebEngine.executeScript(WebEngine.java:982)
at eu.hansolo.tilesfx.skins.MapTileSkin.lambda$updateLocation$7(MapTileSkin.java:154)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Is it possible to add the tile via fxml and then using setGraphic, we set a node that is contained within the tile?
I have tried this, and the results are not good. The tile does not seem to contain the node and is sometimes contained entirely behind the node.
This is a screenshot of scenebuilder
This is what it looks like when I load my program
Ideally, this is what I kinda want it to look like:
I'm thinking it has to do with using gridpane? Or maybe the tile has to be built using TileBuilder as I've seen in your demos.
Dear Gerrit!
try to add tilesfx component to medusa used code
that leads to runtime crash :
import eu.hansolo.medusa.Gauge; import eu.hansolo.medusa.Gauge.SkinType; import eu.hansolo.medusa.GaugeBuilder; import eu.hansolo.medusa.skins.SlimSkin; import eu.hansolo.tilesfx.chart.SmoothedChart; import eu.hansolo.tilesfx.chart.ChartData; import eu.hansolo.tilesfx.Tile.TileColor; import eu.hansolo.tilesfx.Tile.ChartType; import eu.hansolo.tilesfx.tools.FlowGridPane; import eu.hansolo.tilesfx.Tile; import eu.hansolo.tilesfx.TileBuilder; import eu.hansolo.tilesfx.Tile.MapProvider; import eu.hansolo.tilesfx.skins.BarChartItem;; GaugeBuilder builder = GaugeBuilder.create() .skinType(SkinType.SLIM) .barBackgroundColor(Color.rgb(39,44,50)) .animated(true) .animationDuration(1000); steps = builder.decimals(0).maxValue(10000).unit("STEPS").build(); smoothChart = new ChartData("Item1", 50, Tile.BLUE); smoothAreaChartTile = TileBuilder.create() .skinType(Tile.SkinType.SMOOTH_AREA_CHART) .prefSize(100, 100) .minValue(0) .maxValue(255) .title("smooth area") .chartData(smoothChart) .animated(true) .build(); pane = new GridPane(); pane.add(smoothAreaChartTile, 1, 4);
what the correct way ?
Hi Gerrit,
I am using a bunch of your sweet graphical components in a dashboard designer/viewer solution.
The problem is in the Section class (which looks to be a copy from Medusa). The event names are the same and will not work alongside each other. I changed the TilesFX (1.4.4) Section.class by adding a prefix TILESFX_ to the eventtype names, and they now work together.
Cheers and thanks again,
Carstein
// ******************** Inner Classes *************************************
public static class SectionEvent extends Event {
public static final EventType SECTION_ENTERED = new EventType<>(ANY, "TILESFX_SECTION_ENTERED");
public static final EventType SECTION_LEFT = new EventType<>(ANY, "TILESFX_SECTION_LEFT");
public static final EventType SECTION_UPDATE = new EventType<>(ANY, "TILESFX_SECTION_UPDATE");
// ******************** Constructors **************************************
public SectionEvent(final Object SOURCE, final EventTarget TARGET, EventType<SectionEvent> TYPE) {
super(SOURCE, TARGET, TYPE);
}
}
I want to use a light theme in my application, with a bright tile background. I can change some of the colors, but not all. For example, the color for the grid lines in the SparkLIneTileSkin seem to be hard coded (Tile.FOREGROUND), so I cannot see any lines with my bright background.
Also: Is it possible to style tiles via CSS? This would make it easier to change the theme of an application.
Thank you for your excellent library, but I want build application for Android used JavaFXPorts and javafxmobile-plugin of Gradle. After compilation simple application with tiles, I placed it to my Android 5.1 and started, but screen black only without any other elements.
Have you tried running Tiles on Android platform?
This is actually a bug in JavaFX (see the JDK bug system).
Considering that the bug has been filed three years ago it might be worth considering the workaround suggested on the above link, i.e.: "uninstall the parent tooltip when the mouse enters the child node and reinstall it when the mouse exits the child node".
I would suggest separating the TextSize property for the different Tile texts (title, text, ...). For example, I want to put in my Text the base date of the Tile information and I do not want this text to be the same size as my Title.
I tried changing ChartData("one", 1) by way of text color for a RadarChart and by the tilebuilder.
But nothing I tried seems to take effekt. It stays grey.
Is the color maybe hard coded?
Currently the items of a bar chart gets sorted by their value. I would suggest to make this optional, as it could be confusing if the order of the items change suddenly because of updated values.
When trying to select chart data from a radial chart with more than 4 entries, breaks the accuracy of TileEvent.EventType.SELECTED_CHART_DATA after the 4th radial bar.
Please do help me how to create tiles with custom look and feel with different sizes and shape. It will be greate if you can hep me small hello world example.
I use the following way to create tile, is it the right way
TileBuilder.create().build();
It create fix size tile with some default pic inside.
Regards
pos = TileBuilder.create()
.skinType(Tile.SkinType.BAR_CHART)
.title("Point of Sales")
.text("Today's Production")
.prefSize(320, 270)
.maxValue(50)
.minValue(1)
.barChartItems(p1x30Data, p1x35Data, p132Data, p1520Data)
.decimals(0)
.build();
pos = TileBuilder.create()
.skinType(Tile.SkinType.BAR_CHART)
.title("Point of Sales")
.text("Today's Production")
//--- .prefSize(320, 270) ---//
.maxValue(50)
.minValue(1)
.barChartItems(p1x30Data, p1x35Data, p132Data, p1520Data)
.decimals(0)
.build();
In 1.4.5, when I run Demo.java in eclipse, I'm getting "Exception in Application start method" and don't know why.
The LeaderBoard Tile can't be updated. Calling setLeaderBoardItems() or addLeaderBoardItem() has no effekt.
ChartData hospitalityData = new ChartData("Hospitality", 462, Tile.RED);
ChartData retailData = new ChartData("Retail", 250, Tile.BLUE);
ChartData pcrData = new ChartData("PCR", 120, Tile.DARK_BLUE);
ChartData peripheralsData = new ChartData("Peripherals", 700, Tile.GREEN);
Tile donutChart = TileBuilder.create().skinType(Tile.SkinType.DONUT_CHART)
.title("Category")
.text("Production")
.prefSize(384,270)
.chartData(hospitalityData, retailData, pcrData, peripheralsData)
.decimals(0)
.maxValue(700)
.minValue(120)
.build();
This code produces this.
I feel that the chart can be moved more to the left and the font could be clearer.
Tile donutChart = TileBuilder.create().skinType(Tile.SkinType.DONUT_CHART)
.title("Category")
.text("Production")
.chartData(hospitalityData, retailData, pcrData, peripheralsData)
.decimals(0)
.maxValue(700)
.minValue(120)
.build();
produces this.
You will see that 700 is cut off also when I don't edit the size of the tile.
Hi,
I'm getting the following warning when I start my application:
Apr 18, 2018 9:11:54 AM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
WARNING: Exception while evaluating select-binding [window, showing]
As this is not very helpful, I've debugged this. The exception is thrown when I call TileBuilder.build()
, to be more specific in Tile.registerListeners()
line 704. Then in SelectBinding.getObservableValue()
in line 97 a new instance of PropertyReference
is created, however, at this point the variable obj
is null, so a NullPointException is thrown at obj.getClass()
.
I'm using Kotlin and TornadoFx and when I look at the Tile
class I can see that the BooleanBinding showing
is shown in IntelliJ as BooleanBinding [invalid]
. Maybe that's a hint?
I really needed a tile just to display images. The custom tie did not work for some reason.
Please use unicode character for EURO SIGN in HighLow Tile for all locales. Thanks.
I have no idea how to use this library, it looks wonderful. Just a little bit of information in the readme or somewhere would be splendid
Hello,
I'm testing ticker tile that I created like this (in Kotlin lang.):
val stockTile = TileBuilder.create()
.skinType(Tile.SkinType.STOCK)
.prefSize(TILE_SIZE, TILE_SIZE)
.title("BTC")
.textVisible(true)
.value(5000.0)
.maxValue(6000.0)
.build()
It displays this:
Note the word "Infinity" and the graph that seems to be on top.
Am I missing something?
Creating a CircularProgress tile and setting padding throws the following exception:
java.lang.IllegalArgumentException: The radii value may not be < 0
at javafx.scene.layout.CornerRadii.<init>(CornerRadii.java:170)
at eu.hansolo.tilesfx.skins.TileSkin.redraw(TileSkin.java:203)
at eu.hansolo.tilesfx.skins.CircularProgressTileSkin.redraw(CircularProgressTileSkin.java:346)
at eu.hansolo.tilesfx.skins.TileSkin.handleEvents(TileSkin.java:148)
at eu.hansolo.tilesfx.skins.CircularProgressTileSkin.handleEvents(CircularProgressTileSkin.java:175)
at eu.hansolo.tilesfx.skins.TileSkin.lambda$new$0(TileSkin.java:97)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyDoublePropertyBase.fireValueChangedEvent(ReadOnlyDoublePropertyBase.java:72)
at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:103)
at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:147)
at javafx.scene.layout.Region.setWidth(Region.java:858)
at javafx.scene.layout.Region.resize(Region.java:1364)
at javafx.scene.Scene.resizeRootToPreferredSize(Scene.java:1687)
at javafx.scene.Scene.preferredSize(Scene.java:1645)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1720)
at javafx.stage.Window$9.invalidated(Window.java:846)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.show(Window.java:937)
at javafx.stage.Stage.show(Stage.java:259)
at tilestest.Issue11.start(Issue11.java:48)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
To reproduce just use this code:
@Override
public void start(Stage primaryStage) throws Exception {
Tile clockTile = TileBuilder.create()
.skinType(Tile.SkinType.CIRCULAR_PROGRESS)
.prefSize(400, 400)
.value(85)
.padding(new Insets(25))
.build();
primaryStage.setScene(new Scene(clockTile));
primaryStage.setWidth(800);
primaryStage.setHeight(240);
primaryStage.show();
}
Hi, would be nice to have the option to disable or enable tooltips in tiles since when is not text in the tooltip it will display an empty tooltip. Maybe detecting when there is no text setted (StringProperty tooltipText;) or with a new property called tootipVisible.
Cheers!
The sortItems() method in LeaderBoardTileSkin class needs to check the sorted data flag before sorting. Here's the fix:
private void sortItems() {
List<LeaderBoardItem> items = tile.getLeaderBoardItems();
if (tile.isSortedData()) {
items.sort(Comparator.comparing(LeaderBoardItem::getValue).reversed());
}
items.forEach(i -> i.setIndex(items.indexOf(i)));
updateChart();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.