1 29 38 39 40 package org.planetamessenger.mos.ui; 41 42 import org.planetamessenger.mos.engine.*; 43 44 45 public class JProfileTreeItem { 46 47 static public final int TYPE_NONE = 0; 48 static public final int TYPE_PROFILE = 1; 49 static public final int TYPE_PLUGIN = 2; 50 static public final int TYPE_LOOKNFEEL = 4; 51 52 String strText; 53 JLookAndFeelInfo plafInfo; 54 int nPluginId; 55 int nProfileId; 56 int nItemType; 57 58 59 60 64 public JProfileTreeItem() { 65 66 strText = ""; 67 nPluginId = -1; 68 nProfileId = -1; 69 nItemType = TYPE_NONE; 70 plafInfo = null; 71 } 72 73 82 public JProfileTreeItem( String strText, int nProfileId, int nPluginId, JLookAndFeelInfo plafInfo, int nItemType ) { 83 84 this.strText = strText; 85 this.nProfileId = nProfileId; 86 this.nPluginId = nPluginId; 87 this.plafInfo = plafInfo; 88 this.nItemType = nItemType; 89 } 90 91 95 public void setText( String strText ) { 96 97 this.strText = strText; 98 } 99 100 103 public String getText() { 104 105 return strText; 106 } 107 108 112 public void setPluginId( int nPluginId ) { 113 114 this.nPluginId = nPluginId; 115 } 116 117 121 public int getPluginId() { 122 123 return nPluginId; 124 } 125 126 131 public void setProfileId( int nProfileId ) { 132 133 this.nProfileId = nProfileId; 134 } 135 136 140 public int getProfileId() { 141 142 return nProfileId; 143 } 144 145 149 public void setItemType( int nItemType ) { 150 151 this.nItemType = nItemType; 152 } 153 154 157 public int getItemType() { 158 159 return nItemType; 160 } 161 162 166 public void setLookAndFeelInfo( JLookAndFeelInfo plafInfo ) { 167 168 this.plafInfo = plafInfo; 169 170 if( plafInfo == null ) 171 strText = ""; 172 else 173 strText = plafInfo.getName(); 174 } 175 176 179 public JLookAndFeelInfo getLookAndFeelInfo() { 180 181 return plafInfo; 182 } 183 184 189 public String toString() { 190 191 return strText; 192 } 193 } 194 195 | Popular Tags |