1 20 21 package org.apache.directory.ldapstudio.browser.common.widgets.browser; 22 23 24 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 25 26 27 35 public class BrowserCategory 36 { 37 38 39 public static final int TYPE_DIT = 0; 40 41 42 public static final int TYPE_SEARCHES = 1; 43 44 45 public static final int TYPE_BOOKMARKS = 2; 46 47 48 public static final String TITLE_DIT = "DIT"; 49 50 51 public static final String TITLE_SEARCHES = "Searches"; 52 53 54 public static final String TITLE_BOOKMARKS = "Bookmarks"; 55 56 57 private IConnection parent; 58 59 60 private int type; 61 62 63 69 public BrowserCategory( int type, IConnection parent ) 70 { 71 this.parent = parent; 72 this.type = type; 73 } 74 75 76 81 public IConnection getParent() 82 { 83 return parent; 84 } 85 86 87 92 public int getType() 93 { 94 return type; 95 } 96 97 98 103 public String getTitle() 104 { 105 switch ( type ) 106 { 107 case TYPE_DIT: 108 return TITLE_DIT; 109 110 case TYPE_SEARCHES: 111 return TITLE_SEARCHES; 112 113 case TYPE_BOOKMARKS: 114 return TITLE_BOOKMARKS; 115 116 default: 117 return "ERROR"; 118 } 119 } 120 121 } 122 | Popular Tags |