KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > changelog > settings > ChangeLogSettings


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Ralph Krueger.
17  */

18
19 package org.netbeans.modules.changelog.settings;
20
21 import org.openide.options.*;
22 import org.openide.util.*;
23
24 /** Options for changelog module
25 *
26 * @author Ralph krueger
27 */

28 public class ChangeLogSettings extends SystemOption {
29
30     public static final String JavaDoc PROP_DEFAULT_SERVER = "defaultServerInfo"; // NOI18N
31

32     public static final String JavaDoc PROP_SHOW_BRANCHES = "showBranchesByDefault"; //NOI18N
33

34     static final long serialVersionUID = -1563396366224442828L;
35
36     public ChangeLogSettings() {
37         setDefaultServerInfo("");
38         setShowBranchesByDefault(false);
39     }
40
41
42     /** human presentable name */
43     public String JavaDoc displayName() {
44         return NbBundle.getBundle(ChangeLogSettings.class).getString("CTL_ChangeLog_settings"); // NOI18N
45
}
46
47
48     public HelpCtx getHelpCtx () {
49         return new HelpCtx (ChangeLogSettings.class);
50     }
51     
52     /** Getter for property defaultServerInfo.
53      * @return Value of property defaultServerInfo.
54      */

55     public String JavaDoc getDefaultServerInfo() {
56         return (String JavaDoc)getProperty(PROP_DEFAULT_SERVER);
57     }
58     
59     /** Setter for property defaultServerInfo.
60      * @param defaultServerInfo New value of property defaultServerInfo.
61      */

62     public void setDefaultServerInfo(String JavaDoc defaultServerInfo) {
63         putProperty(PROP_DEFAULT_SERVER, defaultServerInfo, true);
64     }
65     
66     /** Getter for property showBranchesByDefault.
67      * @return Value of property showBranchesByDefault.
68      */

69     public boolean isShowBranchesByDefault() {
70         return ((Boolean JavaDoc)getProperty(PROP_SHOW_BRANCHES)).booleanValue();
71     }
72     
73     /** Setter for property showBranchesByDefault.
74      * @param showBranchesByDefault New value of property showBranchesByDefault.
75      */

76     public void setShowBranchesByDefault(boolean showBranchesByDefault) {
77         putProperty(PROP_SHOW_BRANCHES, showBranchesByDefault ? Boolean.TRUE : Boolean.FALSE);
78     }
79     
80 }
Popular Tags