Example usage for com.vaadin.ui VerticalLayout addStyleName

List of usage examples for com.vaadin.ui VerticalLayout addStyleName

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout addStyleName.

Prototype

@Override
    public void addStyleName(String style) 

Source Link

Usage

From source file:com.gnts.pem.txn.synd.SyndFlat.java

License:Open Source License

@SuppressWarnings("deprecation")
void buildView(VerticalLayout layoutPage, HorizontalLayout hlHeaderLayout) {
    // for component width
    hlHeaderLayout.removeAllComponents();
    setComponentStyle();/*from  ww w . java  2s.c  o m*/

    tblEvalDetails = new Table();
    tblEvalDetails.setStyleName(Runo.TABLE_SMALL);
    tblEvalDetails.setPageLength(14);
    tblEvalDetails.setSizeFull();
    tblEvalDetails.setFooterVisible(true);
    tblEvalDetails.setSelectable(true);
    tblEvalDetails.setImmediate(true);
    tblEvalDetails.setColumnCollapsingAllowed(true);

    // for evaluation details
    tfEvaluationPurpose.setValue("Collateral Security to the Bank");

    tfEvaluationNumber.setRequired(true);
    slBankBranch.setRequired(true);
    dfDateofValuation.setRequired(true);
    tfEvaluationPurpose.setRequired(true);
    layoutEvaluationDetails1.setColumns(4);

    layoutEvaluationDetails1.addComponent(tfEvaluationNumber);
    layoutEvaluationDetails1.addComponent(slBankBranch);
    layoutEvaluationDetails1.addComponent(tfEvaluationPurpose);
    layoutEvaluationDetails1.addComponent(tfValuatedBy);
    layoutEvaluationDetails1.addComponent(dfDateofValuation);
    layoutEvaluationDetails1.addComponent(dfVerifiedDate);
    layoutEvaluationDetails1.addComponent(tfVerifiedBy);
    layoutEvaluationDetails1.addComponent(tfDynamicEvaluation1);
    layoutEvaluationDetails1.addComponent(tfDynamicEvaluation2);
    tfDynamicEvaluation1.setVisible(false);
    tfDynamicEvaluation2.setVisible(false);
    layoutEvaluationDetails1.setSpacing(true);
    layoutEvaluationDetails1.setMargin(true);

    layoutEvaluationDetails.addComponent(btnDynamicEvaluation1);
    layoutEvaluationDetails.setComponentAlignment(btnDynamicEvaluation1, Alignment.TOP_RIGHT);
    layoutEvaluationDetails.addComponent(layoutEvaluationDetails1);
    // for asset details
    VerticalLayout formAsset1 = new VerticalLayout();
    VerticalLayout formAsset2 = new VerticalLayout();
    VerticalLayout formAsset3 = new VerticalLayout();
    VerticalLayout formAsset4 = new VerticalLayout();
    formAsset1.setSpacing(true);
    formAsset2.setSpacing(true);
    formAsset4.setSpacing(true);

    formAsset1.addComponent(tfCustomerName);
    formAsset1.addComponent(tfLandMark);
    formAsset1.addComponent(slPropertyDesc);
    formAsset2.addComponent(tfCustomerAddr);
    formAsset3.addComponent(tfPropertyAddress);
    formAsset3.addComponent(chkSameAddress);
    formAsset4.addComponent(tfDynamicAsset1);
    formAsset4.addComponent(tfDynamicAsset2);
    tfDynamicAsset1.setVisible(false);
    tfDynamicAsset2.setVisible(false);
    tfCustomerName.setRequired(true);
    chkSameAddress.setImmediate(true);
    chkSameAddress.addListener(new Property.ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        public void valueChange(ValueChangeEvent event) {

            if (chkSameAddress.getValue().equals(true)) {
                tfPropertyAddress.setValue(tfCustomerAddr.getValue());

            } else {
                tfPropertyAddress.setValue("");
            }
        }
    });

    layoutAssetDetails1.setSpacing(true);
    layoutAssetDetails1.setColumns(4);
    layoutAssetDetails1.addComponent(formAsset1);
    layoutAssetDetails1.addComponent(formAsset2);
    layoutAssetDetails1.addComponent(formAsset3);
    layoutAssetDetails1.addComponent(formAsset4);
    layoutAssetDetails1.setMargin(true);

    layoutAssetDetails.addComponent(btnDynamicAsset);
    layoutAssetDetails.setComponentAlignment(btnDynamicAsset, Alignment.TOP_RIGHT);
    layoutAssetDetails.addComponent(layoutAssetDetails1);

    lblHeading = new Label("Owner Details");
    layoutAssetOwner.addComponent(lblHeading);
    lblHeading.setStyleName("h4");
    layoutAssetOwner.addComponent(PanelGenerator.createPanel(layoutOwnerDetails));
    lblHeading = new Label("Asset Details");
    layoutAssetOwner.addComponent(lblHeading);
    lblHeading.setStyleName("h4");
    layoutAssetOwner.addComponent(PanelGenerator.createPanel(layoutAssetDetails));
    // for document details
    panelNormalDocumentDetails.addComponent(btnAddNorDoc);
    panelNormalDocumentDetails.setComponentAlignment(btnAddNorDoc, Alignment.TOP_RIGHT);
    panelNormalDocumentDetails.addComponent(new ComponentIteratorNormlDoc(null, null, "", ""));
    panelNormalDocumentDetails.setMargin(true);
    panelLegalDocumentDetails.addComponent(btnAddLegalDoc);
    panelLegalDocumentDetails.setComponentAlignment(btnAddLegalDoc, Alignment.TOP_RIGHT);
    panelLegalDocumentDetails.addComponent(new ComponentIteratorLegalDoc("", "", null));
    panelLegalDocumentDetails.setMargin(true);
    layoutNormalLegal.addComponent(PanelGenerator.createPanel(panelNormalDocumentDetails));
    lblHeading = new Label("Legal Documents");
    layoutNormalLegal.addComponent(lblHeading);
    lblHeading.setStyleName("h4");
    layoutNormalLegal.addComponent(PanelGenerator.createPanel(panelLegalDocumentDetails));
    layoutNormalLegal.setMargin(true);

    //for Owner Details
    layoutOwnerDetails.addComponent(btnAddOwner);
    layoutOwnerDetails.setComponentAlignment(btnAddOwner, Alignment.TOP_RIGHT);
    layoutOwnerDetails1.setColumns(4);
    layoutOwnerDetails1.addComponent(new ComponentIterOwnerDetails("", ""));
    layoutOwnerDetails.addComponent(layoutOwnerDetails1);
    layoutOwnerDetails1.setSpacing(true);
    layoutOwnerDetails1.setMargin(true);
    // for adjoin properties
    panelAdjoinProperties.addComponent(btnAddAdjoinProperty);
    panelAdjoinProperties.setComponentAlignment(btnAddAdjoinProperty, Alignment.BOTTOM_RIGHT);
    panelAdjoinProperties.addComponent(new ComponentIteratorAdjoinProperty(null, true, true, true));

    // for dimensions
    panelDimension.addComponent(btnAddDimension);
    panelDimension.addComponent(lblDimension);
    lblDimension.setValue("Item No :" + itemDimensionNumber);
    panelDimension.setComponentAlignment(btnAddDimension, Alignment.BOTTOM_RIGHT);
    panelDimension.addComponent(new ComponentIterDimensionofPlot(null, true, true, true));

    panelNormalDocumentDetails.setWidth("100%");
    panelLegalDocumentDetails.setWidth("100%");

    // for
    layoutmachingBoundary1.setSpacing(true);
    tfDynamicmatching1.setVisible(true);
    tfDynamicmatching2.setVisible(true);
    layoutmachingBoundary2.addComponent(btnDynamicmatching);
    layoutmachingBoundary2.setComponentAlignment(btnDynamicmatching, Alignment.TOP_RIGHT);
    layoutmachingBoundary1.setSpacing(true);
    layoutmachingBoundary1.addComponent(slMatchingBoundary);
    layoutmachingBoundary1.addComponent(slPlotDemarcated);
    layoutmachingBoundary1.addComponent(slApproveLandUse);
    layoutmachingBoundary1.addComponent(slTypeofProperty);
    layoutmachingBoundary1.addComponent(tfDynamicmatching1);
    layoutmachingBoundary1.addComponent(tfDynamicmatching2);
    layoutmachingBoundary1.setSpacing(true);
    layoutmachingBoundary1.setMargin(true);

    // tenure/occupancy details
    layoutTenureOccupay.setSpacing(true);
    layoutTenureOccupay1.setSpacing(true);
    layoutTenureOccupay2.addComponent(btnDynamicTenure);
    layoutTenureOccupay2.setComponentAlignment(btnDynamicTenure, Alignment.TOP_RIGHT);
    layoutTenureOccupay.setColumns(2);
    layoutTenureOccupay1.addComponent(tfStatusofTenure);
    layoutTenureOccupay1.addComponent(slOwnedorRent);
    layoutTenureOccupay1.addComponent(tfNoOfYears);
    layoutTenureOccupay1.addComponent(tfRelationship);
    layoutTenureOccupay1.addComponent(tfDynamicTenure1);
    layoutTenureOccupay1.addComponent(tfDynamicTenure2);
    layoutmachingBoundary2.addComponent(layoutmachingBoundary1);
    layoutTenureOccupay2.addComponent(layoutTenureOccupay1);
    layoutTenureOccupay.addComponent(PanelGenerator.createPanel(layoutmachingBoundary2));
    layoutTenureOccupay.addComponent(PanelGenerator.createPanel(layoutTenureOccupay2));
    tfDynamicTenure1.setVisible(false);
    tfDynamicTenure2.setVisible(false);
    layoutmachingBoundary1.setMargin(true);
    layoutTenureOccupay1.setMargin(true);
    layoutmachingBoundary.addComponent(layoutTenureOccupay);
    layoutTenureOccupay1.setMargin(true);
    layoutmachingBoundary.setMargin(true);

    // for no of rooms
    layoutNoofRooms2.addComponent(btnDynamicRooms);
    layoutNoofRooms2.setComponentAlignment(btnDynamicRooms, Alignment.TOP_RIGHT);
    layoutNoofRooms2.setMargin(true);
    layoutNoofRooms1.addComponent(tfNoofRooms);
    layoutNoofRooms1.addComponent(tfLivingDining);
    layoutNoofRooms1.addComponent(tfBedRooms);
    layoutNoofRooms1.addComponent(tfKitchen);
    layoutNoofRooms1.addComponent(tfToilets);
    layoutNoofRooms1.addComponent(tfDynamicRooms1);
    layoutNoofRooms1.addComponent(tfDynamicRooms2);
    tfDynamicRooms1.setVisible(false);
    tfDynamicRooms2.setVisible(false);
    layoutNoofRooms1.setSpacing(true);
    layoutNoofRooms2.addComponent(layoutNoofRooms1);
    // no of floors
    layoutNoofFloors.setColumns(2);
    layoutNoofFloors2.setMargin(true);
    layoutNoofFloors2.addComponent(btnDynamicFloor);
    layoutNoofFloors2.setComponentAlignment(btnDynamicFloor, Alignment.TOP_RIGHT);
    layoutNoofFloors1.addComponent(tfTotNoofFloors);
    layoutNoofFloors1.addComponent(tfPropertyLocated);
    layoutNoofFloors1.addComponent(tfApproxAgeofBuilding);
    layoutNoofFloors1.addComponent(tfResidualAgeofBuilding);
    layoutNoofFloors1.addComponent(slTypeofStructures);
    layoutNoofFloors1.addComponent(tfDynamicFloors1);
    layoutNoofFloors1.addComponent(tfDynamicFloors2);
    tfDynamicFloors1.setVisible(false);
    tfDynamicFloors2.setVisible(false);
    layoutNoofFloors1.setSpacing(true);
    layoutNoofFloors2.addComponent(layoutNoofFloors1);
    layoutNoofFloors.setSpacing(true);
    layoutNoofFloors.addComponent(PanelGenerator.createPanel(layoutNoofFloors2));
    layoutNoofFloors.addComponent(PanelGenerator.createPanel(layoutNoofRooms2));

    layoutNoofRooms.addComponent(layoutNoofFloors);
    layoutNoofRooms.setMargin(true);
    // area details of the property
    layoutAreaDetails1.setSpacing(true);
    layoutAreaDetails1.setColumns(4);
    layoutAreaDetails1.addComponent(tfSiteArea);
    layoutAreaDetails1.addComponent(tfCarpetArea);
    layoutAreaDetails1.addComponent(tfSuperbuiltup);
    layoutAreaDetails1.addComponent(tfSalableArea);
    layoutAreaDetails1.addComponent(tfRemarks);
    layoutAreaDetails1.addComponent(tfDynamicAreaDetail1);
    layoutAreaDetails1.addComponent(tfDynamicAreaDetail2);
    tfDynamicAreaDetail1.setVisible(false);
    tfDynamicAreaDetail2.setVisible(false);

    layoutAreaDetails.addComponent(btnDynamicAreaDetail);
    layoutAreaDetails.setComponentAlignment(btnDynamicAreaDetail, Alignment.TOP_RIGHT);
    layoutAreaDetails.addComponent(layoutAreaDetails1);
    layoutAreaDetails1.setMargin(true);

    // details of apartment building
    layoutApartmentBuilding1.setColumns(4);
    layoutApartmentBuilding1.addComponent(slNatureofApartment);
    layoutApartmentBuilding1.addComponent(tfNameofApartment);
    layoutApartmentBuilding1.addComponent(tfApartmant);
    layoutApartmentBuilding1.addComponent(tfFlatNumber);
    layoutApartmentBuilding1.addComponent(tfSFNumber);
    layoutApartmentBuilding1.addComponent(tfFloor);
    layoutApartmentBuilding1.addComponent(tfVillageLoc);
    layoutApartmentBuilding1.addComponent(tfTalukLoc);
    layoutApartmentBuilding1.addComponent(tfDisrictLoc);
    layoutApartmentBuilding1.addComponent(slDescriptionofLocality);
    layoutApartmentBuilding1.addComponent(tfNoofFloors);
    layoutApartmentBuilding1.addComponent(slTypeofStructure);
    layoutApartmentBuilding1.addComponent(tfNumberofFlats);
    layoutAddress.addComponent(tfPostalAddress);
    layoutAddress.addComponent(chkSamePostelAddress);
    layoutApartmentBuilding1.addComponent(layoutAddress);
    layoutApartmentBuilding1.addComponent(tfDynamicApartment1);
    layoutApartmentBuilding1.addComponent(tfDynamicApartment2);
    layoutApartmentBuilding1.setSpacing(true);
    tfDynamicApartment1.setVisible(false);
    tfDynamicApartment2.setVisible(false);
    layoutApartmentBuilding1.setMargin(true);
    chkSamePostelAddress.setImmediate(true);
    chkSamePostelAddress.addListener(new Property.ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        public void valueChange(ValueChangeEvent event) {

            if (chkSamePostelAddress.getValue().equals(true)) {
                tfPostalAddress.setValue(tfPropertyAddress.getValue());

            } else {
                tfPostalAddress.setValue("");
            }
        }
    });
    /*   tfEvaluationNumber.addValidator(new IntegerValidator("Enter numbers only"));
       tfEvaluationNumber.addBlurListener(new SaarcValidate(tfEvaluationNumber));*/
    tfEvaluationNumber.setImmediate(true);
    tfEvaluationNumber.addBlurListener(new BlurListener() {

        private static final long serialVersionUID = 1L;

        public void blur(BlurEvent event) {
            // TODO Auto-generated method stub
            if (!tfEvaluationNumber.isReadOnly()) {
                tfEvaluationNumber.setComponentError(null);
                try {
                    tfEvaluationNumber.setComponentError(null);
                    String evalno = tfEvaluationNumber.getValue().toString();
                    count = beanEvaluation.getEvalNoCount(evalno);

                    if (tfEvaluationNumber.getValue() != null
                            && tfEvaluationNumber.getValue().trim().length() > 0) {

                        if (count == 0) {

                            tfEvaluationNumber.setComponentError(null);

                        } else {

                            tfEvaluationNumber
                                    .setComponentError(new UserError("Evaluation number is already Exist"));

                        }
                    }
                } catch (Exception e) {

                }
            }
        }
    });
    // flat under valuation
    layoutFlatValuation1.setColumns(4);
    layoutFlatValuation1.addComponent(tfFlatisSituated);
    layoutFlatValuation1.addComponent(tfDynamicFlatValuation1);
    layoutFlatValuation1.addComponent(tfDynamicFlatValuation2);
    tfDynamicFlatValuation1.setVisible(false);
    tfDynamicFlatValuation2.setVisible(false);
    layoutFlatValuation1.setSpacing(true);
    layoutFlatValuation1.setMargin(true);

    layoutFlatValuation.addComponent(btnDynamicFlatValuation);
    layoutFlatValuation.setComponentAlignment(btnDynamicFlatValuation, Alignment.TOP_RIGHT);
    layoutFlatValuation.addComponent(layoutFlatValuation1);

    // for details of plan approval
    layoutPlanApproval1.setColumns(4);
    formLand.addComponent(slLandandBuilding);
    formLand.addComponent(tfLandandBuilding);
    formBuilding.addComponent(slBuilding);
    formBuilding.addComponent(tfBuilding);

    layoutPlanApproval1.addComponent(formLand);
    layoutPlanApproval1.addComponent(formBuilding);
    layoutPlanApproval1.addComponent(tfPlanApprovedBy);
    layoutPlanApproval1.addComponent(dfLicenseFrom);
    layoutPlanApproval1.addComponent(slIsLicenceForced);
    layoutPlanApproval1.addComponent(slAllApprovalRecved);
    layoutPlanApproval1.addComponent(slConstAsperAppPlan);
    layoutPlanApproval1.addComponent(tfDynamicPlanApproval1);
    layoutPlanApproval1.addComponent(tfDynamicPlanApproval2);

    tfDynamicPlanApproval1.setVisible(false);
    tfDynamicPlanApproval2.setVisible(false);
    layoutPlanApproval1.setSpacing(true);
    layoutPlanApproval1.setMargin(true);
    layoutPlanApproval.addComponent(btnDynamicPlanApproval);
    layoutPlanApproval.setComponentAlignment(btnDynamicPlanApproval, Alignment.TOP_RIGHT);
    layoutPlanApproval.addComponent(layoutPlanApproval1);

    // for Build Specification
    panelBuildSpecfication.addComponent(btnAddBuildSpec);
    panelBuildSpecfication.setComponentAlignment(btnAddBuildSpec, Alignment.BOTTOM_RIGHT);
    panelBuildSpecfication.addComponent(new ComponentIterBuildingSpecfication(null, true, true, true));
    panelBuildSpecfication.setWidth("100%");

    // for
    layoutApartmentBuilding.addComponent(btnDynamicApartment);
    layoutApartmentBuilding.setComponentAlignment(btnDynamicApartment, Alignment.TOP_RIGHT);
    layoutApartmentBuilding.addComponent(layoutApartmentBuilding1);

    // valuation of land
    layoutValuationConst.setSpacing(true);
    layoutValuationConst1.setSpacing(true);
    layoutValuationConst1.addComponent(tfUndividedShare);
    layoutValuationConst1.addComponent(tfSuperBuiltupArea);
    layoutValuationConst1.addComponent(tfCostofApartment);
    layoutValuationConst1.addComponent(tfRateofApartment);
    layoutValuationConst1.addComponent(slIsRateReasonable);
    layoutValuationConst1.addComponent(tfStageOfConstruction);
    layoutValuationConst1.addComponent(tfCostOfConstAsAtSite);
    layoutValuationConst1.addComponent(tfCostOfConstAsPerAgree);

    layoutValuationConst1.addComponent(tfDynamicConstValuation1);
    layoutValuationConst1.addComponent(tfDynamicConstValuation2);
    tfDynamicConstValuation1.setVisible(false);
    tfDynamicConstValuation2.setVisible(false);

    layoutValuationConst.addComponent(btnDynamicConstValuation);
    layoutValuationConst.setComponentAlignment(btnDynamicConstValuation, Alignment.TOP_RIGHT);
    layoutValuationConst.addComponent(layoutValuationConst1);
    layoutValuationConst1.setMargin(true);

    // add components in main panel
    accordion.setWidth("100%");
    layoutEvaluationDetails.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutEvaluationDetails), "Evaluation Details");
    layoutOwnerDetails.setStyleName("bluebar");
    layoutAssetDetails.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutAssetOwner), "Owner Details/Asset Details");
    layoutNormalLegal.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutNormalLegal), "Document Details");
    panelAdjoinProperties.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(panelAdjoinProperties), "Adjoining Properties");
    panelDimension.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(panelDimension), "Dimensions");
    layoutmachingBoundary.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutmachingBoundary),
            "Matching of Boundaries And Tenure/Occupancy Details");
    layoutNoofRooms.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutNoofRooms), "No. of Rooms/No. of Floors");
    layoutAreaDetails.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutAreaDetails), "Area Details of the Property");
    layoutApartmentBuilding.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutApartmentBuilding),
            "Details of Apartment Building-Under Construction");
    layoutFlatValuation.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutFlatValuation), "Flat Under Valuation");
    layoutPlanApproval.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutPlanApproval), "Details of Plan Approval");
    panelBuildSpecfication.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(panelBuildSpecfication), "Specification");
    layoutValuationConst.setStyleName("bluebar");
    accordion.addTab(PanelGenerator.createPanel(layoutValuationConst), "Valuation of under construction");

    layoutMainForm.addComponent(PanelGenerator.createPanel(accordion));

    layoutMainForm.setMargin(true);
    layoutMainForm.setSpacing(true);
    // for main panel
    layoutButton2.setSpacing(true);
    btnSave.setStyleName("savebt");
    btnCancel.setStyleName("cancelbt");
    //   saveExcel.addStyleName("downloadbt");
    btnSubmit.setStyleName("submitbt");
    layoutButton2.addComponent(btnSave);
    layoutButton2.addComponent(btnSubmit);
    //layoutButton2.addComponent(saveExcel);
    layoutButton2.addComponent(btnCancel);

    excelexporter.setTableToBeExported(tblEvalDetails);
    excelexporter.setCaption("Microsoft Excel (XLS)");
    excelexporter.setStyleName("borderless");

    csvexporter.setTableToBeExported(tblEvalDetails);
    csvexporter.setCaption("Comma Dilimited (CSV)");
    csvexporter.setStyleName("borderless");

    pdfexporter.setTableToBeExported(tblEvalDetails);
    pdfexporter.setCaption("Acrobat Document (PDF)");
    pdfexporter.setStyleName("borderless");

    btnSave.setVisible(false);
    btnCancel.setVisible(false);
    btnSubmit.setVisible(false);
    //saveExcel.setVisible(false);
    hlHeaderLayout.addComponent(layoutButton2);
    hlHeaderLayout.setComponentAlignment(layoutButton2, Alignment.BOTTOM_RIGHT);

    // Initaited the Label Function here by Hohul
    lblTableTitle = new Label();
    lblSaveNotification = new Label();
    lblSaveNotification.setContentMode(ContentMode.HTML);
    lblNotificationIcon = new Label();
    lblTableTitle.setValue("<B>&nbsp;&nbsp;Action:</B>");
    lblTableTitle.setContentMode(ContentMode.HTML);
    lblFormTittle = new Label();
    lblFormTittle.setContentMode(ContentMode.HTML);
    lblFormTittle.setValue("&nbsp;&nbsp;<b>" + screenName + "</b>&nbsp;::&nbsp;Home");
    lblFormTitle1 = new Label();
    lblFormTitle1.setContentMode(ContentMode.HTML);
    lblFormTitle1.setValue("&nbsp;&nbsp;<b>" + screenName + "</b>&nbsp;::&nbsp;");
    lblAddEdit = new Label();
    lblAddEdit.setContentMode(ContentMode.HTML);

    // Button Back declaration by Hohul
    btnBack = new Button("Home", this);
    btnBack.setStyleName("link");

    // Bread Scrumbs initiated here by Hohul

    hlBreadCrumbs = new HorizontalLayout();
    hlBreadCrumbs.addComponent(lblFormTitle1);
    hlBreadCrumbs.addComponent(btnBack);
    hlBreadCrumbs.setComponentAlignment(btnBack, Alignment.TOP_CENTER);
    hlBreadCrumbs.addComponent(lblAddEdit);
    hlBreadCrumbs.setComponentAlignment(lblAddEdit, Alignment.MIDDLE_CENTER);
    hlBreadCrumbs.setVisible(false);

    mainPanel.addComponent(layoutMainForm);
    mainPanel.setVisible(false);

    // for search panel
    // for search panel
    // Added by Hohul ----->  For Search Panel Layouts
    FormLayout flSearchEvalNumber = new FormLayout();
    flSearchEvalNumber.addComponent(tfSearchEvalNumber);

    FormLayout flSearchBankbranch = new FormLayout();
    flSearchBankbranch.addComponent(tfSearchBankBranch);

    FormLayout flSearchCustomer = new FormLayout();
    flSearchCustomer.addComponent(tfSearchCustomer);

    HorizontalLayout hlSearchComponentLayout = new HorizontalLayout();
    hlSearchComponentLayout.addComponent(flSearchEvalNumber);
    hlSearchComponentLayout.addComponent(flSearchBankbranch);
    hlSearchComponentLayout.addComponent(flSearchCustomer);
    hlSearchComponentLayout.setSpacing(true);
    hlSearchComponentLayout.setMargin(true);

    //Initialization and properties for btnDownload      
    btnDownload = new Button("Download");
    //btnDownload.setDescription("Download");
    btnDownload.addStyleName("downloadbt");
    btnDownload.addClickListener(new ClickListener() {
        /**
        * 
        */
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            //  UI.getCurrent()..clearDashboardButtonBadge();
            event.getButton().removeStyleName("unread");
            if (notifications != null && notifications.getUI() != null)
                notifications.close();
            else {
                buildNotifications(event);
                UI.getCurrent().addWindow(notifications);
                notifications.focus();
                ((VerticalLayout) UI.getCurrent().getContent())
                        .addLayoutClickListener(new LayoutClickListener() {
                            /**
                            * 
                            */
                            private static final long serialVersionUID = 1L;

                            @Override
                            public void layoutClick(LayoutClickEvent event) {
                                notifications.close();
                                ((VerticalLayout) UI.getCurrent().getContent()).removeLayoutClickListener(this);
                            }
                        });
            }

        }
    });

    hlFileDownloadLayout = new HorizontalLayout();
    hlFileDownloadLayout.setSpacing(true);
    hlFileDownloadLayout.addComponent(btnDownload);
    hlFileDownloadLayout.setComponentAlignment(btnDownload, Alignment.MIDDLE_CENTER);

    VerticalLayout vlSearchandResetButtonLAyout = new VerticalLayout();
    vlSearchandResetButtonLAyout.setSpacing(true);
    vlSearchandResetButtonLAyout.addComponent(btnReset);
    vlSearchandResetButtonLAyout.setWidth("100");
    vlSearchandResetButtonLAyout.addStyleName("topbarthree");
    vlSearchandResetButtonLAyout.setMargin(true);

    HorizontalLayout hlSearchComponentandButtonLayout = new HorizontalLayout();
    hlSearchComponentandButtonLayout.setSizeFull();
    hlSearchComponentandButtonLayout.setSpacing(true);
    hlSearchComponentandButtonLayout.addComponent(hlSearchComponentLayout);
    hlSearchComponentandButtonLayout.setComponentAlignment(hlSearchComponentLayout, Alignment.MIDDLE_LEFT);
    hlSearchComponentandButtonLayout.addComponent(vlSearchandResetButtonLAyout);
    hlSearchComponentandButtonLayout.setComponentAlignment(vlSearchandResetButtonLAyout,
            Alignment.MIDDLE_RIGHT);
    hlSearchComponentandButtonLayout.setExpandRatio(vlSearchandResetButtonLAyout, 1);
    final VerticalLayout vlSearchComponentandButtonLayout = new VerticalLayout();
    vlSearchComponentandButtonLayout.setSpacing(true);
    vlSearchComponentandButtonLayout.setSizeFull();
    vlSearchComponentandButtonLayout.addComponent(hlSearchComponentandButtonLayout);

    /*layoutSearch.addComponent(tfSearchEvalNumber);
    layoutSearch.addComponent(tfSearchBankBranch);
    layoutSearch.addComponent(tfSearchCustomer);
    layoutSearch.addComponent(btnReset);
    layoutSearch.setComponentAlignment(btnReset, Alignment.BOTTOM_LEFT);*/
    btnReset.addStyleName("resetbt");

    tfSearchCustomer.setImmediate(true);
    tfSearchCustomer.addListener(new TextChangeListener() {
        private static final long serialVersionUID = 1L;
        SimpleStringFilter filter = null;

        public void textChange(TextChangeEvent event) {
            Filterable f = (Filterable) tblEvalDetails.getContainerDataSource();
            if (filter != null)
                f.removeContainerFilter(filter);

            filter = new SimpleStringFilter("custName", event.getText(), true, false);

            f.addContainerFilter(filter);
            total = f.size();
            tblEvalDetails.setColumnFooter("lastUpdateDt", "No. of Records:" + total);
        }
    });
    tfSearchEvalNumber.setImmediate(true);
    tfSearchEvalNumber.addListener(new TextChangeListener() {
        private static final long serialVersionUID = 1L;
        SimpleStringFilter filter = null;

        public void textChange(TextChangeEvent event) {
            Filterable f = (Filterable) tblEvalDetails.getContainerDataSource();
            if (filter != null)
                f.removeContainerFilter(filter);
            filter = new SimpleStringFilter("evalNo", event.getText(), true, false);

            f.addContainerFilter(filter);
            total = f.size();
            tblEvalDetails.setColumnFooter("lastUpdateDt", "No. of Records:" + total);
        }
    });

    tfSearchBankBranch.setImmediate(true);
    tfSearchBankBranch.addValueChangeListener(new Property.ValueChangeListener() {
        private static final long serialVersionUID = 1L;
        Filter filter = null;

        @Override
        public void valueChange(ValueChangeEvent event) {
            // TODO Auto-generated method stub

            try {
                String strBankBranch = tfSearchBankBranch.getValue().toString();
                Filterable f = (Filterable) tblEvalDetails.getContainerDataSource();
                if (filter != null)
                    f.removeContainerFilter(filter);

                filter = new Compare.Equal("bankBranch", strBankBranch);
                f.addContainerFilter(filter);
                total = f.size();
                tblEvalDetails.setColumnFooter("lastUpdateDt", "No. of Records:" + total);
                f.addContainerFilter(filter);
            } catch (Exception e) {
            }
        }

    });
    searchPanel.addComponent(PanelGenerator.createPanel(vlSearchComponentandButtonLayout));
    searchPanel.setMargin(true);
    // Add Layout table panel by Hohul

    HorizontalLayout flTableCaption = new HorizontalLayout();
    flTableCaption.addComponent(lblTableTitle);
    flTableCaption.setComponentAlignment(lblTableTitle, Alignment.MIDDLE_CENTER);
    flTableCaption.addStyleName("lightgray");
    flTableCaption.setHeight("25px");
    flTableCaption.setWidth("60px");
    lblNoofRecords = new Label(" ", ContentMode.HTML);
    lblNoofRecords.addStyleName("lblfooter");

    HorizontalLayout hlTableTittleLayout = new HorizontalLayout();
    hlTableTittleLayout.addComponent(flTableCaption);
    hlTableTittleLayout.addComponent(btnAdd);
    hlTableTittleLayout.addComponent(btnEdit);
    hlTableTittleLayout.addComponent(btnView);
    hlTableTittleLayout.setHeight("25px");
    hlTableTittleLayout.setSpacing(true);

    HorizontalLayout hlTableTitleandCaptionLayout = new HorizontalLayout();
    hlTableTitleandCaptionLayout.addStyleName("topbarthree");
    hlTableTitleandCaptionLayout.setWidth("100%");
    hlTableTitleandCaptionLayout.addComponent(hlTableTittleLayout);
    hlTableTitleandCaptionLayout.addComponent(hlFileDownloadLayout);
    hlTableTitleandCaptionLayout.setComponentAlignment(hlFileDownloadLayout, Alignment.MIDDLE_RIGHT);
    hlTableTitleandCaptionLayout.setHeight("28px");

    // for table panel
    btnAdd.addStyleName("add");
    btnEdit.addStyleName("editbt");
    btnView.addStyleName("view");
    btnView.setEnabled(false);

    hlAddEditLayout.addStyleName("topbarthree");
    hlAddEditLayout.setWidth("100%");
    hlAddEditLayout.addComponent(hlTableTitleandCaptionLayout);
    hlAddEditLayout.setHeight("28px");
    // Added Action Label to Table

    layoutTable.addComponent(hlAddEditLayout);
    layoutTable.setComponentAlignment(hlAddEditLayout, Alignment.TOP_LEFT);
    layoutTable.addComponent(tblEvalDetails);

    tablePanel.addComponent(layoutTable);
    tablePanel.setWidth("100%");
    tablePanel.setMargin(true);

    layoutPage.addComponent(mainPanel);
    layoutPage.addComponent(searchPanel);
    layoutPage.addComponent(tablePanel);

    // Added labels and titles to respective Location by Hohul

    HorizontalLayout hlNotificationLayout = new HorizontalLayout();
    hlNotificationLayout.addComponent(lblNotificationIcon);
    hlNotificationLayout.setComponentAlignment(lblNotificationIcon, Alignment.MIDDLE_CENTER);
    hlNotificationLayout.addComponent(lblSaveNotification);
    hlNotificationLayout.setComponentAlignment(lblSaveNotification, Alignment.MIDDLE_CENTER);
    hlHeaderLayout.addComponent(lblFormTittle);
    hlHeaderLayout.setComponentAlignment(lblFormTittle, Alignment.MIDDLE_LEFT);
    hlHeaderLayout.addComponent(hlBreadCrumbs);
    hlHeaderLayout.setComponentAlignment(hlBreadCrumbs, Alignment.MIDDLE_LEFT);
    hlHeaderLayout.addComponent(hlNotificationLayout);
    hlHeaderLayout.setComponentAlignment(hlNotificationLayout, Alignment.MIDDLE_CENTER);
    hlHeaderLayout.addComponent(layoutButton2);
    hlHeaderLayout.setComponentAlignment(layoutButton2, Alignment.MIDDLE_RIGHT);

    hlHeaderLayout.addComponent(layoutButton2);
    hlHeaderLayout.setComponentAlignment(layoutButton2, Alignment.BOTTOM_RIGHT);

    // load Component list values
    loadComponentListValues();

    //setTableProperties();
    populateAndConfig(false);
}

