Comments (2)
As current partial workaround (to be able to add PopOver) I expose FXFlowNodeSkin.connectors as ReadOnlyMapProperty
- Map<Connector, Shape> connectors = new HashMap<>();
+ final ObservableMap<Connector, Shape> connectors = FXCollections.observableMap(new HashMap<Connector, Shape>());
+ public final ReadOnlyMapProperty<Connector, Shape> connectorsProperty = new ReadOnlyMapWrapper<>(this, "connectors", connectors).getReadOnlyProperty();
sample usage :
PopOver popOver = new PopOver();
flow.getNodes().addListener(new ListChangeListener<VNode>(){
@Override
public void onChanged(ListChangeListener.Change<? extends VNode> c) {
while (c.next()) {
if (c.wasAdded()){
for (VNode vn : c.getAddedSubList()) {
flow.getNodeSkinsById(vn.getId())
.stream()
.filter(s -> s instanceof FXFlowNodeSkin)
.forEach(s -> {
//TODO Store registration
((FXFlowNodeSkin) s).connectorsProperty.addListener(new MapChangeListener<Connector,Shape>(){
@Override
public void onChanged(MapChangeListener.Change<? extends Connector, ? extends Shape> change) {
if (change.wasAdded()) {
Connector c = change.getKey();
Shape cn = change.getValueAdded();
//TODO Store registration
cn.addEventHandler(MouseEvent.MOUSE_ENTERED, (e) -> {
((Label)popOver.getContentNode()).setText(change.getKey().getLocalId() + " : " + c.getType());
popOver.show((javafx.scene.Node)e.getSource(), -10);
});
cn.addEventHandler(MouseEvent.MOUSE_EXITED, (e) -> {
popOver.hide();
});
} else if (change.wasRemoved()) {
//TODO remove registration
}
}
});
});
}
} else if (c.wasRemoved()) {
//TODO remove registration
}
}
}
});
from vworkflows.
The connectors can now be styled via CSS (see sample project). Custom UI controls should be placed inside the window. We will provide a way to visually bind the UI contained in the window to specific connectors.
from vworkflows.
Related Issues (20)
- Allow non-bezier lines in connections
- Enable auto-layout HOT 13
- Allow customization of input/output ports HOT 1
- Allow connector receiver to pop connection context menu
- Multiple connections can be established between two data ports HOT 1
- Unlinked connection when Node is dragged HOT 1
- net.nemerosa:versioning plugin requires external git client HOT 3
- NoClassDefFoundError on Linux HOT 2
- Implementation question HOT 5
- Connectors do not align exactly to the midpoint of an edge HOT 1
- Connector lines do not render as a straight line where they should HOT 1
- Connections not Showing Up HOT 2
- Error when running Main demo class in latest GitHub code HOT 6
- Is this broken on JavaFX 9? HOT 2
- Make it work on JDK >= 11 HOT 1
- Add event handler for connection
- ScalableContentPane cause StackOverflowError
- VisualizationRequest.KEY_NODE_NOT_REMOVABLE has no effect HOT 1
- High CPU consumption with Adopt Java 15 and OpenJFX 15 HOT 1
- Exception when starting a new scene
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 vworkflows.