01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin;
05:
06: import java.net.URL;
07:
08: import javax.swing.Icon;
09: import javax.swing.ImageIcon;
10:
11: public class ServersHelper extends BaseHelper {
12: private static ServersHelper m_helper = new ServersHelper();
13: private Icon m_serverIcon;
14: private Icon m_connectIcon;
15: private Icon m_disconnectIcon;
16: private Icon m_deleteIcon;
17: private Icon m_shutdownIcon;
18:
19: public static final String SERVERS = "Servers";
20: public static final String HOST = "Host";
21: public static final String PORT = "Port";
22: public static final String AUTO_CONNECT = "AutoConnect";
23: public static final String SPLIT = "Split";
24:
25: public static ServersHelper getHelper() {
26: return m_helper;
27: }
28:
29: public Icon getServerIcon() {
30: if (m_serverIcon == null) {
31: URL url = getClass().getResource(
32: ICONS_PATH + "methpro_obj.gif");
33: m_serverIcon = new ImageIcon(url);
34: }
35:
36: return m_serverIcon;
37: }
38:
39: public Icon getConnectIcon() {
40: if (m_connectIcon == null) {
41: URL url = getClass().getResource(
42: ICONS_PATH + "newex_wiz.gif");
43: m_connectIcon = new ImageIcon(url);
44: }
45:
46: return m_connectIcon;
47: }
48:
49: public Icon getDisconnectIcon() {
50: if (m_disconnectIcon == null) {
51: URL url = getClass().getResource(
52: ICONS_PATH + "disconnect_co.gif");
53: m_disconnectIcon = new ImageIcon(url);
54: }
55:
56: return m_disconnectIcon;
57: }
58:
59: public Icon getDeleteIcon() {
60: if (m_deleteIcon == null) {
61: URL url = getClass().getResource(ICONS_PATH + "rem_co.gif");
62: m_deleteIcon = new ImageIcon(url);
63: }
64:
65: return m_deleteIcon;
66: }
67:
68: public Icon getShutdownIcon() {
69: if (m_shutdownIcon == null) {
70: URL url = getClass().getResource(
71: ICONS_PATH + "terminate_co.gif");
72: m_shutdownIcon = new ImageIcon(url);
73: }
74:
75: return m_shutdownIcon;
76: }
77: }
|