use of com.extjs.gxt.ui.client.widget.VerticalPanel in project activityinfo by bedatadriven.
the class SearchResultItem method setChilds.
public void setChilds(List<Axis> childList) {
for (Axis axis : childList) {
VerticalPanel panelAll = new VerticalPanel();
HorizontalPanel panelChild = new HorizontalPanel();
HorizontalPanel spacer = new HorizontalPanel();
spacer.setWidth(20);
panelChild.add(spacer);
Image image = IconImageBundle.ICONS.activity().createImage();
panelChild.add(image);
panelAll.add(panelChild);
EntityCategory activity = (EntityCategory) axis.getCategory();
Hyperlink link = new Hyperlink(axis.getLabel(), PageStateSerializer.serialize(new DataEntryPlace(Filter.filter().onActivity(activity.getId()))));
link.setStylePrimaryName("link");
panelChild.add(link);
for (Axis childAxis : axis.getChildren()) {
HorizontalPanel panelIndicator = new HorizontalPanel();
HorizontalPanel spacerIndicator = new HorizontalPanel();
spacerIndicator.setWidth(40);
panelIndicator.add(spacerIndicator);
panelIndicator.add(IconImageBundle.ICONS.indicator().createImage());
// Hyperlink linkIndicator = new Hyperlink(childAxis.getLabel(),
// "site-grid/" +
// ((EntityCategory)childAxis.getCategory()).getId());
// linkIndicator.setStylePrimaryName("link");
// panelIndicator.add(linkIndicator);
LabelField labelIndicator = new LabelField(childAxis.getLabel());
panelIndicator.add(labelIndicator);
panelAll.add(panelIndicator);
indicatorCount++;
}
activityCount++;
childPanel.add(panelAll);
}
}
use of com.extjs.gxt.ui.client.widget.VerticalPanel in project activityinfo by bedatadriven.
the class SearchResultsPage method showSearchResults.
private void showSearchResults() {
searchResultsPanel.removeAll();
clearErrorsIfShowing();
int activities = 0;
int databases = 0;
int indicators = 0;
LabelField labelResults = new LabelField();
searchResultsPanel.add(labelResults);
if (pivotContent != null) {
VerticalPanel panelSpacer = new VerticalPanel();
panelSpacer.setHeight(16);
searchResultsPanel.add(panelSpacer);
searchResultsPanel.setStylePrimaryName("searchResults");
for (Axis axis : pivotContent.getData().getRootRow().getChildren()) {
SearchResultItem itemWidget = new SearchResultItem();
itemWidget.setDabaseName(axis.getLabel());
itemWidget.setChilds(axis.getChildList());
searchResultsPanel.add(itemWidget);
databases++;
activities += itemWidget.getActivityCount();
indicators += itemWidget.getIndicatorCount();
}
}
labelResults.setText(I18N.MESSAGES.searchResultsFound(searchQuery, Integer.toString(databases), Integer.toString(activities), Integer.toString(indicators)));
layout();
}
use of com.extjs.gxt.ui.client.widget.VerticalPanel in project activityinfo by bedatadriven.
the class SearchResultsPage method createSearchResultsPanel.
private void createSearchResultsPanel() {
searchResultsPanel = new VerticalPanel();
searchResultsPanel.setScrollMode(Scroll.AUTO);
containerFilterAndResult.add(searchResultsPanel);
}
Aggregations