Revision e56be452
b/src/gr/grnet/pithos/web/client/Pithos.java | ||
---|---|---|
371 | 371 |
|
372 | 372 |
trees = new VerticalPanel(); |
373 | 373 |
trees.setWidth("100%"); |
374 |
|
|
374 |
trees.setSpacing(5); |
|
375 | 375 |
|
376 |
HorizontalPanel treeHeader = new HorizontalPanel(); |
|
377 |
treeHeader.addStyleName("pithos-treeHeader"); |
|
378 |
treeHeader.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); |
|
379 |
treeHeader.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); |
|
380 |
HorizontalPanel statistics = new HorizontalPanel(); |
|
381 |
statistics.addStyleName("pithos-statistics"); |
|
382 |
statistics.add(new HTML("Used: ")); |
|
383 |
usedBytes = new HTML(); |
|
384 |
statistics.add(usedBytes); |
|
385 |
statistics.add(new HTML(" of ")); |
|
386 |
totalBytes = new HTML(); |
|
387 |
statistics.add(totalBytes); |
|
388 |
statistics.add(new HTML(" (")); |
|
389 |
usedPercent = new HTML(); |
|
390 |
statistics.add(usedPercent); |
|
391 |
statistics.add(new HTML(")")); |
|
392 |
treeHeader.add(statistics); |
|
393 |
treeHeader.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_LEFT); |
|
394 |
trees.add(treeHeader); |
|
376 |
// HorizontalPanel treeHeader = new HorizontalPanel(); |
|
377 |
// treeHeader.addStyleName("pithos-treeHeader"); |
|
378 |
// treeHeader.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); |
|
379 |
// treeHeader.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); |
|
380 |
// treeHeader.add(statistics); |
|
381 |
// treeHeader.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_LEFT); |
|
382 |
// trees.add(treeHeader); |
|
395 | 383 |
|
396 | 384 |
trees.add(folderTreeView); |
385 |
|
|
386 |
HorizontalPanel separator = new HorizontalPanel(); |
|
387 |
separator.addStyleName("pithos-statisticsSeparator"); |
|
388 |
trees.add(separator); |
|
389 |
|
|
390 |
HorizontalPanel statistics = new HorizontalPanel(); |
|
391 |
statistics.addStyleName("pithos-statistics"); |
|
392 |
statistics.add(new HTML("Used: ")); |
|
393 |
usedBytes = new HTML(); |
|
394 |
statistics.add(usedBytes); |
|
395 |
statistics.add(new HTML(" of ")); |
|
396 |
totalBytes = new HTML(); |
|
397 |
statistics.add(totalBytes); |
|
398 |
statistics.add(new HTML(" (")); |
|
399 |
usedPercent = new HTML(); |
|
400 |
statistics.add(usedPercent); |
|
401 |
statistics.add(new HTML(")")); |
|
402 |
trees.add(statistics); |
|
403 |
|
|
397 | 404 |
trees.add(groupTreeView); |
398 | 405 |
// Add the left and right panels to the split panel. |
399 | 406 |
splitPanel.setLeftWidget(trees); |
400 | 407 |
splitPanel.setRightWidget(inner); |
401 |
splitPanel.setSplitPosition("35%");
|
|
408 |
splitPanel.setSplitPosition("219px");
|
|
402 | 409 |
splitPanel.setSize("100%", "100%"); |
403 | 410 |
splitPanel.addStyleName("pithos-splitPanel"); |
404 | 411 |
splitPanel.setWidth(contentWidth); |
... | ... | |
1145 | 1152 |
@Override |
1146 | 1153 |
public void execute() { |
1147 | 1154 |
mysharedTreeView = new MysharedTreeView(mysharedTreeViewModel); |
1148 |
trees.insert(mysharedTreeView, 2);
|
|
1155 |
trees.insert(mysharedTreeView, 4);
|
|
1149 | 1156 |
treeViews.add(mysharedTreeView); |
1150 | 1157 |
createOtherSharedTree(); |
1151 | 1158 |
} |
... | ... | |
1179 | 1186 |
@Override |
1180 | 1187 |
public void execute() { |
1181 | 1188 |
otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel); |
1182 |
trees.insert(otherSharedTreeView, 2);
|
|
1189 |
trees.insert(otherSharedTreeView, 4);
|
|
1183 | 1190 |
treeViews.add(otherSharedTreeView); |
1184 | 1191 |
} |
1185 | 1192 |
}); |
b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.css | ||
---|---|---|
35 | 35 |
|
36 | 36 |
.disclosurePanel { |
37 | 37 |
padding-left: 10px; |
38 |
width: 100%; |
|
39 |
} |
|
40 |
|
|
41 |
.header { |
|
42 |
background-color: #74aec9; |
|
43 |
height: 25px; |
|
44 |
width: 100%; |
|
38 | 45 |
} |
39 | 46 |
|
40 | 47 |
.content { |
b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.java | ||
---|---|---|
59 | 59 |
public interface Style extends CssResource { |
60 | 60 |
String disclosurePanel(); |
61 | 61 |
|
62 |
String header(); |
|
63 |
|
|
62 | 64 |
String content(); |
63 | 65 |
} |
64 | 66 |
|
... | ... | |
111 | 113 |
sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); |
112 | 114 |
sb.append(Templates.INSTANCE.nameSpan(title)); |
113 | 115 |
sb.appendHtmlConstant(AbstractImagePrototype.create(open ? resources.open() : resources.closed()).getHTML()); |
114 |
return new HTML(sb.toSafeHtml()); |
|
116 |
HTML header = new HTML(sb.toSafeHtml()); |
|
117 |
header.addStyleName(resources.pithosDisclosurePanelCss().header()); |
|
118 |
return header; |
|
115 | 119 |
} |
116 | 120 |
|
117 | 121 |
public void add(IsWidget widget) { |
b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java | ||
---|---|---|
53 | 53 |
import com.google.gwt.user.client.Command; |
54 | 54 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
55 | 55 |
import com.google.gwt.user.client.ui.Composite; |
56 |
import com.google.gwt.user.client.ui.FlowPanel; |
|
56 | 57 |
import com.google.gwt.user.client.ui.HTML; |
58 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
|
59 |
import com.google.gwt.user.client.ui.HorizontalPanel; |
|
60 |
import com.google.gwt.user.client.ui.Image; |
|
57 | 61 |
import com.google.gwt.user.client.ui.Tree; |
58 | 62 |
import com.google.gwt.user.client.ui.VerticalPanel; |
59 | 63 |
|
... | ... | |
172 | 176 |
VerticalPanel panel = new VerticalPanel(); |
173 | 177 |
panel.addStyleName("pithos-folderTreeSection"); |
174 | 178 |
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 |
|
|
180 |
HorizontalPanel header = new HorizontalPanel(); |
|
181 |
|
|
182 |
// SafeHtmlBuilder sb = new SafeHtmlBuilder(); |
|
183 |
Image img = new Image(resources.icon()); |
|
184 |
header.add(img); |
|
185 |
header.setCellVerticalAlignment(img, HasVerticalAlignment.ALIGN_MIDDLE); |
|
186 |
header.setCellWidth(img, "32px"); |
|
187 |
HTML title = new HTML("My Files"); |
|
188 |
header.add(title); |
|
189 |
header.setCellVerticalAlignment(title, HasVerticalAlignment.ALIGN_MIDDLE); |
|
190 |
|
|
191 |
// sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); |
|
192 |
// sb.append(Templates.INSTANCE.nameSpan("My Files")); |
|
193 |
// HTML header = new HTML(sb.toSafeHtml()); |
|
194 |
header.addStyleName("pithos-folderTreeSectionHeader"); |
|
195 |
panel.add(header); |
|
179 | 196 |
|
180 | 197 |
|
181 | 198 |
/* |
b/src/gr/grnet/pithos/web/public/pithos.css | ||
---|---|---|
339 | 339 |
padding-left: 4; |
340 | 340 |
} |
341 | 341 |
|
342 |
.pithos-treeHeader { |
|
343 |
background-color: #74aec9; |
|
344 |
height: 25px; |
|
345 |
width: 100%; |
|
342 |
.pithos-statistics { |
|
343 |
color: black; |
|
344 |
padding: 10px; |
|
346 | 345 |
} |
347 | 346 |
|
348 |
.pithos-statistics { |
|
349 |
color: white; |
|
350 |
padding: 5px; |
|
347 |
.pithos-statistics .gwt-HTML { |
|
348 |
font-size: smaller; |
|
349 |
} |
|
350 |
|
|
351 |
.pithos-statisticsSeparator { |
|
352 |
background: url(images/separator.png) no-repeat; |
|
353 |
width: 100%; |
|
354 |
height: 3px; |
|
351 | 355 |
} |
352 | 356 |
|
353 | 357 |
.pithos-splitPanel { |
... | ... | |
736 | 740 |
|
737 | 741 |
.pithos-folderTreeSection { |
738 | 742 |
padding-left: 10px; |
743 |
width:100%; |
|
744 |
} |
|
745 |
|
|
746 |
.pithos-folderTreeSectionHeader { |
|
747 |
background-color: #74aec9; |
|
748 |
height: 25px; |
|
749 |
width: 100%; |
|
739 | 750 |
} |
740 | 751 |
|
741 | 752 |
.pithos-folderTreeSectionContent { |
Also available in: Unified diff