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