use of blue.udo.UserDefinedOpcode in project blue by kunstmusik.
the class UDORepositoryBrowser method addUDOtoOpcodeList.
/**
*/
protected void addUDOtoOpcodeList() {
UserDefinedOpcode udo = udoDisplayPanel.getUDO();
if (opcodeList == null || udo == null) {
return;
}
this.opcodeList.addOpcode(udo);
}
use of blue.udo.UserDefinedOpcode in project blue by kunstmusik.
the class UDOTreeDragSource method dragGestureRecognized.
@Override
public void dragGestureRecognized(DragGestureEvent dge) {
TreePath path = sourceTree.getSelectionPath();
if ((path == null) || (path.getPathCount() <= 1)) {
// We can't really move the root node (or an empty selection).
return;
}
if (path.getLastPathComponent() instanceof UserDefinedOpcode || path.getLastPathComponent() instanceof UDOCategory) {
oldNode = path.getLastPathComponent();
Object cloneNode;
if (oldNode instanceof UserDefinedOpcode) {
cloneNode = new UserDefinedOpcode((UserDefinedOpcode) oldNode);
} else {
cloneNode = new UDOCategory((UDOCategory) oldNode);
}
transferable = new TransferableUDO(cloneNode);
source.startDrag(dge, null, transferable, this);
DragManager.setDragSource(sourceTree);
}
}
Aggregations