use of elemental.html.TableElement in project che by eclipse.
the class FindActionViewImpl method showActions.
@Override
public void showActions(Map<Action, String> actions) {
this.actions = actions;
actionsContainer.getElement().setInnerHTML("");
TableElement itemHolder = Elements.createTableElement();
itemHolder.setClassName(css.items());
actionsContainer.getElement().appendChild(((com.google.gwt.dom.client.Element) itemHolder));
list = SimpleList.create((SimpleList.View) actionsContainer.getElement().cast(), (Element) actionsContainer.getElement(), itemHolder, resources.defaultSimpleListCss(), listItemRenderer, eventDelegate);
list.render(new ArrayList<>(actions.keySet()));
if (!actions.isEmpty()) {
list.getSelectionModel().setSelectedItem(0);
}
layoutPanel.setWidgetHidden(actionsPanel, false);
layoutPanel.setHeight("250px");
if (isVisible()) {
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
center();
}
});
}
}
use of elemental.html.TableElement in project che by eclipse.
the class Elements method createTableElement.
public static TableElement createTableElement(String... classNames) {
TableElement elem = getDocument().createTableElement();
addClassesToElement(elem, classNames);
return elem;
}
use of elemental.html.TableElement in project che by eclipse.
the class NavigateToFileViewImpl method showItems.
@Override
public void showItems(List<ItemReference> items) {
// Hide popup if it is nothing to show
if (items.isEmpty()) {
suggestionsContainer.getElement().setInnerHTML("");
suggestionsPanel.setVisible(false);
suggestionsPanel.getElement().getStyle().setWidth(400, Style.Unit.PX);
suggestionsPanel.getElement().getStyle().setHeight(20, Style.Unit.PX);
return;
}
// Show popup
suggestionsPanel.setVisible(true);
suggestionsContainer.getElement().setInnerHTML("");
// Create and show list of items
final TableElement itemHolder = Elements.createTableElement();
suggestionsContainer.getElement().appendChild(((com.google.gwt.dom.client.Element) itemHolder));
list = SimpleList.create((SimpleList.View) suggestionsContainer.getElement().cast(), (Element) suggestionsContainer.getElement(), itemHolder, resources.defaultSimpleListCss(), listItemRenderer, eventDelegate);
list.render(items);
list.getSelectionModel().setSelectedItem(0);
// Update popup position
updatePositionAndSize();
}
Aggregations