From source file:com.haulmont.cuba.web.toolkit.ui.CubaColorPickerPopup.java

License:Apache License

@Override
protected Component createSelectTab() {
    VerticalLayout selLayout = new VerticalLayout();
    selLayout.setMargin(new MarginInfo(false, false, true, false));
    selLayout.addComponent(selPreview);/*from   w  ww  .j av a2s . c o  m*/
    selLayout.addStyleName("seltab");

    colorSelect = new CubaColorPickerSelect();
    colorSelect.addColorChangeListener(this);

    selLayout.addComponent(colorSelect);
    return selLayout;
}

From source file:com.haulmont.cuba.web.widgets.CubaColorPickerPopup.java

License:Apache License

@Override
protected Component createSelectTab() {
    VerticalLayout selLayout = new VerticalLayout();
    selLayout.setSpacing(false);/*ww  w. java2 s . co m*/
    selLayout.setMargin(new MarginInfo(false, false, true, false));
    selLayout.addComponent(selPreview);
    selLayout.addStyleName("seltab");

    colorSelect = new CubaColorPickerSelect();
    colorSelect.addValueChangeListener(this::colorChanged);

    selLayout.addComponent(colorSelect);
    return selLayout;
}

From source file:com.hivesys.dashboard.view.repository.RepositoryUpload.java

