Search in sources :

Example 76 with Label

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));
}
Also used : Label(com.vaadin.v7.ui.Label) VerticalLayout(com.vaadin.v7.ui.VerticalLayout) Component(com.vaadin.ui.Component)

Example 77 with Label

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;
}
Also used : CheckBox(com.vaadin.v7.ui.CheckBox) Label(com.vaadin.v7.ui.Label) VerticalLayout(com.vaadin.v7.ui.VerticalLayout) CmsSite(org.opencms.site.CmsSite)

Example 78 with Label

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);
}
Also used : Label(com.vaadin.v7.ui.Label)

Example 79 with 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);
    }
}
Also used : I_CmsResourceType(org.opencms.file.types.I_CmsResourceType) Label(com.vaadin.v7.ui.Label) CmsExplorerTypeSettings(org.opencms.workplace.explorer.CmsExplorerTypeSettings)

Example 80 with Label

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;
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) Label(com.vaadin.v7.ui.Label) CmsSearchReplaceSettings(org.opencms.ui.apps.search.CmsSearchReplaceSettings) Date(java.util.Date) HorizontalLayout(com.vaadin.v7.ui.HorizontalLayout)

Aggregations

Label (com.codename1.ui.Label)129 Form (com.codename1.ui.Form)85 Label (com.vaadin.ui.Label)56 Container (com.codename1.ui.Container)45 Button (com.codename1.ui.Button)41 Label (com.vaadin.v7.ui.Label)40 TextField (com.vaadin.v7.ui.TextField)32 BorderLayout (com.codename1.ui.layouts.BorderLayout)31 Button (com.vaadin.ui.Button)31 ComboBox (com.vaadin.v7.ui.ComboBox)31 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)31 Captions (de.symeda.sormas.api.i18n.Captions)29 Strings (de.symeda.sormas.api.i18n.Strings)28 VerticalLayout (com.vaadin.ui.VerticalLayout)26 FacadeProvider (de.symeda.sormas.api.FacadeProvider)26 HorizontalLayout (com.vaadin.ui.HorizontalLayout)24 Window (com.vaadin.ui.Window)24 CssStyles (de.symeda.sormas.ui.utils.CssStyles)24 ValoTheme (com.vaadin.ui.themes.ValoTheme)21 List (java.util.List)21