use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsLinkValidationApp method getInternalComponent.
/**
* Returns the component for the internal link validation.<p>
*
* @return vaadin component
*/
private HorizontalSplitPanel getInternalComponent() {
m_rootLayout.setMainHeightFull(true);
HorizontalSplitPanel sp = new HorizontalSplitPanel();
sp.setSizeFull();
VerticalLayout result = new VerticalLayout();
result.setSizeFull();
VerticalLayout intro = CmsVaadinUtils.getInfoLayout(Messages.GUI_LINKVALIDATION_INTRODUCTION_0);
VerticalLayout nullResult = CmsVaadinUtils.getInfoLayout(Messages.GUI_LINKVALIDATION_NO_BROKEN_LINKS_0);
nullResult.setVisible(false);
CmsLinkValidationInternalTable table = new CmsLinkValidationInternalTable(intro, nullResult, new InternalValidator());
table.setVisible(false);
table.setSizeFull();
table.setWidth("100%");
result.addComponent(table);
result.addComponent(intro);
result.addComponent(nullResult);
VerticalLayout leftCol = new VerticalLayout();
leftCol.setSizeFull();
CmsInternalResources resources = new CmsInternalResources(table);
leftCol.addComponent(resources);
leftCol.setExpandRatio(resources, 1);
sp.setFirstComponent(leftCol);
sp.setSecondComponent(result);
sp.setSplitPosition(CmsFileExplorer.LAYOUT_SPLIT_POSITION, Unit.PIXELS);
return sp;
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsSitemapExtension method showLocaleComparison.
/**
* @see org.opencms.ui.shared.rpc.I_CmsSitemapServerRpc#showLocaleComparison(java.lang.String)
*/
public void showLocaleComparison(String id) {
if (m_localeCompareContainer == null) {
m_localeCompareContainer = new VerticalLayout();
CmsExternalLayout layout = new CmsExternalLayout(CmsGwtConstants.ID_LOCALE_COMPARISON, m_localeCompareContainer);
m_ui.getContent().addComponent(layout);
}
m_localeCompareContainer.removeAllComponents();
m_localeCompareContainer.addComponent(new CmsLocaleComparePanel(id));
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsLoginUI method showPasswordResetDialog.
/**
* Shows the password reset dialog.<p>
*/
public void showPasswordResetDialog() {
String caption = CmsVaadinUtils.getMessageText(Messages.GUI_PWCHANGE_FORGOT_PASSWORD_0);
A_CmsUI r = A_CmsUI.get();
r.setContent(new Label());
Window window = CmsBasicDialog.prepareWindow(DialogWidth.narrow);
CmsBasicDialog dialog = new CmsBasicDialog();
VerticalLayout result = new VerticalLayout();
dialog.setContent(result);
window.setContent(dialog);
window.setCaption(caption);
window.setClosable(true);
final CmsForgotPasswordDialog forgotPassword = new CmsForgotPasswordDialog();
window.addCloseListener(new CloseListener() {
/**
* Serial version id.
*/
private static final long serialVersionUID = 1L;
public void windowClose(CloseEvent e) {
forgotPassword.cancel();
}
});
for (Button button : forgotPassword.getButtons()) {
dialog.addButton(button);
}
r.addWindow(window);
window.center();
VerticalLayout vl = result;
vl.addComponent(forgotPassword);
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsHistoryDialog method tryCompare.
/**
* Opens the 'compare' view for the two selected versions of the resource.<p>
*
* @throws CmsException if something goes wrong
*/
public void tryCompare() throws CmsException {
CmsObject cms = A_CmsUI.getCmsObject();
CheckBox check1 = m_group1.getSelected();
CheckBox check2 = m_group2.getSelected();
if (!canCompare(check1, check2)) {
Notification.show(CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_SELECT_TWO_DIFFERENT_VERSIONS_0));
} else {
CmsHistoryResourceBean bean1 = (CmsHistoryResourceBean) (check1.getData());
CmsHistoryResourceBean bean2 = (CmsHistoryResourceBean) (check2.getData());
VerticalLayout diffContainer = new VerticalLayout();
diffContainer.setSpacing(true);
for (I_CmsDiffProvider diff : m_diffs) {
Optional<Component> optionalDiff = diff.diff(cms, bean1, bean2);
if (optionalDiff.isPresent()) {
diffContainer.addComponent(optionalDiff.get());
}
}
Panel panel = new Panel();
panel.setSizeFull();
diffContainer.setWidth("100%");
diffContainer.setMargin(true);
panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
panel.setContent(diffContainer);
openChildDialog(CmsHistoryDialog.this, panel, CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_COMPARE_0));
}
}
use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.
the class CmsHistoryDialog method openChildDialog.
/**
* Replaces the contents of the window containing a given component with a basic dialog
* consisting of a back button to restore the previous window state and another user provided widget.<p>
*
* @param currentComponent the component whose parent window's content should be replaced
* @param newView the user supplied part of the new window content
* @param newCaption the caption for the child dialog
*/
public static void openChildDialog(Component currentComponent, Component newView, String newCaption) {
final Window window = CmsVaadinUtils.getWindow(currentComponent);
final String oldCaption = window.getCaption();
CmsBasicDialog dialog = new CmsBasicDialog();
VerticalLayout vl = new VerticalLayout();
dialog.setContent(vl);
Button backButton = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_CHILD_DIALOG_GO_BACK_0));
HorizontalLayout buttonBar = new HorizontalLayout();
buttonBar.addComponent(backButton);
buttonBar.setMargin(true);
vl.addComponent(buttonBar);
vl.addComponent(newView);
final Component oldContent = window.getContent();
if (oldContent instanceof CmsBasicDialog) {
List<CmsResource> infoResources = ((CmsBasicDialog) oldContent).getInfoResources();
dialog.displayResourceInfo(infoResources);
if (oldContent instanceof CmsHistoryDialog) {
dialog.addButton(((CmsHistoryDialog) oldContent).createCloseButton());
}
}
backButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
window.setContent(oldContent);
window.setCaption(oldCaption);
window.center();
}
});
window.setContent(dialog);
window.setCaption(newCaption);
window.center();
}
Aggregations