use of com.google.gwt.user.client.ui.VerticalPanel in project perun by CESNET.
the class SelfSponsoredUsersTabItem method draw.
@Override
public Widget draw() {
VerticalPanel vp = new VerticalPanel();
vp.setSize("100%", "100%");
if (user.isSponsoredUser()) {
// SERVICE TYPE user
this.titleWidget.setText(Utils.getStrippedStringWithEllipsis(user.getFullNameWithTitles().trim()) + ": Sponsors");
// request
final GetUsersBySpecificUser request = new GetUsersBySpecificUser(userId);
// menu
TabMenu menu = new TabMenu();
vp.add(menu);
vp.setCellHeight(menu, "30px");
menu.addWidget(UiElements.getRefreshButton(this));
// table
CellTable<User> table;
if (session.isPerunAdmin()) {
table = request.getTable(new FieldUpdater<User, String>() {
public void update(int i, User user, String s) {
session.getTabManager().addTab(new SelfDetailTabItem(user));
}
});
} else {
table = request.getTable();
}
table.addStyleName("perun-table");
table.setWidth("100%");
ScrollPanel sp = new ScrollPanel(table);
sp.addStyleName("perun-tableScrollPanel");
vp.add(sp);
session.getUiElements().resizePerunTable(sp, 350, this);
} else {
// PERSON TYPE user
this.titleWidget.setText(Utils.getStrippedStringWithEllipsis(user.getFullNameWithTitles().trim()) + ": Sponsored users");
// request
final GetSpecificUsersByUser request = new GetSpecificUsersByUser(userId);
request.setHideService(true);
// menu
TabMenu menu = new TabMenu();
vp.add(menu);
vp.setCellHeight(menu, "30px");
menu.addWidget(UiElements.getRefreshButton(this));
// table
CellTable<User> table;
if (session.isPerunAdmin()) {
table = request.getTable(new FieldUpdater<User, String>() {
public void update(int i, User user, String s) {
session.getTabManager().addTab(new SelfDetailTabItem(user));
}
});
} else {
table = request.getTable();
}
table.addStyleName("perun-table");
table.setWidth("100%");
ScrollPanel sp = new ScrollPanel(table);
sp.addStyleName("perun-tableScrollPanel");
vp.add(sp);
session.getUiElements().resizePerunTable(sp, 350, this);
}
contentWidget.setWidget(vp);
return getWidget();
}
use of com.google.gwt.user.client.ui.VerticalPanel in project perun by CESNET.
the class UserExtSourceDetailTabItem method draw.
public Widget draw() {
this.titleWidget.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin().trim()));
// MAIN TAB PANEL
VerticalPanel vp = new VerticalPanel();
vp.setSize("100%", "100%");
// The table
AbsolutePanel dp = new AbsolutePanel();
//dp.setStyleName("decoration");
final FlexTable menu = new FlexTable();
menu.setCellSpacing(5);
menu.setWidget(0, 0, new Image(LargeIcons.INSTANCE.worldIcon()));
Label memberName = new Label();
memberName.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin(), 40));
memberName.setStyleName("now-managing");
memberName.setTitle(userExtSource.getLogin());
menu.setWidget(0, 1, memberName);
int column = 2;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
if (JsonUtils.isExtendedInfoVisible()) {
menu.setHTML(0, column, "<strong>UES ID:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getId() + "</span>");
column++;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
menu.setHTML(0, column, "<strong>ES name:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getName() + "</span>");
column++;
menu.setHTML(0, column, " ");
menu.getFlexCellFormatter().setWidth(0, column, "25px");
column++;
menu.setHTML(0, column, "<strong>ES type:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getType() + "</span>");
}
dp.add(menu);
vp.add(dp);
vp.setCellHeight(dp, "30px");
tabPanel.clear();
tabPanel.add(new UserExtSourceSettingsTabItem(userExtSource), "Settings");
// Resize must be called after page fully displays
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
tabPanel.finishAdding();
}
});
vp.add(tabPanel);
this.contentWidget.setWidget(vp);
return getWidget();
}
use of com.google.gwt.user.client.ui.VerticalPanel in project drools-wb by kiegroup.
the class ColumnsPagePresenter method refreshConditionsWidget.
void refreshConditionsWidget(final List<CompositeColumn<? extends BaseColumn>> conditionColumns) {
final VerticalPanel conditionsWidget = getConditionsWidget();
conditionsWidget.clear();
if (conditionColumns.isEmpty()) {
getAccordion().getItem(CONDITION).setOpen(false);
conditionsWidget.add(blankSlate());
return;
}
conditionsWidget.add(getConditionsPanel());
final Map<String, List<BaseColumn>> columnGroups = groupByTitle(conditionColumns);
getConditionsPanel().renderColumns(columnGroups);
}
use of com.google.gwt.user.client.ui.VerticalPanel in project drools-wb by kiegroup.
the class ColumnsPagePresenter method makeDefaultPanel.
VerticalPanel makeDefaultPanel() {
final VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(blankSlate());
return verticalPanel;
}
use of com.google.gwt.user.client.ui.VerticalPanel in project drools-wb by kiegroup.
the class ColumnsPagePresenter method setupAccordionWidget.
void setupAccordionWidget(final GuidedDecisionTableAccordionItem.Type accordionType, final Consumer<VerticalPanel> setWidget) {
final VerticalPanel defaultPanel = makeDefaultPanel();
setWidget.accept(defaultPanel);
accordion.addItem(accordionType, defaultPanel);
}
Aggregations