/** * Get the parent table * * @return Return the parent table */ private Object getTableParent() { DesignElementHandle parent = handle.getContainer(); while (parent != null) { if (parent instanceof TableHandle || parent instanceof GridHandle) { return parent; } parent = parent.getContainer(); } return null; }
/** * Check whether the command can be executed or not * * @return true or false */ public boolean canExecute() { return super.canExecute() && handle.canDrop(); }