public RepositoryUpload()

{
    final Label infoLabel = new Label("asasasasasasasxasx");

    final VerticalLayout dropPane = new VerticalLayout(infoLabel);

    dropPane.setComponentAlignment(infoLabel, Alignment.MIDDLE_CENTER);
    dropPane.setWidth(280.0f, Unit.PIXELS);
    dropPane.setHeight(200.0f, Unit.PIXELS);
    dropPane.addStyleName("drop-area");

    progress = new ProgressBar();
    progress.setIndeterminate(true);/*  w  w w  .  j  a v a  2  s .com*/
    progress.setVisible(false);
    dropPane.addComponent(progress);

    final DragAndDropBox dropBox = new DragAndDropBox(dropPane, progress) {

        @Override
        void processFile(String name, String type, ByteArrayOutputStream bas) {
            throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }
    };
    dropBox.setSizeUndefined();
}

From source file:com.klwork.explorer.ui.base.AbstractMainGridPage.java

License:Apache License

protected void addSelectComponent() {
    VerticalLayout vLayout = new VerticalLayout();
    vLayout.addStyleName("sidebar");
    vLayout.addStyleName("menu");
    vLayout.addStyleName("tasks");
    vLayout.setMargin(new MarginInfo(true, false, false, false));
    vLayout.setSizeFull();/*from ww w  .  j  a v  a  2s .co m*/

    HorizontalLayout tableHeadLayout = createSelectHead();
    vLayout.addComponent(tableHeadLayout);
    vLayout.setComponentAlignment(tableHeadLayout, Alignment.MIDDLE_LEFT);

    AbstractSelect select = createSelectComponent();
    vLayout.addComponent(select);
    vLayout.setExpandRatio(select, 1.0f);
    if (select != null) {
        grid.addComponent(vLayout, 1, 0);
    }
}

