use of org.apache.cayenne.modeler.action.dbimport.MoveInvertNodeAction in project cayenne by apache.
the class DraggableTreePanel method initElement.
private void initElement() {
sourceTree.setDragEnabled(true);
sourceTree.setCellRenderer(new ColorTreeRenderer());
sourceTree.setDropMode(DropMode.INSERT);
MoveImportNodeAction action = projectController.getApplication().getActionManager().getAction(MoveImportNodeAction.class);
action.setPanel(this);
action.setSourceTree(sourceTree);
action.setTargetTree(targetTree);
moveButton = (CayenneAction.CayenneToolbarButton) action.buildButton();
moveButton.setShowingText(true);
moveButton.setText(MOVE_BUTTON_LABEL);
MoveInvertNodeAction actionInv = projectController.getApplication().getActionManager().getAction(MoveInvertNodeAction.class);
actionInv.setPanel(this);
actionInv.setSourceTree(sourceTree);
actionInv.setTargetTree(targetTree);
moveInvertButton = (CayenneAction.CayenneToolbarButton) actionInv.buildButton();
moveInvertButton.setShowingText(true);
moveInvertButton.setText(MOVE_INV_BUTTON_LABEL);
DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) sourceTree.getCellRenderer();
renderer.setLeafIcon(null);
renderer.setClosedIcon(null);
renderer.setOpenIcon(null);
}
Aggregations