widget.Image(node.getImage);
widget.Label(Long.toString(node.hashCode));
//double-click, the event is consumed while double-clicking only:
widget.getLabelWidget.getActions.addAction(editorAction);
//single-click, the event is not consumed:
widget.getActions.addAction(createSelectAction);
//mouse-dragged, the event is consumed while mouse is dragged:
widget.getActions.addAction(ActionFactory.createMoveAction);
//mouse-over, the event is consumed while the mouse is over the widget:
widget.getActions.addAction(createObjectHoverAction);
Layer.addChild(widget);
widget;
}
Install and try out the module again. As shown at the start of this section, when you hover over a widget's label, or when you select it, its color will change. Also, when you click on a label, you are able to edit its content.
Congratulations, you have completed the Visual Library 2.0 Tutorial for NetBeans 6.0.
最新评论