Skip to content

Commit

Permalink
Update SVPopupMenu.java
Browse files Browse the repository at this point in the history
fixed typo
  • Loading branch information
Parryword authored and stweil committed Oct 5, 2023
1 parent 4e3518a commit dfcd485
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java/com/google/scrollview/ui/SVPopupMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ public class SVPopupMenu implements ActionListener {
*
* @param parent The menu we add our new entry to (should have been defined
* before). If the parent is "", we will add the entry to the root
* (top-level)
* (top-level).
* @param name The caption of the new entry.
* @param id The Id of the new entry. If it is -1, the entry will be treated
* as a menu.
*/
public void add(String parent, String name, int id) {
// A duplicate entry - we just throw it away, since its already in.
if (items.get(name) != null) { return; }
// A new submenu at the top-level
// A new submenu at the top-level.
if (parent.equals("")) {
JMenu jli = new JMenu(name);
SVAbstractMenuItem mli = new SVSubMenuItem(name, jli);
items.put(name, mli);
root.add(jli);
}
// A new sub-submenu
// A new sub-submenu.
else if (id == -1) {
SVAbstractMenuItem jmi = items.get(parent);
JMenu jli = new JMenu(name);
Expand Down Expand Up @@ -101,7 +101,7 @@ else if (id == -1) {
*
* @param parent The menu we add our new entry to (should have been defined
* before). If the parent is "", we will add the entry to the root
* (top-level)
* (top-level).
* @param name The caption of the new entry.
* @param id The Id of the new entry. If it is -1, the entry will be treated
* as a menu.
Expand Down

0 comments on commit dfcd485

Please sign in to comment.