Skip to content

Commit

Permalink
Merge pull request #48 from Divyesh000/menu
Browse files Browse the repository at this point in the history
Missing menu
  • Loading branch information
creme332 authored Jun 10, 2024
2 parents f427367 + dc92dc2 commit b8d4f30
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/main/java/com/github/creme332/model/Mode.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ public enum Mode {
REFLECT_ABOUT_LINE("REFLECT_ABOUT_LINE"),
REFLECT_ABOUT_POINT("REFLECT_ABOUT_POINT"),

ROTATE_AROUND_POINT(""),
ROTATE_AROUND_POINT("ROTATE_AROUND_POINT"),

ZOOM_IN("ZOOM_IN"),
ZOOM_OUT("ZOOM_OUT"),
DELETE("DELETE"),
MOVE_GRAPHICS_VIEW("MOVE_GRAPHICS_VIEW");
MOVE_GRAPHICS_VIEW("MOVE_GRAPHICS_VIEW"),

TRANSLATION("TRANSLATION"),
NORMAL_ROTATION("NORMAL_ROTATION"),
SCALING("SCALING"),
SHEAR("SHEAR"),
CLIPPING("CLIPPING");

private final String mode;

Expand Down
17 changes: 16 additions & 1 deletion src/main/java/com/github/creme332/view/MenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class MenuBar extends JMenuBar {

IconLoader loader = new IconLoader();


public JMenu createCursorMenu() throws Exception {
JMenu menu = new JMenu();
JMenuItem menuItem;
Expand Down Expand Up @@ -115,6 +114,22 @@ public JMenu createTransformationsMenu() throws Exception {

menuItem = new JMenuItem("Rotate around Point", loader.loadIcon("/icons/rotate-around-point.png", 50));
menu.add(menuItem);

menuItem = new JMenuItem("Translation");
menu.add(menuItem);

menuItem = new JMenuItem("Normal Rotation");
menu.add(menuItem);

menuItem = new JMenuItem("Scaling");
menu.add(menuItem);

menuItem = new JMenuItem("Shear");
menu.add(menuItem);

menuItem = new JMenuItem("Clipping");
menu.add(menuItem);

return menu;
}

Expand Down

0 comments on commit b8d4f30

Please sign in to comment.