SourceForge: jubler/jubler: changeset 1033:6bd220ea381e
Simplified version, removed the extension from JMenuItem, allowing the GUI to be managed and created by IDE. development
authorhoang_tran
Tue Oct 20 20:01:52 2009 +0100 (5 weeks ago)
branchdevelopment
changeset 10336bd220ea381e
parent 1032d5bd50e673db
child 1034fdf7b60c7a0e
Simplified version, removed the extension from JMenuItem, allowing the GUI to be managed and created by IDE.
src/com/panayotis/jubler/MenuAction.java
     1.1 --- a/src/com/panayotis/jubler/MenuAction.java	Mon Oct 19 15:37:50 2009 +0100
     1.2 +++ b/src/com/panayotis/jubler/MenuAction.java	Tue Oct 20 20:01:52 2009 +0100
     1.3 @@ -27,59 +27,28 @@
     1.4   */
     1.5  package com.panayotis.jubler;
     1.6  
     1.7 -import com.panayotis.jubler.subs.Share;
     1.8  import java.awt.event.ActionListener;
     1.9 -import javax.swing.JMenuItem;
    1.10  
    1.11  /**
    1.12   *
    1.13   * @author hoang_tran <hoangduytran1960@googlemail.com>
    1.14   */
    1.15 -public abstract class MenuAction extends JMenuItem implements ActionListener {
    1.16 +public abstract class MenuAction implements ActionListener {
    1.17  
    1.18 -    protected String actionName = null;
    1.19      protected Jubler jublerParent = null;
    1.20  
    1.21      public MenuAction() {}
    1.22      
    1.23      /**
    1.24 -     * Default constructor, setting action-name and add the action listener
    1.25 -     * implemented by this class.
    1.26 -     */
    1.27 -    public MenuAction(String actionName) {
    1.28 -        this.actionName = actionName;
    1.29 -        if (! Share.isEmpty(actionName)) {
    1.30 -            setText(actionName);
    1.31 -            setName(actionName);
    1.32 -        }//end if
    1.33 -        addActionListener(this);
    1.34 -    }
    1.35 -
    1.36 -    /**
    1.37       * Peform default construction with the addition of setting reference
    1.38       * for the {@link Jubler} parent.
    1.39       * @param jublerParent The reference to {@link Jubler} running instance.
    1.40       */
    1.41 -    public MenuAction(Jubler jublerParent, String actionName) {
    1.42 -        this(actionName);
    1.43 +    public MenuAction(Jubler jublerParent) {
    1.44          this.jublerParent = jublerParent;
    1.45      }
    1.46  
    1.47      /**
    1.48 -     * @return the actionName
    1.49 -     */
    1.50 -    public String getActionName() {
    1.51 -        return actionName;
    1.52 -    }
    1.53 -
    1.54 -    /**
    1.55 -     * @param actionName the actionName to set
    1.56 -     */
    1.57 -    public void setActionName(String actionName) {
    1.58 -        this.actionName = actionName;
    1.59 -    }
    1.60 -
    1.61 -    /**
    1.62       * @return the jublerParent
    1.63       */
    1.64      public Jubler getJublerParent() {