KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > rero > config > ClientDefaults


1 package rero.config;
2
3 import java.util.*;
4 import java.awt.*;
5
6 import rero.client.dcc.LocalInfo;
7
8 import java.io.File JavaDoc;
9
10 public class ClientDefaults
11 {
12    public static final String JavaDoc ident_userid = System.getProperty("user.name");
13    public static final String JavaDoc ident_system = System.getProperty("os.name").replaceAll(" ", "");
14    public static final int ident_port = 113;
15    public static final boolean ident_enabled = (System.getProperty("os.name").indexOf("Window") > -1) ? true : false; // by default enable ident on Windows, disable it everywher else though..
16

17    public static final String JavaDoc dcc_saveto = System.getProperty("user.home");
18    public static final int dcc_low = 4096;
19    public static final int dcc_high = 8192;
20    public static final int dcc_accept = 0; // 0 => ask 1=> auto accept 2=> ignore (/dcc accept is still an option)
21
public static final boolean dcc_fillspaces = true; /** fill spaces when sending a file */
22    public static final String JavaDoc dcc_localinfo = LocalInfo.RESOLVE_FROM_SERVER;
23
24    public static final String JavaDoc current_theme = "jIRCii Default";
25
26    public static final int listbox_width = 10; // 10 characters...
27

28    public static final boolean auto_option = true; /** auto /window default value(s) */
29    public static final boolean active_option = true; /** echo to active option */
30
31    public static final boolean option_showmotd = true;
32    public static final boolean option_reconnect = true;
33    public static final boolean option_timestamp = false;
34    public static final boolean dclick_links = true; // open links with double click
35

36    public static boolean ui_sdi = true;
37    public static final boolean ui_native = true;
38
39    public static String JavaDoc ui_openfiles;
40
41    public static final int ui_sbarlines = 1; // number of statusbar lines by default
42
public static final Color ui_editcolor = Color.lightGray;
43    public static Font ui_font = new Font("Monospaced", Font.PLAIN, 13);
44    public static final boolean ui_usetoolbar = true;
45    public static final boolean ui_showtabs = true;
46    public static final boolean ui_showbar = true;
47    public static final boolean ui_showrestart = true; // show warning dialog notifying a user restart is required for options to take effect
48

49    public static final int ui_buffersize = 2000; // max size of scrollback buffer...
50

51    public static final int notabs_border = 1; // size of app border when server tabs are turned off
52

53    public static boolean ui_antialias = false; // enable/disable text anti-aliasing
54

55    public static final boolean script_ignoreWarnings = false;
56    public static final boolean script_verboseLoad = true;
57
58    public static final boolean switchbar_fixed = false; // tell the switchbar buttons to be a fixed width
59
public static final int switchbar_position = 0; // top
60
public static final Color switchbar_color = Color.red;
61    public static final boolean switchbar_sort = false; // sort switchbar buttons alphabetically...
62
public static final boolean switchbar_hilight = true; // determine if switchbar hilighting is on/off
63

64    public static final boolean client_stripcodes = false; // strip colors from server?
65

66    public static final boolean log_enabled = false;
67    public static final String JavaDoc log_saveto = new File JavaDoc(System.getProperty("user.home"), "irc_logs").getAbsolutePath();
68    public static final boolean log_strip = true;
69    public static final boolean log_timestamp = true;
70
71    public static final String JavaDoc proxy_server = System.getProperty("socksProxyHost", "");
72    public static final String JavaDoc proxy_port = System.getProperty("socksProxyPort", "1080");
73    public static final String JavaDoc proxy_userid = System.getProperty("java.net.socks.username", "");
74    public static final String JavaDoc proxy_password = System.getProperty("java.net.socks.password", "");
75    public static final boolean proxy_enabled = proxy_server != null;
76
77    public static final int reconnect_time = 5;
78
79    public static final boolean update_ial = true;
80
81    public static final String JavaDoc version_string = "03.25.07";
82
83    static
84    {
85       if (System.getProperty("os.name").indexOf("indows") > -1)
86       {
87          ui_openfiles = "explorer";
88          ui_sdi = false;
89          ui_font = new Font("Courier New", Font.PLAIN, 13); // sun's monospace looks like garbage on OS X, had to use Courier
90
}
91       else if (System.getProperty("os.name").equals("Mac OS X"))
92       {
93          ui_openfiles = "/usr/bin/open";
94          ui_font = new Font("Courier New", Font.PLAIN, 13); // sun's monospace looks like garbage on Windows, had to use Courier
95
ui_antialias = true;
96       }
97       else
98       {
99          ui_openfiles = "mozilla";
100       }
101    }
102 }
103
Popular Tags