Revision 7e8e9ff0 src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java | ||
---|---|---|
38 | 38 |
import gr.grnet.pithos.web.client.FolderContextMenu; |
39 | 39 |
import gr.grnet.pithos.web.client.PithosDisclosurePanel; |
40 | 40 |
import gr.grnet.pithos.web.client.TreeView; |
41 |
import gr.grnet.pithos.web.client.grouptree.GroupTreeView.Templates; |
|
41 | 42 |
|
42 | 43 |
import com.google.gwt.core.client.GWT; |
43 | 44 |
import com.google.gwt.resources.client.ImageResource; |
... | ... | |
45 | 46 |
import com.google.gwt.resources.client.ImageResource.RepeatStyle; |
46 | 47 |
import com.google.gwt.safehtml.client.SafeHtmlTemplates; |
47 | 48 |
import com.google.gwt.safehtml.shared.SafeHtml; |
49 |
import com.google.gwt.safehtml.shared.SafeHtmlBuilder; |
|
48 | 50 |
import com.google.gwt.user.cellview.client.CellTree; |
49 | 51 |
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; |
50 | 52 |
import com.google.gwt.user.cellview.client.TreeNode; |
51 | 53 |
import com.google.gwt.user.client.Command; |
54 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
|
52 | 55 |
import com.google.gwt.user.client.ui.Composite; |
56 |
import com.google.gwt.user.client.ui.HTML; |
|
53 | 57 |
import com.google.gwt.user.client.ui.Tree; |
58 |
import com.google.gwt.user.client.ui.VerticalPanel; |
|
54 | 59 |
|
55 | 60 |
public class FolderTreeView extends Composite implements TreeView { |
56 | 61 |
|
... | ... | |
123 | 128 |
@Source("gr/grnet/pithos/resources/home22.png") |
124 | 129 |
ImageResource home(); |
125 | 130 |
|
126 |
@Source("gr/grnet/pithos/resources/folder22.png") |
|
131 |
@Source("gr/grnet/pithos/resources/2folder22.png")
|
|
127 | 132 |
public ImageResource folderYellow(); |
128 | 133 |
|
129 | 134 |
@Source("gr/grnet/pithos/resources/mimetypes/document.png") |
130 | 135 |
ImageResource document(); |
131 | 136 |
|
132 |
@Source("gr/grnet/pithos/resources/othersshared.png") |
|
133 |
ImageResource othersShared(); |
|
134 |
|
|
135 | 137 |
@Source("gr/grnet/pithos/resources/myshared22.png") |
136 | 138 |
ImageResource myShared(); |
137 | 139 |
|
... | ... | |
167 | 169 |
public FolderTreeView(FolderTreeViewModel viewModel) { |
168 | 170 |
this.model = viewModel; |
169 | 171 |
|
170 |
PithosDisclosurePanel panel = new PithosDisclosurePanel((Resources) GWT.create(Resources.class), "My Files", true); |
|
172 |
VerticalPanel panel = new VerticalPanel(); |
|
173 |
panel.addStyleName("pithos-folderTreeSection"); |
|
174 |
Resources resources = GWT.create(Resources.class); |
|
175 |
SafeHtmlBuilder sb = new SafeHtmlBuilder(); |
|
176 |
sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); |
|
177 |
sb.append(Templates.INSTANCE.nameSpan("My Files")); |
|
178 |
panel.add(new HTML(sb.toSafeHtml())); |
|
179 |
|
|
171 | 180 |
|
172 | 181 |
/* |
173 | 182 |
* Create the tree using the model. We use <code>null</code> as the default |
... | ... | |
177 | 186 |
CellTree.Resources res = GWT.create(BasicResources.class); |
178 | 187 |
tree = new CellTree(model, null, res); |
179 | 188 |
tree.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); |
180 |
|
|
189 |
tree.addStyleName("pithos-folderTreeSectionContent"); |
|
181 | 190 |
panel.add(tree); |
191 |
|
|
182 | 192 |
initWidget(panel); |
183 | 193 |
} |
184 | 194 |
|
Also available in: Unified diff