Sample for Visual Library API

The 6.0 Simpsons sample for NetBeans Visual Library API is available in the Plugin Portal. The changes are quite small, but big enough to warrant a new version of the sample. Many aspects of the Visual Library API are dealt with and there are quite a few comments within the code to explain what is going on.

Make sure you get the latest and greatest version of the sample, which, since yesterday, is 1.2. Now it is possible to switch from 'Selection mode' to 'Connection mode'. Simply hold down the Ctrl key (instead of right-clicking, as the instruction at the top of the display area tells you, which I need to update) and then drag one of the dropped icons. When you do so, you will see that you will be able to connect the icons together:

That's 'Connection mode'. If you do not hold down the Ctrl key, you will be in 'Selection mode', where drag gestures result in the dropped icon being moved in the scene, instead of getting connected to each other. Thanks to David Kaspar for getting this working in 6.0. Go here to download the sample.

Comments:

Hello! Stumbled over your blog locking for help with netbeans. Maybe you can help me?:)
I want to connet to JButtons.. the first button is "Power" and the next "button", this is for describing that power is a button. do you know how to make this connection?

Posted by mari on March 15, 2009 at 10:31 PM PDT #

Question how do you disable a node in the palette after its dropped in the scene? Ex. Bart is not a node then its dropped then it is a node. I know it has something to do with the

if( !isNode(data.getComment)){

ConnectorState.Accept
} else {

ConnectorState.Reject
}

I guess my question is how to u register a node after its dropped. You can email me with answers....thanks

Posted by Tony on June 09, 2009 at 04:05 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today