1 /*
2 * Created on Jan 19, 2004
3 *
4 * Copyright (C) 2004 Sean Ruff
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21 package org.un4gvn.editorviewer.internal.element;
22
23 import org.eclipse.swt.graphics.Image;
24 import org.eclipse.ui.ISharedImages;
25 import org.un4gvn.editorviewer.internal.EditorViewerPlugin;
26
27 /***
28 * Subclass of AbstractViewerElement to wrap IEditorReference objects
29 * <p>
30 * @author Sean Ruff
31 */
32
33 public class FolderElement extends AbstractViewerElement {
34
35 String _label = null;
36 Image _image = null;
37
38 /***
39 * Constructor
40 * @param parent
41 * @param ref
42 */
43 public FolderElement(IViewerElement parent, Object id, String label){
44 super(parent,id);
45 _label = label;
46 _image = EditorViewerPlugin.getInstance().getImage(ISharedImages.IMG_OBJ_FOLDER);
47 }
48
49 public FolderElement(IViewerElement parent, Object id, String label, Image image){
50 this(parent,id,label);
51 _image = image;
52 }
53
54
55 /***
56 * @see org.un4gvn.editorviewer.internal.element.IViewerElement#getLabel()
57 */
58 public String getLabel(){
59 return _label;
60 }
61
62 //TODO NEED TO STORE THIS AND DISPOSE OF IT
63 /***
64 * @see org.un4gvn.editorviewer.internal.element.IViewerElement#getImage()
65 */
66 public Image getImage(){
67 return _image;
68 }
69
70 /***
71 * @see org.un4gvn.editorviewer.internal.element.IViewerElement#isLeaf()
72 */
73 public boolean isLeaf(){ return false; }
74
75 }
This page was automatically generated by Maven