use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsLinkInFolderValidationApp method getComponentForState.
/**
* @see org.opencms.ui.apps.A_CmsWorkplaceApp#getComponentForState(java.lang.String)
*/
@Override
protected Component getComponentForState(String state) {
m_stateBean = CmsStateBean.parseState(state);
if (m_revertButton == null) {
addToolbars();
}
m_rootLayout.setMainHeightFull(true);
HorizontalSplitPanel panel = new HorizontalSplitPanel();
VerticalLayout result = new VerticalLayout();
result.setSizeFull();
VerticalLayout intro = CmsVaadinUtils.getInfoLayout(Messages.GUI_LINKVALIDATION_CHECK_FOLDER_RELATIONS_INTRO_0);
VerticalLayout nullResult = CmsVaadinUtils.getInfoLayout(Messages.GUI_LINKVALIDATION_CHECK_FOLDER_RELATIONS_NO_RESULT_0);
nullResult.setVisible(false);
m_table = new CmsLinkValidationInternalTable(intro, nullResult, new InFolderValidator());
m_table.setVisible(false);
m_table.setSizeFull();
m_table.setWidth("100%");
result.addComponent(m_table);
result.addComponent(intro);
result.addComponent(nullResult);
m_table.setVisible(false);
m_table.setSizeFull();
m_table.setWidth("100%");
m_resourceSelector = new CmsInternalResources(this);
panel.setFirstComponent(m_resourceSelector);
panel.setSecondComponent(result);
panel.setSplitPosition(CmsFileExplorer.LAYOUT_SPLIT_POSITION, Unit.PIXELS);
if (!m_stateBean.getResources().isEmpty()) {
m_table.update(m_stateBean.getResources());
m_resourceSelector.clearResources();
for (String resource : m_stateBean.getResources()) {
m_resourceSelector.addResource(resource);
}
}
return panel;
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsResourceTypeStatResultList method removeRow.
/**
* Removes result row representing given results.<p>
*
* @param layout with results
* @param result to be removed
*/
private void removeRow(VerticalLayout layout, CmsResourceTypeStatResult result) {
Component componentToRemove = null;
Iterator<Component> iterator = layout.iterator();
while (iterator.hasNext()) {
Component component = iterator.next();
if (component instanceof HorizontalLayout) {
if (result.equals(((HorizontalLayout) component).getData())) {
componentToRemove = component;
}
}
}
if (componentToRemove != null) {
layout.removeComponent(componentToRemove);
}
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsMessageBundleEditor method createMainComponent.
/**
* Creates the main component of the editor with all sub-components.
* @return the completely filled main component of the editor.
* @throws IOException thrown if setting the table's content data source fails.
* @throws CmsException thrown if setting the table's content data source fails.
*/
private Component createMainComponent() throws IOException, CmsException {
VerticalLayout mainComponent = new VerticalLayout();
mainComponent.setSizeFull();
mainComponent.addStyleName("o-message-bundle-editor");
m_table = createTable();
Panel navigator = new Panel();
navigator.setSizeFull();
navigator.setContent(m_table);
navigator.addActionHandler(new CmsMessageBundleEditorTypes.TableKeyboardHandler(m_table));
navigator.addStyleName("v-panel-borderless");
mainComponent.addComponent(m_options.getOptionsComponent());
mainComponent.addComponent(navigator);
mainComponent.setExpandRatio(navigator, 1f);
m_options.updateShownOptions(m_model.hasMasterMode(), m_model.canAddKeys());
return mainComponent;
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class A_CmsAttributeDiff method diff.
/**
* @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
*/
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException {
List<CmsAttributeComparison> attrCompare = getDifferences(cms, v1, v2);
if (attrCompare.isEmpty()) {
return Optional.absent();
}
List<CmsPropertyCompareBean> compareBeans = Lists.newArrayList();
for (CmsAttributeComparison comp : attrCompare) {
compareBeans.add(new CmsPropertyCompareBean(comp));
}
CmsBeanTableBuilder<CmsPropertyCompareBean> builder = CmsBeanTableBuilder.newInstance(CmsPropertyCompareBean.class, A_CmsUI.get().getDisplayType().toString());
builder.setMacroResolver(new CmsVersionMacroResolver(v1, v2));
Table table = builder.buildTable(compareBeans);
table.setSortEnabled(false);
table.setWidth("100%");
table.setPageLength(Math.min(12, compareBeans.size()));
table.setStyleName(COMPARE_TABLE_MARKER);
VerticalLayout vl = new VerticalLayout();
vl.setMargin(true);
vl.addComponent(table);
Panel panel = new Panel(getCaption());
panel.setContent(vl);
return Optional.fromNullable((Component) panel);
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsShowVersionButtons method diff.
/**
* @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
*/
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) {
Panel panel = new Panel("");
panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
HorizontalLayout hl = new HorizontalLayout();
panel.setContent(hl);
hl.addComponent(createButton(cms, v1));
hl.addComponent(createButton(cms, v2));
VerticalLayout outerContainer = new VerticalLayout();
outerContainer.addComponent(hl);
outerContainer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT);
outerContainer.setMargin(true);
hl.setSpacing(true);
return Optional.fromNullable((Component) outerContainer);
}
Aggregations