From source file:com.klwork.explorer.ui.base.AbstractSecondMainPage.java

License:Apache License

protected void addSelectComponent() {
    VerticalLayout secondMenuLayout = new VerticalLayout();
    secondMenuLayout.addStyleName("sidebar");
    secondMenuLayout.addStyleName("menu");
    //secondMenuLayout.setMargin(new MarginInfo(true,false,false,false));
    secondMenuLayout.setSpacing(true);//from   ww  w .j av a 2  s.  c o  m
    secondMenuLayout.setSizeFull();

    HorizontalLayout tableHeadLayout = new HorizontalLayout();
    tableHeadLayout.setStyleName("tableHead");
    tableHeadLayout.setHeight("20px");
    Label nameLabel = new Label("hello,word");
    tableHeadLayout.addComponent(nameLabel);
    tableHeadLayout.setComponentAlignment(nameLabel, Alignment.BOTTOM_CENTER);

    secondMenuLayout.addComponent(tableHeadLayout);
    //secondMenuLayout.setExpandRatio(tableHeadLayout, 0.1f);
    //table
    AbstractSelect select = createSelectComponent();
    secondMenuLayout.addComponent(select);
    secondMenuLayout.setExpandRatio(select, 1.0f);
    if (select != null) {
        grid.addComponent(secondMenuLayout, 0, 0);
    }
}

