mihosoft.eu
Programming, Art, Linux, Free Software…
mihosoft.eu
Navigation
  • Home
  • VRL-Studio
  • SonoAir
  • Monochrome Wars
  • About
  • Impressum
  • Datenschutz
You are here: Home › Featured › [Part 4] VWorkflows & Multiple Inputs/Outputs

[Part 4] VWorkflows & Multiple Inputs/Outputs

July 9, 2013 | Filed under: Featured, Java, JavaFX, VRL and tagged with: graph, JavaFX, JavaFX 8, JFXtras, visual programming, VRL, VRL-Studio, VWorkflows, window control, Window Node, workflow, workflows

UPDATE [23.05.2014]: This tutorial has been updated to work with recent versions of VWorkflows.

In the last three parts of the tutorial VWorkflows did only handle one input/output per node. However, for many use cases it is necessary to handle multiple connectors per node (see Issue 3). This tutorial is shows lots of amazing features!

Feedback

Thanks for your motivating feedback!

For those of you who have asked me about custom node content: I’m working on a tutorial. Stay tuned! & follow me on Twitter.

If you’d like to contribute or if you want to ask questions about VRL, VWorkflows and other related projects join the Developer & User groups:

  • Developer Group: https://groups.google.com/forum/#!forum/vrl-developers
  • User Group: https://groups.google.com/forum/#!forum/vrl-studio-users

UI Improvements

The JavaFX based UI has been heavily improved. It makes use of the new multi-connector API (see below).

Multiple Connectors

  • multiple connectors per node: each node can have an arbitrary number of input and output connectors
Multiple Connectors 01

Multiple Connectors 01

  • dynamic connector size: connector size changes dynamically (depending on node size and the number of connectors)

Usability Improvements

  • improved compatibility visualization: connections indicate if they are compatible, i.e., if the connection the user is trying to establish will be accepted

  • subflow icon: flows have a new icon that allows to create subviews, i.e., a window that shows the flow content in a separate window. this feature is great to interactively change complex workflows

New Multi-Connector API

To be able to handle complex workflows/graphs the model has been extended to allow the definition of arbitrary many inputs and outputs. Instead of the previous

n.addInput("type");
n.addOutput("type");

connectors are now added by calling

Connector c1 = n.addInput("type1");
Connector c2 = n.addOutput("type1");

// adding a second input&output
Connector c3 = n.addInput("type2");
Connector c4 = n.addOutput("type2");

This is how the node will look like:

Defining Multiple Connectors

Defining Multiple Connectors

As you can see there is a new Connector interface. A connector knows its type, keeps a reference to the node it belongs to and has an id:

// returns the node this connector belongs to
c1.getNode();

// returns the global connector id (unique per flow)
c1.getId();

// returns the local connector id (id is unique per node)
c1.getLocalId()

// returns the type of the connector
c1.getType()

The API for connecting nodes has been extended. Here is an example (we assume flow and nodes n1 and n2 have been created):

// adding output to n1
Connector c1 = n1.addOutput("type");

// adding input to n2
Connector c2 = n2.addInput("type");

// creating connection between n1 and n2
Connection connection = flow.connect(c1,c2)

In addition each node can have one main input and output per type. This allows to directly connect two nodes without the need to explicitly specify the connectors. The UI can use this to resemble the previous connection behavior (before the multi in/out implementation).

Demo application

Download the tutorial code from GitHub

Requirements:

  • Java 8
  • Optional: Netbeans >=7.4 with Gradle Plugin

Building & Running:

To compile from the command line just type ./gradlew build. Run it with ./gradlew run.

Next steps

Download VWorkflows and create your own flow visualization apps/controls.

Stay tuned and follow me on Twitter

To be continued…

Update: here is part 5

Did you like this article? Share it with your friends!

Tweet

Written by admin

Visit my Website Follow me on Twitter

