use of com.extjs.gxt.ui.client.widget.button.ButtonBar in project jahia by Jahia.
the class EngineCards method showEngine.
/**
* show the first engine in the main area
*/
@Override
public void showEngine() {
for (ButtonBar buttonBar : bars) {
barItems.add(new ArrayList<Component>(buttonBar.getItems()));
}
list.getSelectionModel().select(0, false);
mainContainer.showEngine();
}
use of com.extjs.gxt.ui.client.widget.button.ButtonBar in project jahia by Jahia.
the class ContentImport method doImport.
public void doImport(String path, Object value) {
Log.debug(path + " " + value);
JahiaContentManagementService.App.getInstance().importContent(path, value.toString(), replaceContent, new BaseAsyncCallback<List<GWTJahiaJobDetail>>() {
public void onApplicationFailure(Throwable caught) {
com.google.gwt.user.client.Window.alert(Messages.get("label.error") + "\n" + caught.getLocalizedMessage());
Log.error(Messages.get("label.error"), caught);
hide();
}
public void onSuccess(List<GWTJahiaJobDetail> result) {
removeAll();
unmask();
add(new Label(Messages.get("label.import.wait", "Your import will be processed by the system as a background job.")));
if (result.size() > 0) {
add(new Label(Messages.getWithArgs("label.import.waitingprocess", "There are {0} jobs to finish before this import will be processed.", new Object[] { Integer.toString(result.size()) })));
}
ButtonBar buttons = ((ButtonBar) getBottomComponent());
Button close = new Button(Messages.get("label.close"), new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent event) {
hide();
}
});
close.addStyleName("button-close");
buttons.removeAll();
buttons.add(close);
layout();
Map<String, Object> data = new HashMap<String, Object>();
data.put(Linker.REFRESH_ALL, true);
m_linker.refresh(data);
}
});
}
use of com.extjs.gxt.ui.client.widget.button.ButtonBar in project jahia by Jahia.
the class PortletDefinitionField method onTriggerClick.
@Override
protected void onTriggerClick(ComponentEvent componentEvent) {
super.onTriggerClick(componentEvent);
if (disabled || isReadOnly()) {
return;
}
final Window w = new Window();
w.addStyleName("portlet-definition-window");
w.setLayout(new FitLayout());
final PortletDefinitionCard card = new PortletDefinitionCard();
w.setModal(true);
w.setSize(600, 400);
ButtonBar bar = new ButtonBar();
Button ok = new Button(Messages.get("org.jahia.engines.PortletsManager.wizard.ok.label", "OK"), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent event) {
GWTJahiaPortletDefinition def = card.getSelectedPortletDefinition();
setRawValue(def.getDefinitionName());
w.hide();
}
});
ok.addStyleName("button-ok");
bar.add(ok);
w.setTopComponent(bar);
w.add(card);
w.show();
}
Aggregations