Giter Site home page Giter Site logo

Comments (10)

brunomnsilva avatar brunomnsilva commented on May 16, 2024

Can you elaborate?

You can use the SmartGraphProperties(InputStream inputStream) constructor that accepts a file stream and pass this object to the SmartGraphPanel constructor.

Otherwise, the provided (or custom/modified) smartgraph.properties file must be in the project's root folder.

from javafxsmartgraph.

Bertie2011 avatar Bertie2011 commented on May 16, 2024

Sorry I put you on the wrong path there... I was using the properties as an example of what does go right, to illustrate why it's odd that the CSS file warning does not get hidden after adding a stylesheet myself.

from javafxsmartgraph.

brunomnsilva avatar brunomnsilva commented on May 16, 2024

Hm.. so everything is okay?

from javafxsmartgraph.

Bertie2011 avatar Bertie2011 commented on May 16, 2024

No, let me explain again. I was wrong about the location of the CSS file check, which is why the suggested solution(s) were inaccurate and confusing.

The check for the default CSS file location happens inside the constructor (SmartGraphPanel, line 180), it would be nice if we could supply our own style sheet location. I'll update the original issue description as the suggested solution was inaccurate.

from javafxsmartgraph.

brunomnsilva avatar brunomnsilva commented on May 16, 2024

Previously:
I'm just a little confused, because there are two base files: the properties file and the stylesheet file. You are mentioning both at the same time.

The provided constructors only receive properties and not styling. The smartgraph.css must be present in the filepath.


I see what you mean. I didn't see you were using panel.getStylesheets().add(//my own uri) directly.

Sorry for the CAPS, i was putting "----" 😄

from javafxsmartgraph.

Bertie2011 avatar Bertie2011 commented on May 16, 2024

Oh boy.... I'm just never going to talk about properties again in here haha


Let's focus on CSS stylesheets. I can set custom CSS using SmartGraphPanel.getStylesheets().add(//uri)

It would be nice to set my own file path for CSS without seeing the warning about missing style sheets every time I create the SmartGraphPanel.

from javafxsmartgraph.

brunomnsilva avatar brunomnsilva commented on May 16, 2024

Yeah, I see the problem. Let me check for a simple solution.

from javafxsmartgraph.

brunomnsilva avatar brunomnsilva commented on May 16, 2024

I've committed an update. Now you have an additional constructor SmartGraphPanel(Graph<V, E> theGraph, SmartGraphProperties properties, SmartPlacementStrategy placementStrategy, URI cssFile) that you can use directly and avoid the warning! 👍

Use null in the other arguments if you wish to use default values. This is described in the javadoc.

from javafxsmartgraph.

Bertie2011 avatar Bertie2011 commented on May 16, 2024

Awesome!
You should try referencing the issue on the commit or PR in question. (Just add #xx with the issue number). It will show up in this thread and gives a nice confirmation.

from javafxsmartgraph.

brunomnsilva avatar brunomnsilva commented on May 16, 2024

Thanks for the tip, I'll start using it! 😄

from javafxsmartgraph.

Related Issues (20)

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.