8 Responses to "[Part 4] VWorkflows & Multiple Inputs/Outputs"

  1. Gosh says:
    July 9, 2013 at 09:49

    Very nice Work. I like it. But how you can chance the content with own content inside the node? For example with a XY Controll inside.

    1. miho says:
      July 9, 2013 at 10:09

      This will be part of the next tutorial. In short: extend the factory.

      Michael

  2. JavaFX links of the week, July 15 // JavaFX News, Demos and Insight // FX Experience says:
    July 14, 2013 at 23:55

    […] has put up part four of his ‘VWorkflows & Multiple Inputs/Outputs‘ […]

  3. Java desktop links of the week, July 15 « Jonathan Giles says:
    July 14, 2013 at 23:55

    […] has put up part four of his ‘VWorkflows & Multiple Inputs/Outputs‘ […]

  4. Aloys Oberthuer says:
    July 15, 2013 at 09:52

    I cannot view the video (from Germany) – it says the video is private and I need access granted… Would really be interested 😉

    1. miho says:
      July 15, 2013 at 10:07

      My fault. It should work now.

      Michael

  5. yavuz says:
    January 6, 2014 at 21:43

    I do want to combine my own windows. How do I connect them? which api should I look at? could you help me…is very urgent..

    1. miho says:
      January 7, 2014 at 22:23

      The tutorial shows how to create connections between nodes/windows. What exactly do you need?

Comments are closed.

Pages

  • About
  • Datenschutz
  • Impressum
  • Seminar 2019

Categories

  • 3D Printing
  • Any-Key
  • Art
  • C/C++
  • Devoxx
  • Digital Painting
  • Featured
  • IoT
  • Java
  • JavaFX
  • Javakurs 2015
  • JavaOne
  • Linux
  • Linux on Apple Hardware
  • Linux: Daily Usage Tips
  • Mobile Apps
  • Mobile Devices
  • Programming Languages
  • Repair Things
  • Science
  • Sonos
  • Teaching
  • Uncategorized
  • Virtual Reality
  • VRL

Tags

3D 3D Printing 3d visualization AirSonos Apple Music Devoxx Devoxx 2013 gradle graph iOS Java Java 8 JavaFX JavaFX 8 JavaOne JavaOne 2013 jdk9 JFXtras JInternalFrame Linux MacBook MDI mobile apps OpenDive OpenJDK OpenJFX Open Source Performance scientific visualization SonoAir Sonos Ultimaker Virtual Reality Virtual World visual programming VPlot VRL VRL-Studio VWorkflows window control Window Node Window System workflow workflows X11

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

JavaOne Rockstar

JavaOne Rockstar
Follow @mihosoft

Recent Posts

  • Native JDK9 Application Bundles
  • Running C code from Java via VTCC
  • SonoAir finally supports macOS High Sierra!
  • JavaOne 2017 Community Keynote Artwork
  • The JGrounds App: better teaching apps for Java 9 [BOF5047]

Recent Comments

  • ¿Ventanas completamente personalizadas de JavaFX? - Fallosweb.com on VFXWindows
  • JavaFX entirely customized windows? – w3toppers.com on VFXWindows
  • Volel Mondesir on Adding Custom Icons to JFXtras Window Control (VFXWindows)
  • Volel Mondesir on Adding Custom Icons to JFXtras Window Control (VFXWindows)
  • Switching between different JDK versions in Windows - ErrorsFixing on JSelect: switch between different JDK versions

Archives

  • February 2018
  • October 2017
  • September 2017
  • February 2017
  • June 2016
  • May 2016
  • November 2015
  • September 2015
  • July 2015
  • March 2015
  • September 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • November 2010
  • February 2010
  • November 2009
  • October 2009
  • February 2009
  • August 2008
  • May 2008
  • April 2008
  • March 2008
Privacy & Cookies: this site uses cookies. By continuing to use this website, you agree to their use.
To find out more, see here: Impressum & Datenschutz

© 2025 mihosoft.eu