mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Ability to rotate selection
This commit is contained in:
Binary file not shown.
Binary file not shown.
+22
-16
@@ -15,24 +15,30 @@ import javax.swing.ImageIcon;
|
|||||||
*/
|
*/
|
||||||
public enum IconLoader {
|
public enum IconLoader {
|
||||||
|
|
||||||
Delete("delete.png"), Add("add.png"), FolderOut("folder_out.png"), Garbage("garbage.png"), DiskBlue(
|
Delete("delete.png"), Add("add.png"), FolderOut("folder_out.png"), Garbage(
|
||||||
"disk_blue.png"), SaveAs("save_as.png"), Exit("exit.png"), DocumentPlainYellow(
|
"garbage.png"), DiskBlue("disk_blue.png"), SaveAs("save_as.png"), Exit(
|
||||||
"document_plain_yellow.png"), PhotoScenery("photo_scenery.png"), LightBulbOn(
|
"exit.png"), DocumentPlainYellow("document_plain_yellow.png"), PhotoScenery(
|
||||||
"lightbulb_on.png"), LightBulbOff("lightbulb_off.png"), NotebookAdd("notebook_add.png"), FormGreen(
|
"photo_scenery.png"), LightBulbOn("lightbulb_on.png"), LightBulbOff(
|
||||||
|
"lightbulb_off.png"), NotebookAdd("notebook_add.png"), FormGreen(
|
||||||
"form_green.png"), Gears("gears.png"), About("about.png"), WindowColors(
|
"form_green.png"), Gears("gears.png"), About("about.png"), WindowColors(
|
||||||
"window_colors.png"), WindowGear("window_gear.png"), NavigateCheck("navigate_check.png"), Undo(
|
"window_colors.png"), WindowGear("window_gear.png"), NavigateCheck(
|
||||||
"undo.png"), Error("error.png"), Warning("warning.png"), ZoomSmall("zoom_small.png"), MoveSmall(
|
"navigate_check.png"), Undo("undo.png"), Error("error.png"), Warning(
|
||||||
"move_small.png"), Print("print.png"), PDF("pdf.png"), Excel("excel.png"), CSV(
|
"warning.png"), ZoomSmall("zoom_small.png"), MoveSmall(
|
||||||
"csv.png"), HTML("html.png"), Image("image.png"), Cut("cut.png"), Copy("copy.png"), Paste(
|
"move_small.png"), Print("print.png"), PDF("pdf.png"), Excel(
|
||||||
"paste.png"), Selection("selection.png"), BOM("bom.png"), BlackBoard("blackboard.png"), IdCard(
|
"excel.png"), CSV("csv.png"), HTML("html.png"), Image("image.png"), Cut(
|
||||||
"id_card.png"), IdCardAdd("id_card_add.png"), Chest("chest.png"), Upload("upload.png"), Wrench(
|
"cut.png"), Copy("copy.png"), Paste("paste.png"), Selection(
|
||||||
"wrench.png"), Group("group.png"), Ungroup("ungroup.png"), TraceMask("trace_mask.png"), Faq(
|
"selection.png"), BOM("bom.png"), BlackBoard("blackboard.png"), IdCard(
|
||||||
"faq.png"), Component("component.png"), Plugin("plugin.png"), Manual("manual.png"), Donate(
|
"id_card.png"), IdCardAdd("id_card_add.png"), Chest("chest.png"), Upload(
|
||||||
|
"upload.png"), Wrench("wrench.png"), Group("group.png"), Ungroup(
|
||||||
|
"ungroup.png"), TraceMask("trace_mask.png"), Faq("faq.png"), Component(
|
||||||
|
"component.png"), Plugin("plugin.png"), Manual("manual.png"), Donate(
|
||||||
"donate.png"), Bug("bug.png"), IconLarge("icon_large.png"), IconMedium(
|
"donate.png"), Bug("bug.png"), IconLarge("icon_large.png"), IconMedium(
|
||||||
"icon_medium.png"), IconSmall("icon_small.png"), DocumentEdit("document_edit.png"), EditComponent(
|
"icon_medium.png"), IconSmall("icon_small.png"), DocumentEdit(
|
||||||
"edit_component.png"), Size("size.png"), Front("front.png"), Back("back.png"), Pens(
|
"document_edit.png"), EditComponent("edit_component.png"), Size(
|
||||||
"pens.png"), Sort("sort.png"), ElementsSelection("elements_selection.png"), BranchAdd(
|
"size.png"), Front("front.png"), Back("back.png"), Pens("pens.png"), Sort(
|
||||||
"branch_add.png"), Briefcase_Add("briefcase_add.png");
|
"sort.png"), ElementsSelection("elements_selection.png"), BranchAdd(
|
||||||
|
"branch_add.png"), Briefcase_Add("briefcase_add.png"), RotateCW(
|
||||||
|
"rotate_cw.png"), RotateCCW("rotate_ccw.png");
|
||||||
|
|
||||||
protected String name;
|
protected String name;
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 760 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 760 B |
+38
@@ -142,6 +142,11 @@ public class ActionFactory {
|
|||||||
return new ExpandSelectionAction(plugInPort, expansionMode);
|
return new ExpandSelectionAction(plugInPort, expansionMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RotateSelectionAction createRotateSelectionAction(
|
||||||
|
IPlugInPort plugInPort, int direction) {
|
||||||
|
return new RotateSelectionAction(plugInPort, direction);
|
||||||
|
}
|
||||||
|
|
||||||
public SendToBackAction createSendToBackAction(IPlugInPort plugInPort) {
|
public SendToBackAction createSendToBackAction(IPlugInPort plugInPort) {
|
||||||
return new SendToBackAction(plugInPort);
|
return new SendToBackAction(plugInPort);
|
||||||
}
|
}
|
||||||
@@ -871,6 +876,39 @@ public class ActionFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class RotateSelectionAction extends AbstractAction {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private IPlugInPort plugInPort;
|
||||||
|
private int direction;
|
||||||
|
|
||||||
|
public RotateSelectionAction(IPlugInPort plugInPort, int direction) {
|
||||||
|
super();
|
||||||
|
this.plugInPort = plugInPort;
|
||||||
|
this.direction = direction;
|
||||||
|
if (direction > 0) {
|
||||||
|
putValue(AbstractAction.NAME, "Rotate Clockwise");
|
||||||
|
putValue(AbstractAction.SMALL_ICON, IconLoader.RotateCW
|
||||||
|
.getIcon());
|
||||||
|
putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke
|
||||||
|
.getKeyStroke(KeyEvent.VK_RIGHT, ActionEvent.ALT_MASK));
|
||||||
|
} else {
|
||||||
|
putValue(AbstractAction.NAME, "Rotate Counterclockwise");
|
||||||
|
putValue(AbstractAction.SMALL_ICON, IconLoader.RotateCCW
|
||||||
|
.getIcon());
|
||||||
|
putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke
|
||||||
|
.getKeyStroke(KeyEvent.VK_LEFT, ActionEvent.ALT_MASK));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
LOG.info("Rotate Selection triggered: " + direction);
|
||||||
|
plugInPort.rotateSelection(direction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static class SendToBackAction extends AbstractAction {
|
public static class SendToBackAction extends AbstractAction {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
+18
@@ -67,6 +67,8 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
private ActionFactory.ExpandSelectionAction expandSelectionAllAction;
|
private ActionFactory.ExpandSelectionAction expandSelectionAllAction;
|
||||||
private ActionFactory.ExpandSelectionAction expandSelectionImmediateAction;
|
private ActionFactory.ExpandSelectionAction expandSelectionImmediateAction;
|
||||||
private ActionFactory.ExpandSelectionAction expandSelectionSameTypeAction;
|
private ActionFactory.ExpandSelectionAction expandSelectionSameTypeAction;
|
||||||
|
private ActionFactory.RotateSelectionAction rotateClockwiseAction;
|
||||||
|
private ActionFactory.RotateSelectionAction rotateCounterclockwiseAction;
|
||||||
|
|
||||||
private IPlugInPort plugInPort;
|
private IPlugInPort plugInPort;
|
||||||
private ISwingUI swingUI;
|
private ISwingUI swingUI;
|
||||||
@@ -246,6 +248,8 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
popupMenu.addSeparator();
|
popupMenu.addSeparator();
|
||||||
popupMenu.add(getEditSelectionAction());
|
popupMenu.add(getEditSelectionAction());
|
||||||
popupMenu.add(getDeleteSelectionAction());
|
popupMenu.add(getDeleteSelectionAction());
|
||||||
|
popupMenu.add(getRotateClockwiseAction());
|
||||||
|
popupMenu.add(getRotateCounterclockwiseAction());
|
||||||
popupMenu.add(getGroupAction());
|
popupMenu.add(getGroupAction());
|
||||||
popupMenu.add(getUngroupAction());
|
popupMenu.add(getUngroupAction());
|
||||||
popupMenu.add(getSendToBackAction());
|
popupMenu.add(getSendToBackAction());
|
||||||
@@ -337,6 +341,20 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
}
|
}
|
||||||
return deleteSelectionAction;
|
return deleteSelectionAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ActionFactory.RotateSelectionAction getRotateClockwiseAction() {
|
||||||
|
if (rotateClockwiseAction == null) {
|
||||||
|
rotateClockwiseAction = ActionFactory.getInstance().createRotateSelectionAction(plugInPort, 1);
|
||||||
|
}
|
||||||
|
return rotateClockwiseAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionFactory.RotateSelectionAction getRotateCounterclockwiseAction() {
|
||||||
|
if (rotateCounterclockwiseAction == null) {
|
||||||
|
rotateCounterclockwiseAction = ActionFactory.getInstance().createRotateSelectionAction(plugInPort, -1);
|
||||||
|
}
|
||||||
|
return rotateCounterclockwiseAction;
|
||||||
|
}
|
||||||
|
|
||||||
public ActionFactory.SaveAsTemplateAction getSaveAsTemplateAction() {
|
public ActionFactory.SaveAsTemplateAction getSaveAsTemplateAction() {
|
||||||
if (saveAsTemplateAction == null) {
|
if (saveAsTemplateAction == null) {
|
||||||
|
|||||||
+71
-30
@@ -45,6 +45,8 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
private ActionFactory.ExpandSelectionAction expandSelectionImmediateAction;
|
private ActionFactory.ExpandSelectionAction expandSelectionImmediateAction;
|
||||||
private ActionFactory.ExpandSelectionAction expandSelectionSameTypeAction;
|
private ActionFactory.ExpandSelectionAction expandSelectionSameTypeAction;
|
||||||
private ActionFactory.SaveAsTemplateAction saveAsTemplateAction;
|
private ActionFactory.SaveAsTemplateAction saveAsTemplateAction;
|
||||||
|
private ActionFactory.RotateSelectionAction rotateClockwiseAction;
|
||||||
|
private ActionFactory.RotateSelectionAction rotateCounterClockwiseAction;
|
||||||
|
|
||||||
private UndoHandler<Project> undoHandler;
|
private UndoHandler<Project> undoHandler;
|
||||||
|
|
||||||
@@ -77,64 +79,72 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
|
|
||||||
public ActionFactory.CutAction getCutAction() {
|
public ActionFactory.CutAction getCutAction() {
|
||||||
if (cutAction == null) {
|
if (cutAction == null) {
|
||||||
cutAction = ActionFactory.getInstance().createCutAction(plugInPort, clipboard, this);
|
cutAction = ActionFactory.getInstance().createCutAction(plugInPort,
|
||||||
|
clipboard, this);
|
||||||
}
|
}
|
||||||
return cutAction;
|
return cutAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.CopyAction getCopyAction() {
|
public ActionFactory.CopyAction getCopyAction() {
|
||||||
if (copyAction == null) {
|
if (copyAction == null) {
|
||||||
copyAction = ActionFactory.getInstance().createCopyAction(plugInPort, clipboard, this);
|
copyAction = ActionFactory.getInstance().createCopyAction(
|
||||||
|
plugInPort, clipboard, this);
|
||||||
}
|
}
|
||||||
return copyAction;
|
return copyAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.PasteAction getPasteAction() {
|
public ActionFactory.PasteAction getPasteAction() {
|
||||||
if (pasteAction == null) {
|
if (pasteAction == null) {
|
||||||
pasteAction = ActionFactory.getInstance().createPasteAction(plugInPort, clipboard);
|
pasteAction = ActionFactory.getInstance().createPasteAction(
|
||||||
|
plugInPort, clipboard);
|
||||||
}
|
}
|
||||||
return pasteAction;
|
return pasteAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.EditSelectionAction getEditSelectionAction() {
|
public ActionFactory.EditSelectionAction getEditSelectionAction() {
|
||||||
if (editSelectionAction == null) {
|
if (editSelectionAction == null) {
|
||||||
editSelectionAction = ActionFactory.getInstance().createEditSelectionAction(plugInPort);
|
editSelectionAction = ActionFactory.getInstance()
|
||||||
|
.createEditSelectionAction(plugInPort);
|
||||||
}
|
}
|
||||||
return editSelectionAction;
|
return editSelectionAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.DeleteSelectionAction getDeleteSelectionAction() {
|
public ActionFactory.DeleteSelectionAction getDeleteSelectionAction() {
|
||||||
if (deleteSelectionAction == null) {
|
if (deleteSelectionAction == null) {
|
||||||
deleteSelectionAction = ActionFactory.getInstance().createDeleteSelectionAction(
|
deleteSelectionAction = ActionFactory.getInstance()
|
||||||
plugInPort);
|
.createDeleteSelectionAction(plugInPort);
|
||||||
}
|
}
|
||||||
return deleteSelectionAction;
|
return deleteSelectionAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.GroupAction getGroupAction() {
|
public ActionFactory.GroupAction getGroupAction() {
|
||||||
if (groupAction == null) {
|
if (groupAction == null) {
|
||||||
groupAction = ActionFactory.getInstance().createGroupAction(plugInPort);
|
groupAction = ActionFactory.getInstance().createGroupAction(
|
||||||
|
plugInPort);
|
||||||
}
|
}
|
||||||
return groupAction;
|
return groupAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.UngroupAction getUngroupAction() {
|
public ActionFactory.UngroupAction getUngroupAction() {
|
||||||
if (ungroupAction == null) {
|
if (ungroupAction == null) {
|
||||||
ungroupAction = ActionFactory.getInstance().createUngroupAction(plugInPort);
|
ungroupAction = ActionFactory.getInstance().createUngroupAction(
|
||||||
|
plugInPort);
|
||||||
}
|
}
|
||||||
return ungroupAction;
|
return ungroupAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.SendToBackAction getSendToBackAction() {
|
public ActionFactory.SendToBackAction getSendToBackAction() {
|
||||||
if (sendToBackAction == null) {
|
if (sendToBackAction == null) {
|
||||||
sendToBackAction = ActionFactory.getInstance().createSendToBackAction(plugInPort);
|
sendToBackAction = ActionFactory.getInstance()
|
||||||
|
.createSendToBackAction(plugInPort);
|
||||||
}
|
}
|
||||||
return sendToBackAction;
|
return sendToBackAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.BringToFrontAction getBringToFrontAction() {
|
public ActionFactory.BringToFrontAction getBringToFrontAction() {
|
||||||
if (bringToFrontAction == null) {
|
if (bringToFrontAction == null) {
|
||||||
bringToFrontAction = ActionFactory.getInstance().createBringToFrontAction(plugInPort);
|
bringToFrontAction = ActionFactory.getInstance()
|
||||||
|
.createBringToFrontAction(plugInPort);
|
||||||
}
|
}
|
||||||
return bringToFrontAction;
|
return bringToFrontAction;
|
||||||
}
|
}
|
||||||
@@ -149,43 +159,62 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
|
|
||||||
public ActionFactory.RenumberAction getRenumberYAxisAction() {
|
public ActionFactory.RenumberAction getRenumberYAxisAction() {
|
||||||
if (renumberYAxisAction == null) {
|
if (renumberYAxisAction == null) {
|
||||||
renumberYAxisAction = ActionFactory.getInstance().createRenumberAction(plugInPort,
|
renumberYAxisAction = ActionFactory.getInstance()
|
||||||
false);
|
.createRenumberAction(plugInPort, false);
|
||||||
}
|
}
|
||||||
return renumberYAxisAction;
|
return renumberYAxisAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.ExpandSelectionAction getExpandSelectionAllAction() {
|
public ActionFactory.ExpandSelectionAction getExpandSelectionAllAction() {
|
||||||
if (expandSelectionAllAction == null) {
|
if (expandSelectionAllAction == null) {
|
||||||
expandSelectionAllAction = ActionFactory.getInstance().createExpandSelectionAction(
|
expandSelectionAllAction = ActionFactory.getInstance()
|
||||||
plugInPort, ExpansionMode.ALL);
|
.createExpandSelectionAction(plugInPort, ExpansionMode.ALL);
|
||||||
}
|
}
|
||||||
return expandSelectionAllAction;
|
return expandSelectionAllAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.ExpandSelectionAction getExpandSelectionImmediateAction() {
|
public ActionFactory.ExpandSelectionAction getExpandSelectionImmediateAction() {
|
||||||
if (expandSelectionImmediateAction == null) {
|
if (expandSelectionImmediateAction == null) {
|
||||||
expandSelectionImmediateAction = ActionFactory.getInstance().createExpandSelectionAction(
|
expandSelectionImmediateAction = ActionFactory.getInstance()
|
||||||
plugInPort, ExpansionMode.IMMEDIATE);
|
.createExpandSelectionAction(plugInPort,
|
||||||
|
ExpansionMode.IMMEDIATE);
|
||||||
}
|
}
|
||||||
return expandSelectionImmediateAction;
|
return expandSelectionImmediateAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.ExpandSelectionAction getExpandSelectionSameTypeAction() {
|
public ActionFactory.ExpandSelectionAction getExpandSelectionSameTypeAction() {
|
||||||
if (expandSelectionSameTypeAction == null) {
|
if (expandSelectionSameTypeAction == null) {
|
||||||
expandSelectionSameTypeAction = ActionFactory.getInstance().createExpandSelectionAction(
|
expandSelectionSameTypeAction = ActionFactory.getInstance()
|
||||||
plugInPort, ExpansionMode.SAME_TYPE);
|
.createExpandSelectionAction(plugInPort,
|
||||||
|
ExpansionMode.SAME_TYPE);
|
||||||
}
|
}
|
||||||
return expandSelectionSameTypeAction;
|
return expandSelectionSameTypeAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionFactory.SaveAsTemplateAction getSaveAsTemplateAction() {
|
public ActionFactory.SaveAsTemplateAction getSaveAsTemplateAction() {
|
||||||
if (saveAsTemplateAction == null) {
|
if (saveAsTemplateAction == null) {
|
||||||
saveAsTemplateAction = ActionFactory.getInstance().createSaveAsTemplateAction(plugInPort);
|
saveAsTemplateAction = ActionFactory.getInstance()
|
||||||
|
.createSaveAsTemplateAction(plugInPort);
|
||||||
}
|
}
|
||||||
return saveAsTemplateAction;
|
return saveAsTemplateAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ActionFactory.RotateSelectionAction getRotateClockwiseAction() {
|
||||||
|
if (rotateClockwiseAction == null) {
|
||||||
|
rotateClockwiseAction = ActionFactory.getInstance()
|
||||||
|
.createRotateSelectionAction(plugInPort, 1);
|
||||||
|
}
|
||||||
|
return rotateClockwiseAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionFactory.RotateSelectionAction getRotateCounterclockwiseAction() {
|
||||||
|
if (rotateCounterClockwiseAction == null) {
|
||||||
|
rotateCounterClockwiseAction = ActionFactory.getInstance()
|
||||||
|
.createRotateSelectionAction(plugInPort, -1);
|
||||||
|
}
|
||||||
|
return rotateCounterClockwiseAction;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void connect(IPlugInPort plugInPort) {
|
public void connect(IPlugInPort plugInPort) {
|
||||||
this.plugInPort = plugInPort;
|
this.plugInPort = plugInPort;
|
||||||
@@ -199,31 +228,40 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
swingUI.injectMenuAction(getCopyAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getCopyAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getPasteAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getPasteAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(null, EDIT_TITLE);
|
swingUI.injectMenuAction(null, EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(actionFactory.createSelectAllAction(plugInPort), EDIT_TITLE);
|
swingUI.injectMenuAction(actionFactory
|
||||||
|
.createSelectAllAction(plugInPort), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getEditSelectionAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getEditSelectionAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getDeleteSelectionAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getDeleteSelectionAction(), EDIT_TITLE);
|
||||||
|
swingUI.injectMenuAction(getRotateClockwiseAction(), EDIT_TITLE);
|
||||||
|
swingUI.injectMenuAction(getRotateCounterclockwiseAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getGroupAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getGroupAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getUngroupAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getUngroupAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getSendToBackAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getSendToBackAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getBringToFrontAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getBringToFrontAction(), EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(null, EDIT_TITLE);
|
swingUI.injectMenuAction(null, EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getSaveAsTemplateAction(), EDIT_TITLE);
|
swingUI.injectMenuAction(getSaveAsTemplateAction(), EDIT_TITLE);
|
||||||
swingUI.injectSubmenu(RENUMBER_TITLE, IconLoader.Sort.getIcon(), EDIT_TITLE);
|
swingUI.injectSubmenu(RENUMBER_TITLE, IconLoader.Sort.getIcon(),
|
||||||
|
EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getRenumberXAxisAction(), RENUMBER_TITLE);
|
swingUI.injectMenuAction(getRenumberXAxisAction(), RENUMBER_TITLE);
|
||||||
swingUI.injectMenuAction(getRenumberYAxisAction(), RENUMBER_TITLE);
|
swingUI.injectMenuAction(getRenumberYAxisAction(), RENUMBER_TITLE);
|
||||||
swingUI.injectSubmenu(EXPAND_TITLE, IconLoader.BranchAdd.getIcon(), EDIT_TITLE);
|
swingUI.injectSubmenu(EXPAND_TITLE, IconLoader.BranchAdd.getIcon(),
|
||||||
|
EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(getExpandSelectionAllAction(), EXPAND_TITLE);
|
swingUI.injectMenuAction(getExpandSelectionAllAction(), EXPAND_TITLE);
|
||||||
swingUI.injectMenuAction(getExpandSelectionImmediateAction(), EXPAND_TITLE);
|
swingUI.injectMenuAction(getExpandSelectionImmediateAction(),
|
||||||
swingUI.injectMenuAction(getExpandSelectionSameTypeAction(), EXPAND_TITLE);
|
EXPAND_TITLE);
|
||||||
|
swingUI.injectMenuAction(getExpandSelectionSameTypeAction(),
|
||||||
|
EXPAND_TITLE);
|
||||||
swingUI.injectMenuAction(null, EDIT_TITLE);
|
swingUI.injectMenuAction(null, EDIT_TITLE);
|
||||||
swingUI.injectMenuAction(actionFactory.createEditProjectAction(plugInPort), EDIT_TITLE);
|
swingUI.injectMenuAction(actionFactory
|
||||||
|
.createEditProjectAction(plugInPort), EDIT_TITLE);
|
||||||
|
|
||||||
refreshActions();
|
refreshActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumSet<EventType> getSubscribedEventTypes() {
|
public EnumSet<EventType> getSubscribedEventTypes() {
|
||||||
return EnumSet.of(EventType.SELECTION_CHANGED, EventType.PROJECT_MODIFIED);
|
return EnumSet.of(EventType.SELECTION_CHANGED,
|
||||||
|
EventType.PROJECT_MODIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -233,7 +271,8 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
refreshActions();
|
refreshActions();
|
||||||
break;
|
break;
|
||||||
case PROJECT_MODIFIED:
|
case PROJECT_MODIFIED:
|
||||||
undoHandler.stateChanged((Project) params[0], (Project) params[1], (String) params[2]);
|
undoHandler.stateChanged((Project) params[0], (Project) params[1],
|
||||||
|
(String) params[2]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,8 +282,10 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
getCutAction().setEnabled(enabled);
|
getCutAction().setEnabled(enabled);
|
||||||
getCopyAction().setEnabled(enabled);
|
getCopyAction().setEnabled(enabled);
|
||||||
try {
|
try {
|
||||||
getPasteAction().setEnabled(
|
getPasteAction()
|
||||||
clipboard.isDataFlavorAvailable(ComponentTransferable.listFlavor));
|
.setEnabled(
|
||||||
|
clipboard
|
||||||
|
.isDataFlavorAvailable(ComponentTransferable.listFlavor));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
getPasteAction().setEnabled(false);
|
getPasteAction().setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1169,6 +1169,10 @@
|
|||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>BUG_FIX</changeType>
|
<changeType>BUG_FIX</changeType>
|
||||||
<description>Large components disappear when none of the edges is in the visible area of the screen</description>
|
<description>Large components disappear when none of the edges is in the visible area of the screen</description>
|
||||||
|
</org.diylc.appframework.update.Change>
|
||||||
|
<org.diylc.appframework.update.Change>
|
||||||
|
<changeType>NEW_FEATURE</changeType>
|
||||||
|
<description>Ability to rotate selection</description>
|
||||||
</org.diylc.appframework.update.Change>
|
</org.diylc.appframework.update.Change>
|
||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
|
|||||||
Reference in New Issue
Block a user