2008.01.20 : 学习DocumentEditorView例子:
定位 netbeans platform中的action并加以调用方法:
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(documenteditor.DocumentEditorApp.class).getContext().getActionMap(DocumentEditorView.class, this);
发现drop的简便模式:(MyFirstPalatte中发现)
dropPanel.setDropTarget( new DropTarget( dropPanel, new DropTargetListener() {
public void dragEnter(DropTargetDragEvent dtde) {
doDragOver( dtde );
}
public void dragExit(DropTargetEvent dte) {
}
public void dragOver(DropTargetDragEvent dtde) {
doDragOver( dtde );
}
public void drop(DropTargetDropEvent dtde) {
doDrop( dtde );
}
public void dropActionChanged(DropTargetDragEvent dtde) {
}
}) );
Netbeans palatte 的tutorial:
http://platform.netbeans.org/tutorials/nbm-palette-api3.htm
定位 netbeans platform中的action并加以调用方法:
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(documenteditor.DocumentEditorApp.class).getContext().getActionMap(DocumentEditorView.class, this);
发现drop的简便模式:(MyFirstPalatte中发现)
dropPanel.setDropTarget( new DropTarget( dropPanel, new DropTargetListener() {
public void dragEnter(DropTargetDragEvent dtde) {
doDragOver( dtde );
}
public void dragExit(DropTargetEvent dte) {
}
public void dragOver(DropTargetDragEvent dtde) {
doDragOver( dtde );
}
public void drop(DropTargetDropEvent dtde) {
doDrop( dtde );
}
public void dropActionChanged(DropTargetDragEvent dtde) {
}
}) );
Netbeans palatte 的tutorial:
http://platform.netbeans.org/tutorials/nbm-palette-api3.htm