-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kent branch Add more functionality on right click popup menu #22
base: develop_smarttool
Are you sure you want to change the base?
Conversation
…into KentBranch
…into KentBranch
panel.repaint(); | ||
} | ||
|
||
@Override | ||
public String locationString() { | ||
// TODO Auto-generated method stub | ||
return ActionsMenuBarTitles.Data().Remove().toString(); } | ||
|
||
if(panel.getSelectTool() instanceof SmartTool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach (using instanceof) is dangerous, Please Comment on these two lines on the reason for selection.
Instanceof makes code unmaintanable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make a comment on the approach taken,
Include the following line:
//TODO RECONSIDER THIS DESIGN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reconsider the design.
There are two broad categories of paint actions, the menu ones and the non-menu ones. I suggest make 4 methods in the PaintAction abstract class.
public boolean isMenuAction();
public boolean isPopupAction();
public String getLocationStringForMenu();
public String getLocationStringForPopup();
An action may be both, either or neither of the above mentioned actions.
No description provided.