Пример #1
0
 /** Move the currently selected element (if any) down in its structure. */
 public void moveSelectedElementDown() {
   TreePath tp = tree.getSelectionPath();
   Object select = tp.getLastPathComponent();
   if (select instanceof RuleWrapper) {
     LegendTreeModel tm = (LegendTreeModel) tree.getModel();
     tm.moveElementDown(tm.getRoot(), select);
     refreshIcons();
   } else if (select instanceof ILegendPanel) {
     RuleWrapper rw = (RuleWrapper) tp.getPath()[tp.getPath().length - 2];
     LegendTreeModel tm = (LegendTreeModel) tree.getModel();
     tm.moveElementDown(rw, select);
     refreshIcons();
   }
 }