1 4 package com.tc.admin; 5 6 import java.net.URL ; 7 8 import javax.swing.Icon ; 9 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(ICONS_PATH+"methpro_obj.gif"); 32 m_serverIcon = new ImageIcon (url); 33 } 34 35 return m_serverIcon; 36 } 37 38 public Icon getConnectIcon() { 39 if(m_connectIcon == null) { 40 URL url = getClass().getResource(ICONS_PATH+"newex_wiz.gif"); 41 m_connectIcon = new ImageIcon (url); 42 } 43 44 return m_connectIcon; 45 } 46 47 public Icon getDisconnectIcon() { 48 if(m_disconnectIcon == null) { 49 URL url = getClass().getResource(ICONS_PATH+"disconnect_co.gif"); 50 m_disconnectIcon = new ImageIcon (url); 51 } 52 53 return m_disconnectIcon; 54 } 55 56 public Icon getDeleteIcon() { 57 if(m_deleteIcon == null) { 58 URL url = getClass().getResource(ICONS_PATH+"rem_co.gif"); 59 m_deleteIcon = new ImageIcon (url); 60 } 61 62 return m_deleteIcon; 63 } 64 65 public Icon getShutdownIcon() { 66 if(m_shutdownIcon == null) { 67 URL url = getClass().getResource(ICONS_PATH+"terminate_co.gif"); 68 m_shutdownIcon = new ImageIcon (url); 69 } 70 71 return m_shutdownIcon; 72 } 73 } 74 | Popular Tags |