Comments (10)
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.
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.
Hm.. so everything is okay?
from javafxsmartgraph.
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.
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.
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.
Yeah, I see the problem. Let me check for a simple solution.
from javafxsmartgraph.
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.
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.
Thanks for the tip, I'll start using it! 😄
from javafxsmartgraph.
Related Issues (20)
- Question: Programmatically changing node colors HOT 1
- setStyleClass now cleares default classes HOT 8
- How to setup properties file ? HOT 4
- Input/output ports on a digraph's vertex? HOT 3
- There's already a vertex with this element. HOT 1
- The Arrow direction is not working properly. Every time the arrow direction change by itself. HOT 9
- Dinamically change vertex's label. HOT 3
- Placing result on canvas HOT 1
- creating a vertex on mouse click. HOT 3
- Graph.removeEdge() removes the visual edge but the attraction remains HOT 2
- [Feature Add] It would be nice if a gradle configuration was supported HOT 2
- Do update works with SmartCircularSortedPlacementStrategy? HOT 3
- Weird behevior with arrow when reattach current arrow HOT 2
- How to reset graph after remove vertices of edges HOT 3
- Error when using SmartGraph HOT 2
- Edge arrow colours and hover behaviour HOT 2
- Set icon to Vertex HOT 3
- Can not cottect the lib into my JavaFX project. Module smartgraph not found HOT 5
- Trouble installing tooltips HOT 1
- Question: is it possible to use different shapes for vertices? HOT 6
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 javafxsmartgraph.