From source file:com.klwork.explorer.ui.business.project.MyCalendarView.java

License:Apache License

private void createCalendarEventPopup() {
    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);//from   w ww .j  a v  a2  s  . co m
    layout.setSpacing(true);
    layout.addStyleName("social");

    scheduleEventPopup = new Window(null, layout);
    scheduleEventPopup.setWidth("400px");
    scheduleEventPopup.setModal(true);
    scheduleEventPopup.center();

    layout.addComponent(scheduleEventFieldLayout);

    applyEventButton = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                commitCalendarEvent();
            } catch (CommitException e) {
                e.printStackTrace();
            }
        }
    });
    Button cancel = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            discardCalendarEvent();
        }
    });
    deleteEventButton = new Button("", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            deleteCalendarEvent();
        }
    });
    scheduleEventPopup.addCloseListener(new Window.CloseListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void windowClose(Window.CloseEvent e) {
            discardCalendarEvent();
        }
    });

    HorizontalLayout buttons = new HorizontalLayout();
    buttons.setSpacing(true);
    buttons.addComponent(deleteEventButton);
    buttons.addComponent(applyEventButton);
    buttons.addComponent(cancel);
    layout.addComponent(buttons);
    layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT);
}

From source file:com.klwork.explorer.ui.task.ProcessInstanceEventsPanel.java

