[英]Drag and drop widgets in Java 2D
Is there any material/tutorials available that can shed some light on creating drap and drop widgets with Java 2D? 是否有任何可用的材料/教程可以阐明如何使用Java 2D创建拖放的小部件? I am not talking about drag and drop data transfer like here .
我不是在这里谈论拖放数据传输。 What I want to do is have a visual pane in my application, where users can create widgets, connect them to each other etc. Something like a creating a graph, but with widgets that have properties.
我想要做的是在应用程序中有一个可视窗格,用户可以在其中创建小部件,将它们彼此连接等。类似于创建图形,但具有具有属性的小部件。
Thanks. 谢谢。
This is generally works like this: 这通常是这样的:
The simple illustration for this might be a program I was writing in my youth - interactive chess board. 一个简单的例子可能是我年轻时编写的程序-交互式棋盘。 Here is relevant class that includes pieces dragging capabilities http://jinyan.svn.sourceforge.net/viewvc/jinyan/trunk/jinyan/client/src/net/sfficslecview/lvboard/EditableChessBoard.java?revision=77&view=markup
这是相关的类,其中包括片段拖动功能http://jinyan.svn.sourceforge.net/viewvc/jinyan/trunk/jinyan/client/src/net/sfficslecview/lvboard/EditableChessBoard.java?revision=77&view=markup
I have found the perfect solution. 我找到了完美的解决方案。 I can make use of the Netbeans Visual Library by extracting jar from the Netbeans Platform.
我可以通过从Netbeans平台提取jar来利用Netbeans可视库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.