KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sshtools > ui > swing > options > Option


1 /*
2  * SSHTools - Java SSH2 API
3  *
4  * Copyright (C) 2002 Lee David Painter.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * You may also distribute it and/or modify it under the terms of the
12  * Apache style J2SSH Software License. A copy of which should have
13  * been provided with the distribution.
14  *
15  * This program 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  * License document supplied with your distribution for more details.
19  *
20  */

21
22 package com.sshtools.ui.swing.options;
23
24 /**
25  *
26  *
27  * @author $author$
28  */

29 public class Option {
30     public static final Option YES = new Option("Yes", "Yes", 'y');
31     public static final Option NO = new Option("No", "No", 'n');
32     
33     private String JavaDoc text;
34     private String JavaDoc toolTipText;
35     private int mnemonic;
36
37     /**
38      * Creates a new Option object.
39      *
40      * @param text
41      * @param toolTipText
42      * @param mnemonic
43      */

44     public Option(String JavaDoc text, String JavaDoc toolTipText, int mnemonic) {
45         this.text = text;
46         this.toolTipText = toolTipText;
47         this.mnemonic = mnemonic;
48     }
49
50     /**
51      *
52      *
53      * @return
54      */

55     public String JavaDoc getText() {
56         return text;
57     }
58
59     /**
60      *
61      *
62      * @return
63      */

64     public int getMnemonic() {
65         return mnemonic;
66     }
67
68     /**
69      *
70      *
71      * @return
72      */

73     public String JavaDoc getToolTipText() {
74         return toolTipText;
75     }
76 }
77
Popular Tags