Coverage Report - org.jtheque.core.managers.view.impl.actions.utils.AbstractBrowseAction
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractBrowseAction
0 %
0/4
N/A
1
 
 1  
 package org.jtheque.core.managers.view.impl.actions.utils;
 2  
 
 3  
 import org.jtheque.core.managers.view.impl.actions.JThequeAction;
 4  
 import org.jtheque.utils.DesktopUtils;
 5  
 
 6  
 import java.awt.event.ActionEvent;
 7  
 
 8  
 /*
 9  
  * This file is part of JTheque.
 10  
  *
 11  
  * JTheque is free software: you can redistribute it and/or modify
 12  
  * it under the terms of the GNU General Public License as published by
 13  
  * the Free Software Foundation, either version 3 of the License.
 14  
  *
 15  
  * JTheque is distributed in the hope that it will be useful,
 16  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18  
  * GNU General Public License for more details.
 19  
  *
 20  
  * You should have received a copy of the GNU General Public License
 21  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 22  
  */
 23  
 
 24  
 /**
 25  
  * Ab abstract browse action.
 26  
  *
 27  
  * @author Baptiste Wicht
 28  
  */
 29  
 public abstract class AbstractBrowseAction extends JThequeAction {
 30  
     /**
 31  
      * Construct a new AbstractBrowseAction.
 32  
      *
 33  
      * @param key The internationalization key.
 34  
      */
 35  
     protected AbstractBrowseAction(String key) {
 36  0
         super(key);
 37  0
     }
 38  
 
 39  
     @Override
 40  
     public final void actionPerformed(ActionEvent e) {
 41  0
         DesktopUtils.browse(getUrl());
 42  0
     }
 43  
 
 44  
     /**
 45  
      * Return the URL.
 46  
      *
 47  
      * @return The URL to browse.
 48  
      */
 49  
     protected abstract String getUrl();
 50  
 }