Giter VIP home page Giter VIP logo

tilesfx's Introduction

TilesFX


A JavaFX library containing tiles for Dashboards.

Donations are welcome at Paypal

Intro

The Tile is a simple JavaFX Control that comes with different skins. To get an idea on how to use the skins with their parameters you could either take a look at the Demo file or check out the TilesFX Demo project which also contains information on how to combine TilesFX with other libraries e.g. Medusa You can also check my blog where you will find additional information about certain tiles.

Demo

To run the demo you simply can start it using the command "./gradlew Demo" on the command line in the project folder.

Overview

Overview

Credits

Flag icons made by Freepik from www.flaticon.com

tilesfx's People

Contributors

divinethreepwood avatar fdelporte avatar floriankirmaier avatar hansolo avatar lowell-flashmonkey avatar maier-jake avatar marekkristof avatar painos avatar robeden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tilesfx's Issues

Option to disable tooltips

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!

Font becomes hard to read

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.
untitled

Ticker tile shows Infinity word

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:

tickertile

Note the word "Infinity" and the graph that seems to be on top.

Am I missing something?

Unable to mix TilesFX and Medusa due to event name collisions

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);
    }
}

Suggestion for the TextSize property

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.

Error while creating mapTile

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();
}

TilesFX and JavaFXPorts for Android 5.1

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?

Creating custom tiles with custom sizes

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

alignment support

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.

Allow CSS styling and customization of more tile elements

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.

Warning on startup: Exception while evaluating select-binding [window, showing]

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?

Donut Chart font is cut off.

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.
image
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.
image
You will see that 700 is cut off also when I don't edit the size of the tile.

GaugeSparkLineTile chart component is not working properly

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.
start
later

BarChart max value doesn't set properly if the Tile isn't the default size

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();

produces this
image

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();

produces this
image

AreaChart use only XYChart<String, Number>

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();
    }

SmoothedChartTile - Fill of the legend symbol is not changing

I'm starting to use SmoothedChartTile and noticed that the fill of the legend symbol is not changing to the last value.

I'm using the same Demo.java code to test the change in chart colors, and the legend fill color does not change to the new color reported to TilesFXSeries.

after

Updating description for a text tile

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?

Format string is overwritten on LeaderBoardTileSkin

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);
    });
}

DataFormat for tiles?

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?

Tile.showNotifier(boolean) doesn't work initially ("SHOW_NOTIFIER")

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!

Make sorting of bar chart items optional

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.

gradle build error

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..

Medusa and TilesFX

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 ?

Adding tiles via fxml

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
screenshot from 2017-03-05 01-15-26

This is what it looks like when I load my program
screenshot from 2017-03-05 01-19-23

Ideally, this is what I kinda want it to look like:
screenshot from 2017-03-05 01-17-39

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.

Image Tile

I really needed a tile just to display images. The custom tie did not work for some reason.

switch tile

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

SkinType.TEXT remarks

Hey HanSolo,
Very great work this library!!! Got it added in my application in just a few minutes.
Some questions about the text tile...

  • description change only gets visualized if text is updated?
  • how to align the description?

Best regards,
Frank

Cannot change font size

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?

Resize / stretch to fill only triggered when FlowGridPane table dimensions change.

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:

capture

If one drags the bottom edge up, the tiles will compress:

capture4

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.

capture2

capture3

Not sure if this is a bug or I've missed a setting somewhere?

Set location error in SkinType.MAP

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)

Remove the BarChart from FlowPane,WARNING: Exception while evaluating select-binding [window, showing]

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
......
......

Custom Fonts not working

Setting a custom font neither works with the TileBuilder, nor with calling tile.setCustomFont(...).

Exception with CircularProgressTile and Padding

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();
    }

LeaderBoard is not checking the sorting flag

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();
}

some of setters won't work

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);
capture

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

capture1

Thanks.

Street, Sat, Topo options are not working

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.