1 package ist.coach.coachEmfClientComponents.gui; 2 3 import javax.swing.ImageIcon ; 4 5 import intt.itu.itut_x780.ManagedObjectValueType; 6 import ist.coach.coachEmsMib.IpAddressDataValueType; 7 import ist.coach.coachEmfClientComponents.InvokeSetData; 8 9 import ist.coach.coachEmfCommon.Utils; 10 public class VisualIpAddressData 11 extends MOTreeObject { 12 13 static String [] subordinate_names = new String [0]; 14 15 static boolean canRefresh = false; 16 static String object_type = "IpAddressData"; 17 static String emsClassName = "ist.coach.coachEmsMib.IpAddressData_F"; 18 19 static String DISPLAY_TYPE = "IP Address Data"; 20 21 static String [] create_arg_name = new String [0]; 25 static String [] create_arg_editor = new String [0]; 26 static String [] create_arg_renderer = new String [0]; 27 31 static String [] attributes_name = { "Name", 33 "Element Type", 34 "Creation Source", 35 "Delete Policy", 36 "IP Address", 38 "Logical Interface Index", 39 "Subnet Mask", 40 "Least Significant Bit of Broadcast Address", 41 "Max Re-assemble Size" 42 }; 43 44 static boolean[] attributes_readonly = { 45 false, 47 false, 48 false, 49 false, 50 false, 52 false, 53 false, 54 false, 55 false 56 }; 57 58 public VisualIpAddressData(String key) { 59 super(key); 60 leafIcon = new ImageIcon (VisualIpAddressData.class.getResource( 61 "images/ipaddressdata_icon.gif")); 62 nodeIcon = new ImageIcon (VisualIpAddressData.class.getResource( 63 "images/ipaddressdata_icon.gif")); 64 toolTipText = new String (DISPLAY_TYPE); 65 } 66 67 public Object [] translate_values(ManagedObjectValueType original_value_type) { 68 69 Object [] values = new Object [attributes_name.length]; 70 for (int i = 0; i < values.length; i++) 71 values[i] = "unspecified"; 72 73 if (original_value_type == null) 74 return values; 75 76 Object [] mo_values = super.translate_values(original_value_type); 77 int i = 0; 78 for (i = 0; i < mo_values.length; i++) 79 values[i] = mo_values[i]; 80 81 IpAddressDataValueType value_type; 82 value_type = (IpAddressDataValueType) original_value_type; 83 84 if (value_type.ipAdEntAddr != null && value_type.ipAdEntAddr.length > 0) 85 values[i] = new String (value_type.ipAdEntAddr); 86 i++; 87 88 values[i++] = String.valueOf(value_type.ipAdEntIfIndex); 89 90 if (value_type.ipAdEntNetMask != null && value_type.ipAdEntNetMask.length > 0) 91 values[i] = new String (value_type.ipAdEntNetMask); 92 i++; 93 94 switch(value_type.ipAdEntBcastAddr) { 95 case 1: 96 values[i++] = new String ("Internet standard all-ones"); 97 break; 98 default: 99 values[i++] = String.valueOf(value_type.ipAdEntBcastAddr); 100 break; 101 } 102 if (value_type.ipAdEntReasmMaxSize > 0) 103 values[i++] = String.valueOf(value_type.ipAdEntReasmMaxSize); 104 105 return values; 106 } 107 108 java.util.Vector translate_updates(java.util.Hashtable values) { 109 110 return new java.util.Vector (); 111 } 112 } 113 | Popular Tags |