1 29 38 39 package org.planetamessenger.mos.ui; 40 41 import java.awt.event.ActionEvent ; 42 import java.awt.event.MouseEvent ; 43 44 import javax.swing.JTree ; 45 import javax.swing.tree.DefaultMutableTreeNode ; 46 import javax.swing.tree.DefaultTreeModel ; 47 48 import org.planetamessenger.mos.engine.JSharedObjects; 49 import org.planetamessenger.plugin.JPlugin; 50 51 52 56 public class JContactTree extends JTree implements JContactListInterface, java.awt.event.MouseListener , java.awt.event.ActionListener { 57 58 public JContactTree() { 59 60 addMouseListener( this ); 61 62 69 70 DefaultMutableTreeNode root = new DefaultMutableTreeNode ( "Root" ); 71 72 this.setRootVisible( false ); 73 setModel( new DefaultTreeModel ( root ) ); 74 75 91 } 92 93 97 private String [] getAllPluginNames() throws Exception { 98 99 JPlugin[] plugins = JSharedObjects.getPluginEngine().toArray(); 100 String [] names = null; 101 102 103 if( plugins != null ) { 104 names = new String [plugins.length]; 105 for( int i = 0; i < plugins.length; i++ ) { 106 names[i] = plugins[i].toString(); 107 } 108 } 109 110 return names; 111 } 112 113 118 public boolean addItem( org.planetamessenger.plugin.JContactListItem item ) { 119 120 return true; 121 } 122 123 128 public org.planetamessenger.plugin.JContactListItem getItem( int nPluginId, java.lang.String strItemId ) { 129 130 return null; 131 } 132 133 137 public boolean removeItem( org.planetamessenger.plugin.JContactListItem item ) { 138 139 return true; 140 } 141 142 146 public boolean removePluginItems( int nPluginId ) { 147 148 return true; 149 } 150 151 154 public boolean removeSelectedItem() { 155 156 return true; 157 } 158 159 163 public void restoreItemStatus( org.planetamessenger.plugin.JContactListItem item ) { 164 165 } 166 167 173 public boolean setAllItemsStatus( int nPluginId, int nNewStatus ) { 174 175 return true; 176 } 177 178 183 public boolean setItemStatus( org.planetamessenger.plugin.JContactListItem item, int nNewStatus ) { 184 185 return true; 186 } 187 188 191 public void updateLanguage() { 192 193 } 194 195 201 public void actionPerformed( ActionEvent e ) { 202 } 203 204 210 public void mouseClicked( MouseEvent e ) { 211 } 212 213 219 public void mouseEntered( MouseEvent e ) { 220 } 221 222 228 public void mouseExited( MouseEvent e ) { 229 } 230 231 237 public void mousePressed( MouseEvent e ) { 238 } 239 240 246 public void mouseReleased( MouseEvent e ) { 247 } 248 } 249 250 | Popular Tags |