operationsMenu.addItem(IEngine.CLEAR, getClearCommand());
addPreviewMenuItem(operationsMenu);
return operationsMenu;
}
private MenuBar getEditItems(List<String> operationsList) {
MenuBar editMenu = new MenuBar(true);
DOM.setStyleAttribute(editMenu.getElement(), "zIndex", Integer.toString(Integer.MAX_VALUE));
editMenu.setFocusOnHoverEnabled(false);
editMenu.setStyleName("vkgwtdesigner-vertical-menu");
undoItem = editMenu.addItem("Undo(Ctrl+Z)", getUndoCommand());
redoItem = editMenu.addItem("Redo(Ctrl+Y)", getRedoCommand());
refreshUndoRedo();
editMenu.addItem(IEngine.CUT + "(Ctrl+X)", getCutCommand()).setEnabled(operationsList.indexOf(IEngine.CUT) > -1);
editMenu.addItem(IEngine.COPY + "(Ctrl+C)", getCopyCommand()).setEnabled(operationsList.indexOf(IEngine.COPY) > -1);
editMenu.addItem(IEngine.PASTE + "(Ctrl+V)", getPasteCommand()).setEnabled(operationsList.indexOf(IEngine.PASTE) > -1 && VkStateHelper.getInstance().getClipBoardHelper().isPasteWidgetPossible());
editMenu.addItem(IEngine.COPY_STYLE + "(Ctrl+Shift+C)", getCopyStyleCommand()).setEnabled(operationsList.indexOf(IEngine.COPY_STYLE) > -1);;
editMenu.addItem(IEngine.PASTE_STYLE + "(Ctrl+Shift+V)", getPasteStyleCommand()).setEnabled(operationsList.indexOf(IEngine.PASTE_STYLE) > -1
&& VkStateHelper.getInstance().getClipBoardHelper().isPasteStylePossible());
boolean isMoveEnabled = operationsList.indexOf(IEngine.MOVE) > -1;
editMenu.addItem(IEngine.MOVE, getMoveCommand()).setEnabled(isMoveEnabled);
/*editMenu.addItem(IEngine.MOVE + "-Right(Right arrow)", getMoveRightCommand()).setEnabled(isMoveEnabled);
editMenu.addItem(IEngine.MOVE + "-Left(Left arrow)", getMoveLeftCommand()).setEnabled(isMoveEnabled);
editMenu.addItem(IEngine.MOVE + "-Up(Up arrow)", getMoveUpCommand()).setEnabled(isMoveEnabled);
editMenu.addItem(IEngine.MOVE + "-Down(Down arrow)", getMoveDownCommand()).setEnabled(isMoveEnabled);*/
boolean isResizeEnabled = operationsList.indexOf(IEngine.RESIZE) > -1;
editMenu.addItem(IEngine.RESIZE , getResizeCommand()).setEnabled(isResizeEnabled);
/*editMenu.addItem(IEngine.RESIZE + "-Right(Ctrl + Right arrow)", getResizeRightCommand()).setEnabled(isResizeEnabled);
editMenu.addItem(IEngine.RESIZE + "-Left(Ctrl + Left arrow)", getResizeLeftCommand()).setEnabled(isResizeEnabled);
editMenu.addItem(IEngine.RESIZE + "-Up(Ctrl + Up arrow)", getResizeUpCommand()).setEnabled(isResizeEnabled);
editMenu.addItem(IEngine.RESIZE + "-Down(Ctrl + Down arrow)", getResizeDownCommand()).setEnabled(isResizeEnabled);*/
MenuItem item = editMenu.addItem(IEngine.DELETE + "(Del)", getRemoveCommand());
item.setEnabled(operationsList.indexOf(IEngine.DELETE) > -1);
return editMenu;
}