use of com.vaadin.v7.ui.Label in project opencms-core by alkacon.
the class CmsAccountsApp method openSubView.
/**
* @see org.opencms.ui.apps.A_CmsWorkplaceApp#openSubView(java.lang.String, boolean)
*/
@Override
public void openSubView(String state, boolean updateState) {
if (updateState) {
CmsAppWorkplaceUi.get().changeCurrentAppState(state);
}
Component comp = getComponentForState(state);
updateInfoButton();
if (comp != null) {
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
comp.setSizeFull();
layout.addComponent(m_table.getEmptyLayout());
layout.addComponent(m_table);
handleSetTable(m_table);
m_splitScreen.setSecondComponent(layout);
} else {
m_splitScreen.setSecondComponent(new Label("Malformed path, tool not available for path: " + state));
handleSetTable(null);
}
m_splitScreen.setSizeFull();
updateSubNav(getSubNavEntries(state));
updateBreadCrumb(getBreadCrumbForState(state));
}
use of com.vaadin.v7.ui.Label in project opencms-core by alkacon.
the class CmsDeleteSiteDialog method getContent.
/**
* Creates content of dialog containing CheckBox if resources should be deleted and a messages.<p>
*
* @return vertical layout component.
*/
protected VerticalLayout getContent() {
String message;
if (m_sitesToDelete.size() == 1) {
message = CmsVaadinUtils.getMessageText(Messages.GUI_SITE_CONFIRM_DELETE_SITE_1, m_sitesToDelete.get(0).getTitle());
} else {
message = "";
for (CmsSite site : m_sitesToDelete) {
if (message.length() > 0) {
message += ", ";
}
message += site.getTitle();
}
message = CmsVaadinUtils.getMessageText(Messages.GUI_SITE_CONFIRM_DELETE_SITES_1, message);
}
VerticalLayout layout = new VerticalLayout();
m_deleteResources = new CheckBox();
m_deleteResources.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_SITE_DELETE_RESOURCES_0));
m_deleteResources.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_SITE_DELETE_RESOURCES_HELP_0));
layout.addComponent(m_deleteResources);
Label label = new Label();
label.setContentMode(ContentMode.HTML);
label.setValue(message);
layout.addComponent(label);
return layout;
}
use of com.vaadin.v7.ui.Label in project opencms-core by alkacon.
the class CmsSourceDialog method setSource.
/**
* Sets the search index to show information about.<p>
*
* @param searchindex to be displayed
*/
public void setSource(String searchindex) {
Label label = new Label();
label.setContentMode(ContentMode.HTML);
label.setValue(getSources(searchindex));
m_layout.removeAllComponents();
m_layout.addComponent(label);
}
use of com.vaadin.v7.ui.Label in project opencms-core by alkacon.
the class CmsModuleInfoDialog method initialize.
/**
* Fills the widget content.<p>
*
* @param module the module
*/
public void initialize(CmsModule module) {
boolean empty = true;
Set<String> resTypeNames = Sets.newHashSet();
for (I_CmsResourceType type : module.getResourceTypes()) {
m_resourceTypes.addComponent(formatResourceType(type));
resTypeNames.add(type.getTypeName());
empty = false;
}
if (empty) {
m_resourceTypes.addComponent(new Label(CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_NO_RESOURCE_TYPES_0)));
}
empty = true;
for (CmsExplorerTypeSettings expType : module.getExplorerTypes()) {
if (resTypeNames.contains(expType.getName())) {
continue;
}
m_explorerTypes.addComponent(formatExplorerType(expType));
empty = false;
}
if (empty) {
m_explorerTypesPanel.setVisible(false);
}
}
use of com.vaadin.v7.ui.Label in project opencms-core by alkacon.
the class CmsResourceTypeStatResultList method getLayoutFromResult.
/**
* Creates a result row.<p>
*
* @param statResult result to be displayed
* @return a row with information about result
*/
private HorizontalLayout getLayoutFromResult(final CmsResourceTypeStatResult statResult) {
HorizontalLayout hLayout = new HorizontalLayout();
hLayout.setWidth("100%");
hLayout.setHeight("60px");
hLayout.addStyleName("o-report");
Label result = new Label();
result.setContentMode(ContentMode.HTML);
result.addStyleName("v-scrollable");
// result.addStyleName("o-report");
result.setValue(statResult.getResult());
Label type = new Label();
type.setWidth("200px");
type.setContentMode(ContentMode.HTML);
type.addStyleName("v-scrollable");
// type.addStyleName("o-report");
type.setValue(statResult.getTypeTitle());
Label time = new Label();
time.setWidth("180px");
time.setContentMode(ContentMode.HTML);
time.addStyleName("v-scrollable");
// time.addStyleName("o-report");
time.setValue(CmsDateUtil.getDateTime(new Date(statResult.getTimestamp()), java.text.DateFormat.DATE_FIELD, A_CmsUI.get().getLocale()));
Button showList = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_DATABASEAPP_STATS_LIST_0));
showList.setWidth("100px");
showList.addClickListener(new Button.ClickListener() {
private static final long serialVersionUID = 2665235403970750534L;
public void buttonClick(ClickEvent event) {
CmsSearchReplaceSettings settings = new CmsSearchReplaceSettings();
settings.setPaths(Collections.singletonList("/"));
settings.setSiteRoot(statResult.getSiteRoot());
settings.setSearchpattern(".*");
if (statResult.getType() != null) {
settings.setTypes(statResult.getType().getTypeName());
}
settings.setType(SearchType.fullText);
CmsAppWorkplaceUi.get().showApp(CmsSourceSearchAppConfiguration.APP_ID, CmsSourceSearchApp.generateState(settings));
}
});
hLayout.addComponent(type);
hLayout.addComponent(result);
hLayout.addComponent(time);
hLayout.addComponent(showList);
hLayout.setExpandRatio(result, 1);
hLayout.setData(statResult);
hLayout.setSpacing(true);
hLayout.setComponentAlignment(showList, Alignment.MIDDLE_CENTER);
hLayout.setComponentAlignment(time, Alignment.MIDDLE_CENTER);
hLayout.setComponentAlignment(result, Alignment.MIDDLE_CENTER);
hLayout.setComponentAlignment(type, Alignment.MIDDLE_CENTER);
return hLayout;
}
Aggregations