License:Apache License

protected void addTaskEventText(final Comment taskEvent, final GridLayout eventGrid) {
    VerticalLayout layout = new VerticalLayout();
    layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT);
    layout.setWidth("100%");
    eventGrid.addComponent(layout);/*ww  w.jav  a 2 s . com*/

    // Actual text
    Label text = taskEventTextResolver.resolveText(taskEvent);
    text.setWidth("100%");
    layout.addComponent(text);

    // Time
    String human = new HumanTime(i18nManager).format(taskEvent.getTime());

    Label time = new Label(human + "(" + ")");
    time.setSizeUndefined();
    time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME);
    layout.addComponent(time);

}

From source file:com.klwork.explorer.ui.task.TaskEventsPanel.java

License:Apache License

protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) {
    VerticalLayout layout = new VerticalLayout();
    layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT);
    layout.setWidth("100%");
    eventGrid.addComponent(layout);/*  w w  w.  j  a va  2s . c o  m*/

    // Actual text
    Label text = taskEventTextResolver.resolveText(taskEvent);
    text.setWidth("100%");
    layout.addComponent(text);

    // Time
    Label time = new Label(new HumanTime(i18nManager).format(taskEvent.getTime()));
    time.setSizeUndefined();
    time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME);
    layout.addComponent(time);

}

From source file:com.klwork.explorer.ui.user.UserEventsPanel.java

License:Apache License

protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) {
    VerticalLayout layout = new VerticalLayout();
    layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT);
    layout.setWidth("100%");
    eventGrid.addComponent(layout);//from   w w w  .  j  av a2 s .  c o  m

    // Actual text
    Label text = taskEventTextResolver.resolveText(taskEvent);
    text.setWidth("100%");
    layout.addComponent(text);

    // Time
    String humFormat = new HumanTime(i18nManager).format(taskEvent.getTime());
    Label time = new Label(humFormat + " (" + StringDateUtil.dateToString(taskEvent.getTime(), 4) + ")");
    time.setSizeUndefined();
    time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME);
    layout.addComponent(time);

}