Here are the examples of the java api com.vaadin.ui.HorizontalLayout.setHeight() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
51 Examples
19
View Complete Implementation : UploadProgressInfoWindow.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private HorizontalLayout getCaptionLayout() {
final HorizontalLayout captionLayout = new HorizontalLayout();
captionLayout.setSizeFull();
captionLayout.setHeight("36px");
captionLayout.addComponents(windowCaption, closeButton);
captionLayout.setExpandRatio(windowCaption, 1.0F);
captionLayout.addStyleName("v-window-header");
return captionLayout;
}
19
View Complete Implementation : AbstractFilterHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
setStyleName("filter-btns-header-layout");
typeHeaderLayout = new HorizontalLayout();
typeHeaderLayout.setHeight(32, Unit.PIXELS);
typeHeaderLayout.setWidth(100.0F, Unit.PERCENTAGE);
typeHeaderLayout.addComponentAsFirst(replacedle);
typeHeaderLayout.addStyleName(SPUIStyleDefinitions.WIDGET_replacedLE);
typeHeaderLayout.setComponentAlignment(replacedle, Alignment.TOP_LEFT);
if (menu != null) {
typeHeaderLayout.addComponent(menu);
typeHeaderLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT);
}
typeHeaderLayout.addComponent(hideIcon);
typeHeaderLayout.setComponentAlignment(hideIcon, Alignment.TOP_RIGHT);
typeHeaderLayout.setExpandRatio(replacedle, 1.0F);
addComponent(typeHeaderLayout);
}
19
View Complete Implementation : OaExpressionsEditorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// buttonadd
buttonadd = new Button();
buttonadd.setCaption("Add");
buttonadd.setImmediate(true);
buttonadd.setWidth("-1px");
buttonadd.setHeight("-1px");
horizontalLayout_1.addComponent(buttonadd);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove");
buttonRemove.setImmediate(true);
buttonRemove.setDescription("Remove selected expression(s).");
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayout_1.addComponent(buttonRemove);
return horizontalLayout_1;
}
19
View Complete Implementation : TwinColumnSearchableSelect.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
public void setHeight(String height) {
super.setHeight(height);
selectedTable.setHeight(height);
availableTable.setHeight(height);
mainLayout.setHeight(height);
}
19
View Complete Implementation : UserManagement.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
// common part: create layout
horizontalLayoutToolbar = new HorizontalLayout();
horizontalLayoutToolbar.setImmediate(false);
horizontalLayoutToolbar.setWidth("-1px");
horizontalLayoutToolbar.setHeight("-1px");
horizontalLayoutToolbar.setMargin(true);
horizontalLayoutToolbar.setSpacing(true);
// buttonAdd
buttonAdd = new Button();
buttonAdd.setCaption("Add User");
buttonAdd.setImmediate(false);
buttonAdd.setWidth("-1px");
buttonAdd.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonAdd);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove User");
buttonRemove.setImmediate(false);
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonRemove);
return horizontalLayoutToolbar;
}
19
View Complete Implementation : MainView.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
private HorizontalLayout addButtons() {
HorizontalLayout horizontalLayout = new HorizontalLayout();
/**
* Modules Button
*/
Button modules = new Button("Modules");
horizontalLayout.addComponent(modules);
modules.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
tabSheetManager.addTabWithVerticalLayout(new ModuleLayout(MainView.this), "Modules");
}
});
/**
* Runners Button
*/
Button runners = new Button("Runners");
horizontalLayout.addComponent(runners);
runners.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
tabSheetManager.addTabWithVerticalLayout(new RunnersLayout(), "Runners");
}
});
/**
* Users Button
*/
Button users = new Button("Users");
horizontalLayout.addComponent(users);
users.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
UI.getCurrent().addWindow(new UserListWindow(tabSheetManager));
}
});
/**
* Logs Button
*/
Button logs = new Button("Logs");
horizontalLayout.addComponent(logs);
logs.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
tabSheetManager.addTabWithVerticalLayout(new LogLayout(), "Logs");
}
});
/**
* Logout Button
*/
Button logout = new Button("Logout");
horizontalLayout.addComponent(logout);
logout.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
ShiroRealm.logout();
redirectToMainView();
}
});
float weight = logout.getHeight();
horizontalLayout.setHeight(String.valueOf(weight));
return horizontalLayout;
}
19
View Complete Implementation : TwinColumnSelect.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
public void setHeight(String height) {
super.setHeight(height);
selectedGrid.setHeight(height);
availableGrid.setHeight(height);
mainLayout.setHeight(height);
}
18
View Complete Implementation : AbstractPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
Copyright Apache License 2.0
Author : Hack23
/**
* Creates the page visit history.
*
* @param pageName
* the page name
* @param pageId
* the page id
* @param panelContent
* the panel content
*/
protected final void createPageVisitHistory(final String pageName, final String pageId, final VerticalLayout panelContent) {
final TabSheet tabsheet = new TabSheet();
tabsheet.setWidth(100, Unit.PERCENTAGE);
tabsheet.setHeight(100, Unit.PERCENTAGE);
panelContent.addComponent(tabsheet);
panelContent.setExpandRatio(tabsheet, ContentRatio.LARGE);
final HorizontalLayout tabContentPageItemRankHistory = new HorizontalLayout();
tabContentPageItemRankHistory.setWidth(100, Unit.PERCENTAGE);
tabContentPageItemRankHistory.setHeight(100, Unit.PERCENTAGE);
final Tab tabPageItemRankHistory = tabsheet.addTab(tabContentPageItemRankHistory);
tabPageItemRankHistory.setCaption(CURRENT_PAGE_VISIT_HISTORY);
adminChartDataManager.createApplicationActionEventPageElementDailySummaryChart(tabContentPageItemRankHistory, pageName, pageId);
final HorizontalLayout tabContentPageModeSummary = new HorizontalLayout();
tabContentPageModeSummary.setWidth(100, Unit.PERCENTAGE);
tabContentPageModeSummary.setHeight(100, Unit.PERCENTAGE);
final Tab tabPageModeSummary = tabsheet.addTab(tabContentPageModeSummary);
tabPageModeSummary.setCaption(GENERAL_PAGE_MODE_PAGE_VISIT);
adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(tabContentPageModeSummary, pageName);
}
17
View Complete Implementation : TargetFilterHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
final HorizontalLayout replacedleFilterIconsLayout = createHeaderFilterIconLayout();
replacedleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon);
if (permissionChecker.hasCreateTargetPermission()) {
replacedleFilterIconsLayout.addComponent(createfilterButton);
replacedleFilterIconsLayout.setComponentAlignment(createfilterButton, Alignment.TOP_LEFT);
}
replacedleFilterIconsLayout.setExpandRatio(headerCaption, 0.3F);
replacedleFilterIconsLayout.setExpandRatio(searchField, 0.7F);
replacedleFilterIconsLayout.setHeight("40px");
addComponent(replacedleFilterIconsLayout);
addStyleName("bordered-layout");
addStyleName("no-border-bottom");
}
16
View Complete Implementation : BasePortal.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private HorizontalLayout createHeader(String replacedle, final DashBoardController dashBoard) {
HorizontalLayout header = new HorizontalLayout();
header.setWidth("100%");
header.setHeight("25");
replacedleLabel = new Label(replacedle);
replacedleLabel.setStyleName(ValoTheme.LABEL_COLORED);
header.addComponent(replacedleLabel);
HorizontalLayout controlLayout = new HorizontalLayout();
Button removeButton = new Button(FontAwesome.CLOSE);
removeButton.setStyleName(ValoTheme.BUTTON_LINK);
removeButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
dashBoard.removeComponent(BasePortal.this);
Tblportal portal = JpaBaseDao.getGenericDao(Tblportal.clreplaced).findOneByAttribute(Tblportal_.guid, guid);
if (portal != null) {
portal.getPortalLayout().removePortal(portal);
JpaDslBuilder<Tblportalconfig> q = JpaBaseDao.getGenericDao(Tblportalconfig.clreplaced).select();
q.where(q.eq(Tblportalconfig_.portal, portal)).delete();
EnreplacedyManagerProvider.remove(portal);
}
}
});
if (creplacederConfigurePortal()) {
addCustomHeaderButtons(controlLayout);
controlLayout.addComponent(removeButton);
}
header.addComponent(controlLayout);
header.setComponentAlignment(controlLayout, Alignment.MIDDLE_RIGHT);
return header;
}
16
View Complete Implementation : AdminUI.java
Copyright Mozilla Public License 2.0
Author : sensiasoft
Copyright Mozilla Public License 2.0
Author : sensiasoft
protected Component buildHeader() {
HorizontalLayout header = new HorizontalLayout();
header.setMargin(false);
header.setHeight(100.0f, Unit.PIXELS);
header.setWidth(100.0f, Unit.PERCENTAGE);
Image img = new Image(null, LOGO_ICON);
img.setHeight(90, Unit.PIXELS);
img.setStyleName(STYLE_LOGO);
header.addComponent(img);
Label replacedle = new Label("SensorHub");
replacedle.addStyleName(UIConstants.STYLE_H1);
replacedle.addStyleName(STYLE_LOGO);
replacedle.setWidth(null);
header.addComponent(replacedle);
header.setExpandRatio(img, 0);
header.setExpandRatio(replacedle, 1);
header.setComponentAlignment(img, Alignment.MIDDLE_LEFT);
header.setComponentAlignment(replacedle, Alignment.MIDDLE_RIGHT);
return header;
}
15
View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private Component dashboardManagement() {
VerticalLayout layout = new VerticalLayout();
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setWidth("100%");
buttonLayout.setHeight("50");
Button newDashboard = createNewButton();
Button rename = createRenameButton();
addClickListenerToRenameButton(rename);
newDashboard.addClickListener(new ClickListener() {
private static final long serialVersionUID = -609738416141590613L;
@Override
public void buttonClick(ClickEvent event) {
createDashboard(null);
}
});
buttonLayout.addComponent(newDashboard);
buttonLayout.addComponent(rename);
Button createMakeDefaultButton = createMakeDefaultButton();
addClickListenerToDefaultButton(createMakeDefaultButton);
buttonLayout.addComponent(createMakeDefaultButton);
// buttonLayout.addComponent(copy);
// buttonLayout.addComponent(share);
createDashboardSelector();
Button createDeleteButton = createDeleteButton();
addClickListenerToDeleteButton(createDeleteButton);
buttonLayout.addComponent(createDeleteButton);
if (creplacederShareDashboards()) {
Button createShareButton = createShareButton();
buttonLayout.addComponent(createShareButton);
addClickListenerToShareButton(createShareButton);
}
TabSheet selectorHolder = new TabSheet();
selectorHolder.addTab(layout, "Dashboards");
layout.addComponent(dashBoardSelector);
layout.setExpandRatio(dashBoardSelector, 1);
layout.addComponent(buttonLayout);
layout.setHeight("250");
// layout.setSizeFull();
return selectorHolder;
}
15
View Complete Implementation : MainLayout.java
Copyright Apache License 2.0
Author : alenca
Copyright Apache License 2.0
Author : alenca
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_3() {
// common part: create layout
horizontalLayout_3 = new HorizontalLayout();
horizontalLayout_3.setImmediate(false);
horizontalLayout_3.setWidth("100.0%");
horizontalLayout_3.setHeight("100.0%");
horizontalLayout_3.setMargin(false);
// tabSheet_1
tabSheet_1 = new TabSheet();
tabSheet_1.setImmediate(false);
tabSheet_1.setWidth("100.0%");
tabSheet_1.setHeight("100.0%");
horizontalLayout_3.addComponent(tabSheet_1);
return horizontalLayout_3;
}
15
View Complete Implementation : AbstractMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
final HorizontalLayout headerLayout = new HorizontalLayout();
headerLayout.addStyleName(SPUIStyleDefinitions.WIDGET_replacedLE);
headerLayout.setSpacing(false);
headerLayout.setMargin(false);
headerLayout.setSizeFull();
headerLayout.addComponent(headerCaption);
if (hasCreatePermission()) {
headerLayout.addComponents(addIcon);
headerLayout.setComponentAlignment(addIcon, Alignment.MIDDLE_RIGHT);
}
headerLayout.setExpandRatio(headerCaption, 1.0F);
final HorizontalLayout headerWrapperLayout = new HorizontalLayout();
headerWrapperLayout.addStyleName("bordered-layout" + " " + "no-border-bottom" + " " + "metadata-table-margin");
headerWrapperLayout.addComponent(headerLayout);
headerWrapperLayout.setWidth("100%");
headerLayout.setHeight("30px");
final VerticalLayout tableLayout = new VerticalLayout();
tableLayout.setSizeFull();
tableLayout.setHeight("100%");
tableLayout.addComponent(headerWrapperLayout);
tableLayout.addComponent(metaDataGrid);
tableLayout.addStyleName("table-layout");
tableLayout.setExpandRatio(metaDataGrid, 1.0F);
final VerticalLayout metadataFieldsLayout = createMetadataFieldsLayout();
mainLayout = new HorizontalLayout();
mainLayout.addComponent(tableLayout);
mainLayout.addComponent(metadataFieldsLayout);
mainLayout.setExpandRatio(tableLayout, 0.5F);
mainLayout.setExpandRatio(metadataFieldsLayout, 0.5F);
mainLayout.setSizeFull();
mainLayout.setSpacing(true);
setCompositionRoot(mainLayout);
setSizeFull();
}
15
View Complete Implementation : AbstractGridHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
final HorizontalLayout replacedleFilterIconsLayout = createHeaderFilterIconLayout();
replacedleFilterIconsLayout.addComponents(headerCaptionLayout);
if (isAllowSearch() && isRollout()) {
replacedleFilterIconsLayout.addComponents(searchField, searchResetIcon);
replacedleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F);
replacedleFilterIconsLayout.setExpandRatio(searchField, 0.7F);
}
if (hasCreatePermission() && isRollout()) {
replacedleFilterIconsLayout.addComponent(addButton);
replacedleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT);
}
if (showCloseButton()) {
replacedleFilterIconsLayout.addComponent(closeButton);
replacedleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT);
}
replacedleFilterIconsLayout.setHeight("40px");
addComponent(replacedleFilterIconsLayout);
addStyleName("bordered-layout");
addStyleName("no-border-bottom");
}
15
View Complete Implementation : AbstractView.java
Copyright Apache License 2.0
Author : Hack23
Copyright Apache License 2.0
Author : Hack23
/**
* Creates the basic layout with panel and footer.
*
* @param panelName
* the panel name
*/
protected final void createBasicLayoutWithPanelAndFooter(final String panelName) {
final VerticalLayout layout = createFullSizeVerticalLayout();
final VerticalLayout pageModeContent = createFullSizeVerticalLayout(false, false);
layout.addComponent(pageModeContent);
final HorizontalLayout topHeader = new HorizontalLayout();
addLogoToHeader(topHeader);
createTopreplacedleHeader(topHeader);
topHeaderRightPanel.removeAllComponents();
topHeader.addComponent(topHeaderRightPanel);
topHeader.setComponentAlignment(topHeaderRightPanel, Alignment.MIDDLE_RIGHT);
topHeader.setExpandRatio(topHeaderRightPanel, ContentRatio.LARGE);
createTopHeaderActionsForUserContext();
topHeaderRightPanel.setWidth("100%");
topHeaderRightPanel.setHeight("50px");
topHeader.setWidth("100%");
topHeader.setHeight("50px");
pageModeContent.addComponent(topHeader);
pageModeContent.setComponentAlignment(topHeader, Alignment.TOP_CENTER);
pageModeContent.addComponent(getBarmenu());
pageModeContent.setComponentAlignment(getBarmenu(), Alignment.TOP_CENTER);
panel = new Panel(panelName);
panel.addStyleName("v-panel-page-panel");
panel.setSizeFull();
pageModeContent.addComponent(panel);
pageModeContent.setExpandRatio(panel, ContentRatio.FULL_SIZE);
pageModeContent.addComponent(pageLinkFactory.createMainViewPageLink());
setContent(layout);
setWidth(100, Unit.PERCENTAGE);
setHeight(100, Unit.PERCENTAGE);
setSizeFull();
}
14
View Complete Implementation : RangeEditorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
// common part: create layout
horizontalLayout_2 = new HorizontalLayout();
horizontalLayout_2.setImmediate(false);
horizontalLayout_2.setWidth("-1px");
horizontalLayout_2.setHeight("-1px");
horizontalLayout_2.setMargin(false);
horizontalLayout_2.setSpacing(true);
// comboBoxMax
comboBoxMax = new ComboBox();
comboBoxMax.setCaption("Maximum Type");
comboBoxMax.setImmediate(true);
comboBoxMax.setDescription("Select the type for the maximum.");
comboBoxMax.setWidth("-1px");
comboBoxMax.setHeight("-1px");
horizontalLayout_2.addComponent(comboBoxMax);
// textFieldMax
textFieldMax = new TextField();
textFieldMax.setCaption("Maximum Value");
textFieldMax.setImmediate(true);
textFieldMax.setDescription("Enter a value for the maxmum.");
textFieldMax.setWidth("-1px");
textFieldMax.setHeight("-1px");
textFieldMax.setInvalidAllowed(false);
textFieldMax.setInputPrompt("eg. 100");
horizontalLayout_2.addComponent(textFieldMax);
return horizontalLayout_2;
}
14
View Complete Implementation : RangeEditorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// comboBoxMin
comboBoxMin = new ComboBox();
comboBoxMin.setCaption("Minimum Type");
comboBoxMin.setImmediate(true);
comboBoxMin.setDescription("Select the type for the minimum.");
comboBoxMin.setWidth("-1px");
comboBoxMin.setHeight("-1px");
horizontalLayout_1.addComponent(comboBoxMin);
// textFieldMin
textFieldMin = new TextField();
textFieldMin.setCaption("Minimum Value");
textFieldMin.setImmediate(true);
textFieldMin.setDescription("Enter a value for the minimum.");
textFieldMin.setWidth("-1px");
textFieldMin.setHeight("-1px");
textFieldMin.setInvalidAllowed(false);
textFieldMin.setInputPrompt("eg. 1");
horizontalLayout_1.addComponent(textFieldMin);
horizontalLayout_1.setComponentAlignment(textFieldMin, new Alignment(9));
return horizontalLayout_1;
}
14
View Complete Implementation : ApplyEditorWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// textAreaDescription
textAreaDescription = new TextArea();
textAreaDescription.setCaption("Enter A Description");
textAreaDescription.setImmediate(false);
textAreaDescription.setWidth("50.0%");
textAreaDescription.setHeight("-1px");
horizontalLayout_1.addComponent(textAreaDescription);
// textFieldFilter
textFieldFilter = new TextField();
textFieldFilter.setCaption("Filter Function By ID");
textFieldFilter.setImmediate(false);
textFieldFilter.setWidth("-1px");
textFieldFilter.setHeight("-1px");
horizontalLayout_1.addComponent(textFieldFilter);
horizontalLayout_1.setComponentAlignment(textFieldFilter, new Alignment(9));
// comboBoxDatatypeFilter
comboBoxDatatypeFilter = new ComboBox();
comboBoxDatatypeFilter.setCaption("Filter By Data Type");
comboBoxDatatypeFilter.setImmediate(false);
comboBoxDatatypeFilter.setWidth("-1px");
comboBoxDatatypeFilter.setHeight("-1px");
horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter, new Alignment(9));
// checkBoxFilterIsBag
checkBoxFilterIsBag = new CheckBox();
checkBoxFilterIsBag.setCaption("Is Bag Filter");
checkBoxFilterIsBag.setImmediate(false);
checkBoxFilterIsBag.setWidth("-1px");
checkBoxFilterIsBag.setHeight("-1px");
horizontalLayout_1.addComponent(checkBoxFilterIsBag);
horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag, new Alignment(9));
return horizontalLayout_1;
}
14
View Complete Implementation : AttributeSelectionWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
// optionGroupAttribute
optionGroupAttribute = new OptionGroup();
optionGroupAttribute.setCaption("Attribute Source");
optionGroupAttribute.setImmediate(false);
optionGroupAttribute.setWidth("-1px");
optionGroupAttribute.setHeight("-1px");
optionGroupAttribute.setInvalidAllowed(false);
horizontalLayout_1.addComponent(optionGroupAttribute);
// verticalLayout_2
verticalLayout_2 = buildVerticalLayout_2();
horizontalLayout_1.addComponent(verticalLayout_2);
return horizontalLayout_1;
}
14
View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
Copyright GNU General Public License v3.0
Author : AskNowQA
private void createHeader() {
HorizontalLayout header = new HorizontalLayout();
header.addStyleName("header");
header.setWidth("100%");
header.setHeight(null);
addComponent(header);
Resource res = new ThemeResource("images/sparql2nl_logo.gif");
Label pad = new Label();
pad.setWidth("100%");
pad.setIcon(res);
pad.addStyleName("blub");
// header.addComponent(pad);
// header.setExpandRatio(pad, 1f);
}
14
View Complete Implementation : SimpleBoxFormBuilder.java
Copyright Apache License 2.0
Author : chelu
Copyright Apache License 2.0
Author : chelu
/**
* Builds the panel form.
* @return the form component
*/
public Component getForm() {
for (int i = 0; i < columns.size(); i++) {
VerticalLayout box = columns.get(i);
int width = columnsWidth.get(i);
if (width > SIZE_UNDEFINED && width < SIZE_FULL) {
box.setWidth(width, Unit.PIXELS);
// shrink container
container.setExpandRatio(box, 0);
} else if (width == SIZE_FULL) {
box.setWidth("100%");
container.setExpandRatio(box, 1);
} else {
container.setExpandRatio(box, 0);
box.setWidth(Sizeable.SIZE_UNDEFINED, Unit.PIXELS);
}
for (int j = 0; j < rowsHeight.size(); j++) {
Component c = box.getComponent(j);
int height = rowsHeight.get(j);
if (height > SIZE_UNDEFINED && height < SIZE_FULL) {
c.setHeight(height, Unit.PIXELS);
box.setExpandRatio(c, 0);
} else if (height == SIZE_FULL) {
c.setHeight("100%");
box.setExpandRatio(c, 1);
} else {
box.setExpandRatio(c, 0);
}
}
}
if (fixedHeight) {
container.setHeight(getFormHeight(), Unit.PIXELS);
} else {
container.setHeight(100, Unit.PERCENTAGE);
}
if (fixedWidth) {
container.setWidth(Sizeable.SIZE_UNDEFINED, Unit.PIXELS);
} else {
container.setWidth(100, Unit.PERCENTAGE);
}
container.addStyleName("jd-box");
if (debug)
container.addStyleName("jd-box-debug");
return container;
}
13
View Complete Implementation : MainLayout.java
Copyright Apache License 2.0
Author : alenca
Copyright Apache License 2.0
Author : alenca
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_4() {
// common part: create layout
horizontalLayout_4 = new HorizontalLayout();
horizontalLayout_4.setImmediate(false);
horizontalLayout_4.setWidth("100.0%");
horizontalLayout_4.setHeight("-1px");
horizontalLayout_4.setMargin(false);
// versionLabel
versionLabel = new Label();
versionLabel.setImmediate(false);
versionLabel.setWidth("-1px");
versionLabel.setHeight("-1px");
versionLabel.setValue("zklogtool web application 0.1");
horizontalLayout_4.addComponent(versionLabel);
horizontalLayout_4.setComponentAlignment(versionLabel, new Alignment(34));
return horizontalLayout_4;
}
13
View Complete Implementation : PDPManagement.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
// common part: create layout
horizontalLayoutToolbar = new HorizontalLayout();
horizontalLayoutToolbar.setImmediate(false);
horizontalLayoutToolbar.setWidth("-1px");
horizontalLayoutToolbar.setHeight("-1px");
horizontalLayoutToolbar.setMargin(true);
horizontalLayoutToolbar.setSpacing(true);
// buttonCreate
buttonCreate = new Button();
buttonCreate.setCaption("Create Group");
buttonCreate.setImmediate(false);
buttonCreate.setWidth("-1px");
buttonCreate.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonCreate);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove Group");
buttonRemove.setImmediate(false);
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonRemove);
return horizontalLayoutToolbar;
}
13
View Complete Implementation : ViewUtil.java
Copyright Apache License 2.0
Author : opensecuritycontroller
Copyright Apache License 2.0
Author : opensecuritycontroller
/**
* @param caption
* Caption Text Representing Header
* @param guid
* Help GUID for caller view
* @return
* Horizontal Layout containing Caption text and Help button
*/
public static HorizontalLayout createSubHeader(String caption, String guid) {
HorizontalLayout subHeader = new HorizontalLayout();
subHeader.setWidth("100%");
subHeader.setHeight("35px");
subHeader.setSpacing(true);
subHeader.addStyleName("toolbar");
final Label replacedle = new Label(caption);
replacedle.setSizeUndefined();
subHeader.addComponent(replacedle);
subHeader.setComponentAlignment(replacedle, Alignment.MIDDLE_LEFT);
subHeader.setExpandRatio(replacedle, 1);
// create help button if we have some GUID else do not add this button
if (guid != null) {
Button helpButton = new Button();
helpButton.setImmediate(true);
helpButton.setStyleName(Reindeer.BUTTON_LINK);
helpButton.setDescription("Help");
helpButton.setIcon(new ThemeResource("img/Help.png"));
subHeader.addComponent(helpButton);
helpButton.addClickListener(new HelpButtonListener(guid));
}
return subHeader;
}
12
View Complete Implementation : OpenTransactionLogFileDialog.java
Copyright Apache License 2.0
Author : alenca
Copyright Apache License 2.0
Author : alenca
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// followCheckbox
followCheckbox = new CheckBox();
followCheckbox.setCaption("Follow");
followCheckbox.setImmediate(false);
followCheckbox.setWidth("-1px");
followCheckbox.setHeight("-1px");
horizontalLayout_1.addComponent(followCheckbox);
// startFromLastCheckbox
startFromLastCheckbox = new CheckBox();
startFromLastCheckbox.setCaption("Start from last transaction");
startFromLastCheckbox.setImmediate(false);
startFromLastCheckbox.setWidth("-1px");
startFromLastCheckbox.setHeight("-1px");
horizontalLayout_1.addComponent(startFromLastCheckbox);
return horizontalLayout_1;
}
12
View Complete Implementation : AttributeSimpleCreatorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// tableCategory
tableCategory = new Table();
tableCategory.setCaption("Choose Category");
tableCategory.setImmediate(false);
tableCategory.setWidth("-1px");
tableCategory.setHeight("-1px");
tableCategory.setInvalidAllowed(false);
tableCategory.setRequired(true);
horizontalLayout_1.addComponent(tableCategory);
// tableDatatype
tableDatatype = new Table();
tableDatatype.setCaption("Choose Data Type");
tableDatatype.setImmediate(false);
tableDatatype.setWidth("-1px");
tableDatatype.setHeight("-1px");
tableDatatype.setInvalidAllowed(false);
tableDatatype.setRequired(true);
horizontalLayout_1.addComponent(tableDatatype);
return horizontalLayout_1;
}
12
View Complete Implementation : AttributeStandardSelectorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
// common part: create layout
horizontalLayout_2 = new HorizontalLayout();
horizontalLayout_2.setImmediate(false);
horizontalLayout_2.setWidth("-1px");
horizontalLayout_2.setHeight("-1px");
horizontalLayout_2.setMargin(false);
horizontalLayout_2.setSpacing(true);
// tableAttributes
tableAttributes = new Table();
tableAttributes.setCaption("Standard Attributes");
tableAttributes.setImmediate(false);
tableAttributes.setWidth("-1px");
tableAttributes.setHeight("-1px");
tableAttributes.setInvalidAllowed(false);
tableAttributes.setRequired(true);
horizontalLayout_2.addComponent(tableAttributes);
// tableDatatypes
tableDatatypes = new Table();
tableDatatypes.setCaption("Standard Data Types");
tableDatatypes.setImmediate(false);
tableDatatypes.setWidth("-1px");
tableDatatypes.setHeight("-1px");
tableDatatypes.setInvalidAllowed(false);
tableDatatypes.setRequired(true);
horizontalLayout_2.addComponent(tableDatatypes);
return horizontalLayout_2;
}
12
View Complete Implementation : PIPParameterComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// buttonAdd
buttonAdd = new Button();
buttonAdd.setCaption("Add");
buttonAdd.setImmediate(false);
buttonAdd.setWidth("-1px");
buttonAdd.setHeight("-1px");
horizontalLayout_1.addComponent(buttonAdd);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove");
buttonRemove.setImmediate(false);
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayout_1.addComponent(buttonRemove);
// buttonClone
buttonClone = new Button();
buttonClone.setCaption("Clone");
buttonClone.setImmediate(false);
buttonClone.setWidth("-1px");
buttonClone.setHeight("-1px");
horizontalLayout_1.addComponent(buttonClone);
// buttonClear
buttonClear = new Button();
buttonClear.setCaption("Clear All");
buttonClear.setImmediate(false);
buttonClear.setWidth("-1px");
buttonClear.setHeight("-1px");
horizontalLayout_1.addComponent(buttonClear);
return horizontalLayout_1;
}
12
View Complete Implementation : ObligationAdviceEditorWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// buttonAdd
buttonAdd = new Button();
buttonAdd.setCaption("Add Expression");
buttonAdd.setImmediate(false);
buttonAdd.setWidth("-1px");
buttonAdd.setHeight("-1px");
horizontalLayout_1.addComponent(buttonAdd);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove Expression");
buttonRemove.setImmediate(false);
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayout_1.addComponent(buttonRemove);
// buttonClear
buttonClear = new Button();
buttonClear.setCaption("Clear Expressions");
buttonClear.setImmediate(false);
buttonClear.setWidth("-1px");
buttonClear.setHeight("-1px");
horizontalLayout_1.addComponent(buttonClear);
return horizontalLayout_1;
}
12
View Complete Implementation : BasePortalAdder.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
public Component getVaadinAddLayout(final DashBoardController dashBoard, final DashBoardView view) {
final String replacedle = getreplacedle();
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
Label label = new Label(replacedle);
Button button = createAddButton(replacedle);
label.setWidth("200");
button.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
Tblportallayout layout = JpaBaseDao.getGenericDao(Tblportallayout.clreplaced).findOneByAttribute(Tblportallayout_.guid, portalLayoutGuid);
Tblportal portal = new Tblportal();
layout.addPortal(portal);
portal.setType(getPortalEnum().toString());
EnreplacedyManagerProvider.persist(portal);
addPortal(dashBoard, portal);
view.closeToolBar();
}
});
layout.addComponent(button);
layout.addComponent(label);
layout.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
layout.setHeight("38");
return layout;
}
11
View Complete Implementation : PIPManagement.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
// common part: create layout
horizontalLayoutToolbar = new HorizontalLayout();
horizontalLayoutToolbar.setImmediate(false);
horizontalLayoutToolbar.setWidth("-1px");
horizontalLayoutToolbar.setHeight("-1px");
horizontalLayoutToolbar.setMargin(false);
horizontalLayoutToolbar.setSpacing(true);
// buttonAdd
buttonAdd = new Button();
buttonAdd.setCaption("Add Configuration");
buttonAdd.setImmediate(true);
buttonAdd.setWidth("-1px");
buttonAdd.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonAdd);
// buttonClone
buttonClone = new Button();
buttonClone.setCaption("Clone Configuration");
buttonClone.setImmediate(true);
buttonClone.setWidth("-1px");
buttonClone.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonClone);
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove Configuration");
buttonRemove.setImmediate(true);
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonRemove);
// buttonImport
buttonImport = new Button();
buttonImport.setCaption("Import Configuration");
buttonImport.setImmediate(false);
buttonImport.setDescription("Imports a configuration from a properties file.");
buttonImport.setWidth("-1px");
buttonImport.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonImport);
return horizontalLayoutToolbar;
}
11
View Complete Implementation : EnumerationEditorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// buttonAdd
buttonAdd = new Button();
buttonAdd.setCaption("Add");
buttonAdd.setImmediate(true);
buttonAdd.setDescription("Add a new enumeration value.");
buttonAdd.setWidth("-1px");
buttonAdd.setHeight("-1px");
horizontalLayout_1.addComponent(buttonAdd);
horizontalLayout_1.setComponentAlignment(buttonAdd, new Alignment(9));
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove");
buttonRemove.setImmediate(true);
buttonRemove.setDescription("Remove the selected enumeration value.");
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayout_1.addComponent(buttonRemove);
horizontalLayout_1.setComponentAlignment(buttonRemove, new Alignment(10));
// buttonClearAll
buttonClearAll = new Button();
buttonClearAll.setCaption("Clear All");
buttonClearAll.setImmediate(false);
buttonClearAll.setDescription("Clears all the values out.");
buttonClearAll.setWidth("-1px");
buttonClearAll.setHeight("-1px");
horizontalLayout_1.addComponent(buttonClearAll);
return horizontalLayout_1;
}
11
View Complete Implementation : EmailTargetLayout.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private EmailTargetLine insertTargetLine(final int row, ReportEmailRecipient recip) {
final HorizontalLayout recipientHolder = new HorizontalLayout();
recipientHolder.setSizeFull();
recipientHolder.setSpacing(true);
recipientHolder.setHeight("30");
final List<ReportEmailRecipientVisibility> targetTypes = new LinkedList<ReportEmailRecipientVisibility>();
for (ReportEmailRecipientVisibility rerv : ReportEmailRecipientVisibility.values()) {
targetTypes.add(rerv);
}
final EmailTargetLine line = new EmailTargetLine();
line.row = row;
line.targetTypeCombo = new ComboBox(null, targetTypes);
line.targetTypeCombo.setWidth("80");
line.targetTypeCombo.select(targetTypes.get(0));
line.targetAddress = new ComboBox(null);
line.targetAddress.setImmediate(true);
line.targetAddress.setTextInputAllowed(true);
line.targetAddress.setInputPrompt("Enter Contact Name or email address");
line.targetAddress.setWidth("100%");
line.targetAddress.addValidator(new EmailValidator("Please enter a valid email address."));
getValidEmailContacts(line.targetAddress);
line.targetAddress.sereplacedemCaptionPropertyId("namedemail");
line.targetAddress.setNewItemsAllowed(true);
if (recip != null && recip.getEmail() != null) {
line.targetAddress.setValue(recip.getEmail());
line.targetTypeCombo.setValue(recip.getVisibility());
}
line.targetAddress.setNewItemHandler(new NewItemHandler() {
private static final long serialVersionUID = 1L;
@Override
public void addNewItem(final String newItemCaption) {
final IndexedContainer container = (IndexedContainer) line.targetAddress.getContainerDataSource();
final Item item = addItem(container, "", newItemCaption);
if (item != null) {
line.targetAddress.addItem(item.gereplacedemProperty("id").getValue());
line.targetAddress.setValue(item.gereplacedemProperty("id").getValue());
}
setHeight(calculateHeight());
}
});
if (recip != null) {
}
if (row == 0) {
line.actionButton = new Button("+");
line.actionButton.setDescription("Click to add another email address line.");
line.actionButton.setStyleName(Reindeer.BUTTON_SMALL);
line.actionButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 6505218353927273720L;
@Override
public void buttonClick(ClickEvent event) {
lines.add(insertTargetLine(lines.size(), null));
setHeight(calculateHeight());
}
});
} else {
line.actionButton = new Button("-");
line.actionButton.setDescription("Click to remove this email address line.");
line.actionButton.setStyleName(Reindeer.BUTTON_SMALL);
line.actionButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 3104323607502279386L;
@Override
public void buttonClick(ClickEvent event) {
removeComponent(recipientHolder);
lines.remove(line);
setHeight(calculateHeight());
}
});
}
recipientHolder.addComponent(line.targetTypeCombo);
recipientHolder.addComponent(line.targetAddress);
recipientHolder.addComponent(line.actionButton);
recipientHolder.setExpandRatio(line.targetAddress, 1);
addComponent(recipientHolder);
return line;
}
10
View Complete Implementation : AttributeSelectionWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// horizontalLayout_1
horizontalLayout_1 = buildHorizontalLayout_1();
mainLayout.addComponent(horizontalLayout_1);
// horizontalLayoutAttribute
horizontalLayoutAttribute = new HorizontalLayout();
horizontalLayoutAttribute.setImmediate(false);
horizontalLayoutAttribute.setWidth("-1px");
horizontalLayoutAttribute.setHeight("-1px");
horizontalLayoutAttribute.setMargin(false);
mainLayout.addComponent(horizontalLayoutAttribute);
mainLayout.setExpandRatio(horizontalLayoutAttribute, 1.0f);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Select");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
10
View Complete Implementation : ExpressionBuilderComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// buttonAddExpression
buttonAddExpression = new Button();
buttonAddExpression.setCaption("Add Expression");
buttonAddExpression.setImmediate(true);
buttonAddExpression.setWidth("-1px");
buttonAddExpression.setHeight("-1px");
horizontalLayout_1.addComponent(buttonAddExpression);
// buttonDeleteExpression
buttonDeleteExpression = new Button();
buttonDeleteExpression.setCaption("Delete Expression");
buttonDeleteExpression.setImmediate(true);
buttonDeleteExpression.setWidth("-1px");
buttonDeleteExpression.setHeight("-1px");
horizontalLayout_1.addComponent(buttonDeleteExpression);
// buttonClearAll
buttonClearAll = new Button();
buttonClearAll.setCaption("Clear All");
buttonClearAll.setImmediate(true);
buttonClearAll.setDescription("Clears all the expressions.");
buttonClearAll.setWidth("-1px");
buttonClearAll.setHeight("-1px");
horizontalLayout_1.addComponent(buttonClearAll);
// checkBoxShortName
checkBoxShortName = new CheckBox();
checkBoxShortName.setCaption("Display Short XACML ID's");
checkBoxShortName.setImmediate(false);
checkBoxShortName.setDescription("If checked, the right-most string of the function and datatype URI's will only be displayed.");
checkBoxShortName.setWidth("-1px");
checkBoxShortName.setHeight("-1px");
horizontalLayout_1.addComponent(checkBoxShortName);
return horizontalLayout_1;
}
10
View Complete Implementation : DateTimePickerInline.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
@SuppressWarnings("deprecation")
private VerticalLayout buildInline() {
try {
Date value = parseDate(field.getValue());
int hourNumber = value.getHours() % 12;
if (hourNumber == 0) {
hourNumber = 12;
}
displayTime.setValue(field.getValue());
} catch (Exception e) {
clearValue();
}
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
// layout.setMargin(true);
layout.setSpacing(true);
layout.setStyleName(Reindeer.BUTTON_SMALL);
displayTime.setWidth("100");
VerticalLayout hourPanelLabelWrapper = new VerticalLayout();
Label hourLabel = new Label("Hour");
// hourLabel.setBackgroundColor(headerColor);
hourLabel.setWidth("230");
// hourLabel.setHeight("30");
// hourLabel.setAutoFit(false);
HorizontalLayout innerHourLabelPanel = new HorizontalLayout();
// innerHourLabelPanel.setPadding(5);
innerHourLabelPanel.addComponent(hourLabel);
innerHourLabelPanel.setWidth("100");
// innerHourLabelPanel.setHeight("30");
hourPanelLabelWrapper.addComponent(innerHourLabelPanel);
VerticalLayout minuteLabelWrapper = new VerticalLayout();
minuteLabelWrapper.setWidth("60");
Label minuteLabel = new Label("Minute");
// minuteLabel.setBackgroundColor(headerColor);
// minuteLabel.setStyleName("njadmin-search-colour");
minuteLabel.setWidth("45");
// minuteLabel.setHeight("30");
// minuteLabel.setAutoFit(false);
VerticalLayout innerMinuteLabelPanel = new VerticalLayout();
// innerMinuteLabelPanel.setPadding(5);
innerMinuteLabelPanel.addComponent(minuteLabel);
innerMinuteLabelPanel.setWidth("45");
minuteLabelWrapper.addComponent(innerMinuteLabelPanel);
HorizontalLayout hourPanel = new HorizontalLayout();
// hourPanel.setPadding(5);
HorizontalLayout amPmPanel = new HorizontalLayout();
// amPmPanel.setPadding(5);
VerticalLayout amPmButtonPanel = new VerticalLayout();
amPmPanel.addComponent(amPmButtonPanel);
addAmPmButtons(amPmButtonPanel);
HorizontalLayout hourButtonPanel = new HorizontalLayout();
hourPanel.addComponent(hourButtonPanel);
addHourButtons(hourButtonPanel, 2, 6);
HorizontalLayout minutePanel = new HorizontalLayout();
// minutePanel.setPadding(5);
HorizontalLayout minuteButtonPanel = new HorizontalLayout();
minutePanel.addComponent(minuteButtonPanel);
addMinuteButtons(minuteButtonPanel, 2, 4);
minuteButtonPanel.setHeight("70");
HorizontalLayout amPmHourWrapper = new HorizontalLayout();
amPmHourWrapper.addComponent(hourPanel);
amPmHourWrapper.addComponent(amPmPanel);
hourPanelLabelWrapper.addComponent(amPmHourWrapper);
layout.addComponent(hourPanelLabelWrapper);
minuteLabelWrapper.addComponent(minutePanel);
layout.addComponent(minuteLabelWrapper);
layout.setExpandRatio(hourPanelLabelWrapper, 0.7f);
layout.setExpandRatio(minuteLabelWrapper, 0.3f);
return layout;
}
9
View Complete Implementation : AttributeDictionary.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
// common part: create layout
horizontalLayoutToolbar = new HorizontalLayout();
horizontalLayoutToolbar.setImmediate(false);
horizontalLayoutToolbar.setWidth("-1px");
horizontalLayoutToolbar.setHeight("-1px");
horizontalLayoutToolbar.setMargin(false);
horizontalLayoutToolbar.setSpacing(true);
// buttonNew
buttonNew = new Button();
buttonNew.setCaption("New");
buttonNew.setImmediate(true);
buttonNew.setDescription("Create a new attribute");
buttonNew.setWidth("70px");
buttonNew.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonNew);
horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(9));
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove");
buttonRemove.setImmediate(true);
buttonRemove.setDescription("Remove the selected attribute(s)");
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonRemove);
horizontalLayoutToolbar.setComponentAlignment(buttonRemove, new Alignment(9));
// buttonClone
buttonClone = new Button();
buttonClone.setCaption("Clone");
buttonClone.setImmediate(true);
buttonClone.setDescription("Clone an attribute.");
buttonClone.setWidth("-1px");
buttonClone.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonClone);
horizontalLayoutToolbar.setComponentAlignment(buttonClone, new Alignment(9));
// comboBoxFilterCategory
comboBoxFilterCategory = new ComboBox();
comboBoxFilterCategory.setCaption("Filter By Category");
comboBoxFilterCategory.setImmediate(false);
comboBoxFilterCategory.setWidth("-1px");
comboBoxFilterCategory.setHeight("-1px");
horizontalLayoutToolbar.addComponent(comboBoxFilterCategory);
// comboBoxFilterDatatype
comboBoxFilterDatatype = new ComboBox();
comboBoxFilterDatatype.setCaption("Filter By Data Type");
comboBoxFilterDatatype.setImmediate(false);
comboBoxFilterDatatype.setWidth("-1px");
comboBoxFilterDatatype.setHeight("-1px");
horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype);
return horizontalLayoutToolbar;
}
9
View Complete Implementation : ObadviceDictionary.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
// common part: create layout
horizontalLayoutToolbar = new HorizontalLayout();
horizontalLayoutToolbar.setImmediate(false);
horizontalLayoutToolbar.setWidth("-1px");
horizontalLayoutToolbar.setHeight("-1px");
horizontalLayoutToolbar.setMargin(false);
horizontalLayoutToolbar.setSpacing(true);
// buttonNew
buttonNew = new Button();
buttonNew.setCaption("New");
buttonNew.setImmediate(true);
buttonNew.setDescription("Add a new advice or obligation to the dictionary.");
buttonNew.setWidth("-1px");
buttonNew.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonNew);
horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(24));
// buttonRemove
buttonRemove = new Button();
buttonRemove.setCaption("Remove");
buttonRemove.setImmediate(true);
buttonRemove.setDescription("Remove the selected advice or obligation from the dictionary.");
buttonRemove.setWidth("-1px");
buttonRemove.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonRemove);
horizontalLayoutToolbar.setComponentAlignment(buttonRemove, new Alignment(24));
// buttonClone
buttonClone = new Button();
buttonClone.setCaption("Clone");
buttonClone.setImmediate(true);
buttonClone.setDescription("Clone the selected obligation/advice.");
buttonClone.setWidth("-1px");
buttonClone.setHeight("-1px");
horizontalLayoutToolbar.addComponent(buttonClone);
horizontalLayoutToolbar.setComponentAlignment(buttonClone, new Alignment(24));
// comboBoxFilter
comboBoxFilter = new ComboBox();
comboBoxFilter.setCaption("Filter By Type");
comboBoxFilter.setImmediate(false);
comboBoxFilter.setWidth("-1px");
comboBoxFilter.setHeight("-1px");
horizontalLayoutToolbar.addComponent(comboBoxFilter);
return horizontalLayoutToolbar;
}
9
View Complete Implementation : AttributeDictionarySelectorComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
// common part: create layout
horizontalLayout_2 = new HorizontalLayout();
horizontalLayout_2.setImmediate(false);
horizontalLayout_2.setWidth("-1px");
horizontalLayout_2.setHeight("-1px");
horizontalLayout_2.setMargin(false);
horizontalLayout_2.setSpacing(true);
// comboBoxCategoryFilter
comboBoxCategoryFilter = new ComboBox();
comboBoxCategoryFilter.setCaption("Filter Category");
comboBoxCategoryFilter.setImmediate(false);
comboBoxCategoryFilter.setWidth("-1px");
comboBoxCategoryFilter.setHeight("-1px");
horizontalLayout_2.addComponent(comboBoxCategoryFilter);
horizontalLayout_2.setExpandRatio(comboBoxCategoryFilter, 1.0f);
// buttonNewAttribute
buttonNewAttribute = new Button();
buttonNewAttribute.setCaption("New Attribute");
buttonNewAttribute.setImmediate(true);
buttonNewAttribute.setDescription("Click to create a new attribute in the dictionary.");
buttonNewAttribute.setWidth("-1px");
buttonNewAttribute.setHeight("-1px");
horizontalLayout_2.addComponent(buttonNewAttribute);
horizontalLayout_2.setComponentAlignment(buttonNewAttribute, new Alignment(10));
return horizontalLayout_2;
}
7
View Complete Implementation : XacmlAdminConsole.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("100.0%");
horizontalLayout_1.setHeight("40px");
horizontalLayout_1.setMargin(false);
// embedded_1
embedded_1 = new Embedded();
embedded_1.setImmediate(false);
embedded_1.setWidth("30px");
embedded_1.setHeight("30px");
embedded_1.setSource(new ThemeResource("img/att.png"));
embedded_1.setType(1);
embedded_1.setMimeType("image/png");
horizontalLayout_1.addComponent(embedded_1);
horizontalLayout_1.setComponentAlignment(embedded_1, new Alignment(33));
// caption
caption = new Label();
caption.setImmediate(false);
caption.setWidth("-1px");
caption.setHeight("-1px");
caption.setValue("Apache OpenAZ Admin Console");
horizontalLayout_1.addComponent(caption);
horizontalLayout_1.setExpandRatio(caption, 1.0f);
horizontalLayout_1.setComponentAlignment(caption, new Alignment(33));
// labelWelcome
labelWelcome = new Label();
labelWelcome.setImmediate(false);
labelWelcome.setWidth("-1px");
labelWelcome.setHeight("40px");
labelWelcome.setValue("Label");
horizontalLayout_1.addComponent(labelWelcome);
horizontalLayout_1.setComponentAlignment(labelWelcome, new Alignment(34));
return horizontalLayout_1;
}
7
View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
Copyright GNU General Public License v3.0
Author : AskNowQA
private Component createFeedbackComponent() {
feedbackPanel = new HorizontalLayout();
feedbackPanel.setSpacing(true);
feedbackPanel.setSizeFull();
feedbackPanel.addStyleName("white-border");
feedbackPanel.addStyleName("shadow-label");
feedbackPanel.setWidth("95%");
feedbackPanel.setHeight("80%");
feedbackPanel.setVisible(false);
feedbackLabel = new Label(" ", Label.CONTENT_XHTML);
feedbackLabel.setContentMode(Label.CONTENT_XHTML);
feedbackLabel.addStyleName("status-label");
feedbackLabel.setSizeFull();
feedbackPanel.addComponent(feedbackLabel);
feedbackPanel.setExpandRatio(feedbackLabel, 1f);
feedbackPanel.setComponentAlignment(feedbackLabel, Alignment.MIDDLE_CENTER);
wrongSolutionButton = new NativeButton("Wrong!");
wrongSolutionButton.setWidth("60px");
wrongSolutionButton.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Window otherSolutionsWindow = createOtherSolutionsWindow();
getApplication().getMainWindow().addWindow(otherSolutionsWindow);
}
});
wrongSolutionButton.addStyleName("shift-left");
// wrongSolutionButton.setVisible(false);
// feedbackPanel.addComponent(wrongSolutionButton);
// feedbackPanel.setComponentAlignment(wrongSolutionButton, Alignment.MIDDLE_CENTER);
return feedbackPanel;
}
7
View Complete Implementation : XacmlAdminConsole.java
Copyright MIT License
Author : att
Copyright MIT License
Author : att
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("100.0%");
horizontalLayout_1.setHeight("40px");
horizontalLayout_1.setMargin(false);
// embedded_1
embedded_1 = new Embedded();
embedded_1.setImmediate(false);
embedded_1.setWidth("30px");
embedded_1.setHeight("30px");
embedded_1.setSource(new ThemeResource("img/att.png"));
embedded_1.setType(1);
embedded_1.setMimeType("image/png");
horizontalLayout_1.addComponent(embedded_1);
horizontalLayout_1.setComponentAlignment(embedded_1, new Alignment(33));
// caption
caption = new Label();
caption.setImmediate(false);
caption.setWidth("-1px");
caption.setHeight("-1px");
caption.setValue("AT&T Policy Engine Admin Console");
horizontalLayout_1.addComponent(caption);
horizontalLayout_1.setExpandRatio(caption, 1.0f);
horizontalLayout_1.setComponentAlignment(caption, new Alignment(33));
// labelWelcome
labelWelcome = new Label();
labelWelcome.setImmediate(false);
labelWelcome.setWidth("-1px");
labelWelcome.setHeight("40px");
labelWelcome.setValue("Label");
horizontalLayout_1.addComponent(labelWelcome);
horizontalLayout_1.setComponentAlignment(labelWelcome, new Alignment(34));
return horizontalLayout_1;
}
7
View Complete Implementation : AbstractChartDataManagerImpl.java
Copyright Apache License 2.0
Author : Hack23
Copyright Apache License 2.0
Author : Hack23
/**
* Adds the chart.
*
* @param content
* the content
* @param caption
* the caption
* @param chart
* the chart
* @param fullPage
* the full page
*/
protected final void addChart(final AbstractOrderedLayout content, final String caption, final DCharts chart, final boolean fullPage) {
final HorizontalLayout horizontalLayout = new HorizontalLayout();
final int browserWindowWidth = getChartWindowWidth();
final int browserWindowHeight = getChartWindowHeight(fullPage);
horizontalLayout.setWidth(browserWindowWidth, Unit.PIXELS);
horizontalLayout.setHeight(browserWindowHeight, Unit.PIXELS);
horizontalLayout.setMargin(true);
horizontalLayout.setSpacing(false);
horizontalLayout.addStyleName("v-layout-content-overview-panel-level1");
final Panel formPanel = new Panel();
formPanel.setSizeFull();
formPanel.setContent(horizontalLayout);
formPanel.setCaption(caption);
content.addComponent(formPanel);
content.setExpandRatio(formPanel, ContentRatio.LARGE);
chart.setWidth(100, Unit.PERCENTAGE);
chart.setHeight(100, Unit.PERCENTAGE);
chart.setMarginRight(CHART_RIGHT_MARGIN);
chart.setMarginLeft(CHART_LEFT_MARGIN);
chart.setMarginBottom(CHART_BOTTOM_MARGIN_SIZE);
chart.setMarginTop(CHART_TOP_MARGIN_SIZE);
horizontalLayout.addComponent(chart);
chart.setCaption(caption);
}
4
View Complete Implementation : BallotChartsPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout panelContent = createPanelContent();
final String pageId = getPageId(parameters);
final List<ViewRiksdagenVoteDataBallotSummary> ballots = gereplacedem(parameters);
if (!ballots.isEmpty()) {
getBallotMenuItemFactory().createBallotMenuBar(menuBar, pageId);
final DataContainer<ViewRiksdagenVoteDataBallotPartySummary, RiksdagenVoteDataBallotPartyEmbeddedId> dataPartyContainer = getApplicationManager().getDataContainer(ViewRiksdagenVoteDataBallotPartySummary.clreplaced);
final List<ViewRiksdagenVoteDataBallotPartySummary> partyBallotList = dataPartyContainer.findListByEmbeddedProperty(ViewRiksdagenVoteDataBallotPartySummary.clreplaced, ViewRiksdagenVoteDataBallotPartySummary_.embeddedId, RiksdagenVoteDataBallotPartyEmbeddedId.clreplaced, RiksdagenVoteDataBallotPartyEmbeddedId_.ballotId, pageId);
LabelFactory.createHeader2Label(panelContent, CHARTS);
final TabSheet tabsheet = new TabSheet();
tabsheet.setWidth(100, Unit.PERCENTAGE);
tabsheet.setHeight(100, Unit.PERCENTAGE);
panelContent.addComponent(tabsheet);
panelContent.setExpandRatio(tabsheet, ContentRatio.LARGE);
Collections.sort(ballots, (Comparator<ViewRiksdagenVoteDataBallotSummary>) (o1, o2) -> (o1.getEmbeddedId().getIssue() + o2.getEmbeddedId().getConcern()).compareTo(o1.getEmbeddedId().getIssue() + o2.getEmbeddedId().getConcern()));
for (final ViewRiksdagenVoteDataBallotSummary viewRiksdagenVoteDataBallotSummary : ballots) {
final HorizontalLayout tabContent = new HorizontalLayout();
tabContent.setWidth(100, Unit.PERCENTAGE);
tabContent.setHeight(100, Unit.PERCENTAGE);
final Tab tab = tabsheet.addTab(tabContent);
ballotChartDataManager.createChart(tab, tabContent, viewRiksdagenVoteDataBallotSummary);
}
final Map<String, List<ViewRiksdagenVoteDataBallotPartySummary>> concernIssuePartyBallotSummaryMap = createIssueConcernMap(partyBallotList);
for (final List<ViewRiksdagenVoteDataBallotPartySummary> partyBallotSummaryList : concernIssuePartyBallotSummaryMap.values()) {
final HorizontalLayout tabContent = new HorizontalLayout();
tabContent.setWidth(100, Unit.PERCENTAGE);
tabContent.setHeight(100, Unit.PERCENTAGE);
final Tab tab = tabsheet.addTab(tabContent);
ballotChartDataManager.createChart(tab, tabContent, partyBallotSummaryList);
}
panel.setCaption(new StringBuilder().append(NAME).append("::").append(BALLOT).append(pageId).toString());
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_BALLOT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
}
return panelContent;
}
3
View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
Copyright GNU General Public License v3.0
Author : AskNowQA
private Component createInputComponent() {
HorizontalLayout l = new HorizontalLayout();
l.setSpacing(true);
Component kbSelector = createSelectTBSLComponent();
kbSelector.setWidth("150px");
kbSelector.setHeight("100px");
l.addComponent(kbSelector);
VerticalLayout right = new VerticalLayout();
right.setSizeFull();
right.setHeight("100px");
right.setSpacing(true);
l.addComponent(right);
l.setExpandRatio(right, 1f);
HorizontalLayout rightTop = new HorizontalLayout();
rightTop.setSpacing(true);
rightTop.setHeight(null);
rightTop.setWidth("100%");
right.addComponent(rightTop);
questionBox = new ComboBox();
questionBox.setWidth("100%");
questionBox.setHeight(null);
questionBox.setImmediate(true);
questionBox.setNewItemsAllowed(true);
questionBox.setInputPrompt("Enter your question.");
questionBox.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
onExecuteQuery();
}
});
questionBox.addShortcutListener(new ShortcutListener("run", ShortcutAction.KeyCode.ENTER, null) {
@Override
public void handleAction(Object sender, Object target) {
onExecuteQuery();
}
});
rightTop.addComponent(questionBox);
rightTop.setExpandRatio(questionBox, 1f);
addExampleQuestions();
executeButton = new NativeButton("Run");
executeButton.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
onExecuteQuery();
}
});
rightTop.addComponent(executeButton);
Component feedbackComponent = createFeedbackComponent();
right.addComponent(feedbackComponent);
right.setExpandRatio(feedbackComponent, 1f);
right.setComponentAlignment(feedbackComponent, Alignment.MIDDLE_CENTER);
return l;
}
3
View Complete Implementation : Vaadin.java
Copyright Apache License 2.0
Author : BrunoEberhard
Copyright Apache License 2.0
Author : BrunoEberhard
@Override
protected void init(VaadinRequest request) {
VerticalLayout outerPanel = new VerticalLayout();
outerPanel.setMargin(false);
outerPanel.setSpacing(false);
setContent(outerPanel);
setSizeFull();
outerPanel.setSizeFull();
HorizontalLayout topbar = new HorizontalLayout();
outerPanel.addComponent(topbar);
outerPanel.setExpandRatio(topbar, 0f);
topbar.setHeight("4.5ex");
topbar.setWidth("100%");
topbar.setStyleName("topbar");
topbar.setSpacing(true);
topbar.setMargin(new MarginInfo(false, true, false, false));
Button buttonNavigation = new Button(VaadinIcons.MENU);
buttonNavigation.addStyleName("mjButton");
buttonNavigation.addClickListener(e -> {
if (lastSplitPosition > -1) {
if (lastSplitPosition < 100) {
lastSplitPosition = 200;
}
splitPanel.setSplitPosition(lastSplitPosition);
lastSplitPosition = -1;
} else {
lastSplitPosition = splitPanel.getSplitPosition();
splitPanel.setSplitPosition(0);
}
});
topbar.addComponent(buttonNavigation);
topbar.setComponentAlignment(buttonNavigation, Alignment.MIDDLE_LEFT);
if (Backend.getInstance().isAuthenticationActive()) {
Button buttonLogin = new Button(VaadinIcons.SIGN_IN);
buttonLogin.addStyleName("mjButton");
buttonLogin.addClickListener(e -> Backend.getInstance().getAuthentication().login(new VaadinLoginListener(null)));
topbar.addComponent(buttonLogin);
topbar.setComponentAlignment(buttonLogin, Alignment.MIDDLE_LEFT);
}
Panel panel = new Panel();
topbar.addComponent(panel);
topbar.setExpandRatio(panel, 1.0f);
TextField textFieldSearch = createSearchField();
textFieldSearch.setEnabled(Application.getInstance().hreplacedearchPages());
topbar.addComponent(textFieldSearch);
topbar.setComponentAlignment(textFieldSearch, Alignment.MIDDLE_RIGHT);
splitPanel = new HorizontalSplitPanel();
outerPanel.addComponent(splitPanel);
outerPanel.setExpandRatio(splitPanel, 1.0f);
navigationTree = new Tree<>(null, navigationTreeData);
navigationTree.setSizeFull();
navigationTree.setSelectionMode(SelectionMode.NONE);
navigationTree.addItemClickListener(event -> event.gereplacedem().action());
navigationTree.sereplacedemCaptionGenerator(action -> action.getName());
if (!Frontend.loginAtStart()) {
updateNavigation();
}
splitPanel.setSplitPosition(250, Unit.PIXELS);
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
String route = (String) httpServletRequest.getSession().getAttribute("path");
if (getSubject() == null && Frontend.loginAtStart()) {
Backend.getInstance().getAuthentication().login(new VaadinLoginListener(route));
} else {
Page page = getPage(route);
show(page, true);
}
com.vaadin.server.Page.getCurrent().addPopStateListener(event -> {
URI uri = URI.create(event.getUri());
String fragment = uri.getFragment();
if (!StringUtils.isEmpty(fragment)) {
Page page = pageStore.get(fragment);
if (page != null) {
show(page, null);
}
}
});
}
3
View Complete Implementation : JasperReportScheduleLayout.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private void dateParamsHandleRowChange(EnreplacedyItem<ReportEmailScheduleEnreplacedy> item) {
paramForm.removeAllComponents();
paramForm.setSpacing(true);
paramForm.setSizeFull();
paramForm.setMargin(true);
updaters.clear();
if (item != null) {
ReportEmailScheduleEnreplacedy enreplacedy = item.getEnreplacedy();
List<DateParameterOffsetType> offsetTypes = new LinkedList<DateParameterOffsetType>();
for (DateParameterOffsetType offsetType : DateParameterOffsetType.values()) {
offsetTypes.add(offsetType);
}
for (final ScheduledDateParameter dateParam : enreplacedy.getDateParameters()) {
HorizontalLayout dateLayout = new HorizontalLayout();
dateLayout.setSizeFull();
dateLayout.setSpacing(true);
dateLayout.setHeight("55");
final ComboBox offsetType = new ComboBox(dateParam.getLabel(), offsetTypes);
offsetType.setImmediate(true);
offsetType.setNullSelectionAllowed(false);
offsetType.setWidth("140");
final DateField startDateField = new DateField("From", dateParam.getStartDate());
startDateField.setResolution(Resolution.DAY);
startDateField.setDateFormat("yyyy/MM/dd");
// pickers visability doesn't change, it's determined by the
// parameter type which can't be changed here
final TimePicker startTimePicker = new TimePicker("");
startTimePicker.setValues(dateParam.getStartDate());
startTimePicker.setVisible(dateParam.getType() == DateParameterType.DATE_TIME);
final DateField endDateField = new DateField("To", dateParam.getEndDate());
endDateField.setResolution(Resolution.DAY);
endDateField.setDateFormat("yyyy/MM/dd");
// pickers visability doesn't change, it's determined by the
// parameter type which can't be changed here
final TimePicker endTimePicker = new TimePicker("");
endTimePicker.setValues(dateParam.getStartDate());
endTimePicker.setVisible(dateParam.getType() == DateParameterType.DATE_TIME);
offsetType.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 7081417825842355432L;
@Override
public void valueChange(ValueChangeEvent event) {
DateParameterOffsetType offsetTypeValue = (DateParameterOffsetType) event.getProperty().getValue();
startDateField.setVisible(offsetTypeValue == DateParameterOffsetType.CONSTANT);
endDateField.setVisible(offsetTypeValue == DateParameterOffsetType.CONSTANT);
}
});
offsetType.setValue(dateParam.getOffsetType());
dateLayout.addComponent(offsetType);
dateLayout.addComponent(startDateField);
dateLayout.addComponent(startTimePicker);
dateLayout.addComponent(endDateField);
dateLayout.addComponent(endTimePicker);
paramForm.addComponent(dateLayout);
updaters.add(new EnreplacedyParamUpdater(dateParam.getLabel(), offsetType, startDateField, startTimePicker, endDateField, endTimePicker));
}
}
}
2
View Complete Implementation : FilterTableDemoUI.java
Copyright Apache License 2.0
Author : tepi
Copyright Apache License 2.0
Author : tepi
private Component buildButtons(final FilterTable relatedFilterTable) {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setHeight(null);
buttonLayout.setWidth("100%");
buttonLayout.setSpacing(true);
Label hideFilters = new Label("Show Filters:");
hideFilters.setSizeUndefined();
buttonLayout.addComponent(hideFilters);
buttonLayout.setComponentAlignment(hideFilters, Alignment.MIDDLE_LEFT);
for (Object propId : relatedFilterTable.getContainerPropertyIds()) {
Component t = createToggle(relatedFilterTable, propId);
buttonLayout.addComponent(t);
buttonLayout.setComponentAlignment(t, Alignment.MIDDLE_LEFT);
}
CheckBox showFilters = new CheckBox("Toggle Filter Bar visibility");
showFilters.setValue(relatedFilterTable.isFilterBarVisible());
showFilters.addValueChangeListener(event -> relatedFilterTable.setFilterBarVisible((Boolean) event.getValue()));
buttonLayout.addComponent(showFilters);
buttonLayout.setComponentAlignment(showFilters, Alignment.MIDDLE_RIGHT);
buttonLayout.setExpandRatio(showFilters, 1);
final Button runNow = new Button("Filter now");
runNow.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
relatedFilterTable.runFilters();
}
});
CheckBox runOnDemand = new CheckBox("Filter lazily");
runOnDemand.setValue(relatedFilterTable.isFilterOnDemand());
runNow.setEnabled(relatedFilterTable.isFilterOnDemand());
runOnDemand.addValueChangeListener(event -> {
boolean value = event.getValue();
relatedFilterTable.setFilterOnDemand(value);
runNow.setEnabled(value);
});
buttonLayout.addComponent(runOnDemand);
buttonLayout.setComponentAlignment(runOnDemand, Alignment.MIDDLE_RIGHT);
buttonLayout.addComponent(runNow);
Button setVal = new Button("Set the State filter to 'Processed'");
setVal.addClickListener(event -> relatedFilterTable.setFilterFieldValue("state", State.PROCESSED));
buttonLayout.addComponent(setVal);
Button reset = new Button("Reset");
reset.addClickListener(event -> relatedFilterTable.resetFilters());
buttonLayout.addComponent(reset);
Button clear = new Button("Clear");
clear.addClickListener(event -> relatedFilterTable.clearFilters());
buttonLayout.addComponent(clear);
return buttonLayout;
}
0
View Complete Implementation : JasperReportLayout.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private Component getOptionsPanel() {
VerticalLayout layout = new VerticalLayout();
layout.setId("OptionsPanel");
// layout.setMargin(new MarginInfo(false, false, false, false));
// layout.setSpacing(true);
layout.setSizeFull();
String buttonHeight = "" + BUTTON_WIDTH;
HorizontalLayout buttonBar = new HorizontalLayout();
buttonBar.setStyleName("njadmin-grey-colour");
buttonBar.setSpacing(true);
// buttonBar.setStyleName(Reindeer.LAYOUT_BLUE);
buttonBar.setWidth("100%");
buttonBar.setHeight("" + (BUTTON_WIDTH));
buttonBar.setMargin(new MarginInfo(false, false, false, false));
HorizontalLayout buttonContainer = new HorizontalLayout();
buttonContainer.setSizeFull();
buttonContainer.setWidth("280");
showButton = new Button();
Resource previewButtonIcon = reportProperties.getPreviewButtonIconResource();
if (previewButtonIcon == null) {
previewButtonIcon = new ExternalResource("images/seanau/Print preview.png");
}
showButton.setIcon(previewButtonIcon);
showButton.setDescription("Preview");
showButton.setWidth("" + BUTTON_WIDTH);
showButton.setHeight(buttonHeight);
showButton.setDisableOnClick(true);
showButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
showButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
addButtonListener(showButton, OutputFormat.HTML);
buttonContainer.addComponent(showButton);
printButton = new Button();
Resource pdfButtonIcon = reportProperties.getPdfButtonIconResource();
if (pdfButtonIcon == null) {
pdfButtonIcon = new ExternalResource("images/seanau/Print_32.png");
}
printButton.setIcon(pdfButtonIcon);
printButton.setDescription("Print (PDF)");
printButton.setWidth("" + BUTTON_WIDTH);
printButton.setHeight(buttonHeight);
printButton.setDisableOnClick(true);
printButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
printButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
addButtonListener(printButton, OutputFormat.PDF);
buttonContainer.addComponent(printButton);
exportButton = new Button();
Resource exportButtonIcon = reportProperties.getExportButtonIconResource();
if (exportButtonIcon == null) {
exportButtonIcon = new ExternalResource("images/exporttoexcel.png");
}
exportButton.setDescription("Export (Excel - CSV)");
exportButton.setIcon(exportButtonIcon);
exportButton.setWidth("" + BUTTON_WIDTH);
exportButton.setDisableOnClick(true);
exportButton.setHeight(buttonHeight);
exportButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
exportButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
addButtonListener(exportButton, OutputFormat.CSV);
buttonContainer.addComponent(exportButton);
createFavouriteButton(buttonHeight, buttonContainer);
createEmailButton(buttonHeight, buttonContainer);
createScheduleButton(buttonHeight, buttonContainer);
if (reportProperties instanceof JasperReportPopUp) {
// This is disabled because there are serious problems with
// transient (JasperReportProperties is not aware of them)
// parameters in drill
// downs, these can not currently be save or represented in the
// ReportEmailSchedule
emailButton.setEnabled(false);
scheduleButton.setEnabled(false);
}
buttonBar.addComponent(buttonContainer);
layout.addComponent(buttonBar);
components = builder.buildLayout(false);
if (components.size() > 0) {
VerticalLayout filterPanel = new VerticalLayout();
filterPanel.setMargin(new MarginInfo(false, false, true, false));
filterPanel.setSpacing(true);
filterPanel.setSizeFull();
Label filterLabel = new Label("<b>Filters</b>");
filterLabel.setStyleName(Reindeer.LABEL_H2);
filterLabel.setContentMode(ContentMode.HTML);
filterPanel.addComponent(filterLabel);
for (ExpanderComponent componet : components) {
filterPanel.addComponent(componet.getComponent());
if (componet.shouldExpand()) {
filterPanel.setExpandRatio(componet.getComponent(), 1);
}
}
layout.addComponent(filterPanel);
layout.setExpandRatio(filterPanel, 1.0f);
try {
ReportSave reportSave = UI.getCurrent().getSession().getAttribute(ReportSave.clreplaced);
if (reportSave != null) {
for (ReportParameter<?> rp : builder.getReportParameters()) {
for (String paramterName : rp.getParameterNames()) {
for (ReportSaveParameter saved : reportSave.getParameters()) {
if (saved.getParameterName().equals(rp.getLabel(paramterName))) {
try {
if (StringUtils.isNotBlank(saved.getMetaData())) {
rp.applySaveMetaData(saved.getMetaData());
} else {
rp.setValuereplacedtring(saved.getParameterValue(), paramterName);
}
} catch (ReadOnlyException | ConversionException | ParseException e) {
ErrorWindow.showErrorWindow(e);
}
}
}
}
}
}
} catch (Exception e) {
logger.error(e, e);
}
}
// hidden frame for downloading csv
csv = new BrowserFrame();
csv.setVisible(true);
csv.setHeight("1");
csv.setWidth("1");
csv.setImmediate(true);
layout.addComponent(csv);
return layout;
}