001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 package graphlab.ui.components.gmenu; 005 006 /** 007 * @author Ruzbeh Ebrahimi 008 */ 009 public class KeyBoardShortCut { 010 private int keyEvent; 011 private int keyMnemonic; 012 private int keyModifiers; 013 private int keyWordIndex; 014 private boolean isAccelerator; 015 016 public KeyBoardShortCut(int keyEvent, int keyModifiers, int keyWordIndex, boolean isMnemonics, int keyMnemonic) { 017 this.keyMnemonic = keyMnemonic; 018 this.keyEvent = keyEvent; 019 this.keyModifiers = keyModifiers; 020 this.keyWordIndex = keyWordIndex; 021 this.isAccelerator = isMnemonics; 022 } 023 024 public KeyBoardShortCut(int keyMnemonic, int keyWordIndex, boolean isAccelerator) { 025 this.keyMnemonic = keyMnemonic; 026 this.keyWordIndex = keyWordIndex; 027 this.isAccelerator = isAccelerator; 028 } 029 030 public int getKeyEvent() { 031 return keyEvent; 032 } 033 034 public int getKeyModifiers() { 035 return keyModifiers; 036 } 037 038 public int getKeyWordIndex() { 039 return keyWordIndex; 040 } 041 042 public boolean isAccelerator() { 043 return isAccelerator; 044 } 045 046 public int getKeyMnemonic() { 047 return keyMnemonic; 048 } 049 }