Example usage for com.vaadin.ui Alignment BOTTOM_LEFT

List of usage examples for com.vaadin.ui Alignment BOTTOM_LEFT

Introduction

In this page you can find the example usage for com.vaadin.ui Alignment BOTTOM_LEFT.

Prototype

Alignment BOTTOM_LEFT

To view the source code for com.vaadin.ui Alignment BOTTOM_LEFT.

Click Source Link

Usage

From source file:com.foc.vaadin.gui.components.FVEmailField.java

License:Apache License

private void init() {
    addComponent(getEmailText());/*  w  ww. j  ava2 s .com*/
    String withSendIcon = getAttributes().getValue(FXML.ATT_WITH_EMAIL_SEND_ICON);
    if (withSendIcon != null && (withSendIcon.toLowerCase().equals("false") || withSendIcon.equals("0"))) {

    } else {
        addComponent(getEmailButton());
        setComponentAlignment(getEmailButton(), Alignment.BOTTOM_LEFT);
    }
}

From source file:com.foc.vaadin.gui.components.FVGearWrapper.java

License:Apache License

public void setComponent(C component, boolean addPopup) {
    dispose_Component();/*from  w ww.  jav  a 2 s. c  om*/
    this.component = component;
    addComponentAsFirst((Component) component);

    if (addPopup && isEnabled()) {
        // In this sample we update the minimized view value with the content of
        // the TextField inside the popup.
        popup = new PopupView(new PopupTextField());
        popup.addStyleName("gear");
        //       popup.addStyleName("v-popupview-gear");
        //       popup.setStyleName("v-popupview-gear");
        popup.setDescription("More...");
        popup.setHideOnMouseOut(true);
        addComponent(popup);
        setComponentAlignment(popup, Alignment.BOTTOM_LEFT);
    }
}

From source file:com.foc.vaadin.gui.components.objectSelectorPopupView.FVObjectSelectorWindow.java

License:Apache License

private HorizontalLayout getMainHorizontalLayout() {
    if (mainHorizontalLayout == null) {
        mainHorizontalLayout = new HorizontalLayout();
        mainHorizontalLayout.setSizeUndefined();
        mainHorizontalLayout.addComponent(getNewValueTextField());
        mainHorizontalLayout.addComponent(getAddNewValueButton());
        mainHorizontalLayout.setComponentAlignment(getAddNewValueButton(), Alignment.BOTTOM_LEFT);
        mainHorizontalLayout.addComponent(getCancelButton());
        mainHorizontalLayout.setComponentAlignment(getCancelButton(), Alignment.BOTTOM_LEFT);
    }//from   w  w  w.  j a v  a2  s  . c  om
    return mainHorizontalLayout;
}

From source file:com.foc.vaadin.gui.FocXMLGuiComponentStatic.java

License:Apache License

public static void applyAlignment(AbstractOrderedLayout layout, Component component, String alignment) {
    alignment = alignment.toLowerCase();
    if (alignment.equals("right") || alignment.equals("middle_right")) {
        layout.setComponentAlignment(component, Alignment.MIDDLE_RIGHT);
    } else if (alignment.equals("left") || alignment.equals("middle_left")) {
        layout.setComponentAlignment(component, Alignment.MIDDLE_LEFT);
    } else if (alignment.equals("center") || alignment.equals("middle_center")) {
        layout.setComponentAlignment(component, Alignment.MIDDLE_CENTER);
    } else if (alignment.equals("top_right")) {
        layout.setComponentAlignment(component, Alignment.TOP_RIGHT);
    } else if (alignment.equals("top_left")) {
        layout.setComponentAlignment(component, Alignment.TOP_LEFT);
    } else if (alignment.equals("top_center")) {
        layout.setComponentAlignment(component, Alignment.TOP_CENTER);
    } else if (alignment.equals("bottom_right")) {
        layout.setComponentAlignment(component, Alignment.BOTTOM_RIGHT);
    } else if (alignment.equals("bottom_left")) {
        layout.setComponentAlignment(component, Alignment.BOTTOM_LEFT);
    } else if (alignment.equals("bottom_center")) {
        layout.setComponentAlignment(component, Alignment.BOTTOM_CENTER);
    }//from ww w .j  a  va2  s .  c om
}

From source file:com.foc.vaadin.gui.layouts.FVTableWrapperLayout.java

License:Apache License

private void createHeaderLayoutsIfNeeded() {
    if (headerRootLayout == null) {
        headerRootLayout = new FVHorizontalLayout(null);
        headerRootLayout.setWidth("100%");
        // headerRootLayout.addStyleName("foc-blue");
        // headerRootLayout.addStyleName("noPrint");
        // headerRootLayout.setCaption(null);

        //BAntoineS - Horizontal
        //verticalTableLayout.addComponentAsFirst(headerRootLayout);;
        addComponentAsFirst(headerRootLayout);
        //EAntoineS - Horizontal

        headerLeftLayout = new FVHorizontalLayout(null);
        headerRootLayout.addComponent(headerLeftLayout);
        headerRootLayout.setComponentAlignment(headerLeftLayout, Alignment.BOTTOM_LEFT);
        headerLeftLayout.setCaption(null);
        headerRootLayout.setExpandRatio(headerLeftLayout, 1);
        // headerLeftLayout.addStyleName("noPrint");

        headerRightLayout = new FVHorizontalLayout(null);
        headerRightLayout.setCaption(null);
        headerRootLayout.addComponent(headerRightLayout);
        headerRootLayout.setComponentAlignment(headerRightLayout, Alignment.BOTTOM_RIGHT);
        headerRightLayout.addStyleName(FocXMLGuiComponentStatic.STYLE_NO_PRINT);
    }//from   w  ww.j a  v  a2s .c  o m
}

From source file:com.foc.vaadin.gui.layouts.FVTableWrapperLayout.java

License:Apache License

public void addHeaderComponent_ToLeft(Component comp) {
    if (getHeaderLeftLayout() != null) {
        getHeaderLeftLayout().addComponent(comp);
        getHeaderLeftLayout().setComponentAlignment(comp, Alignment.BOTTOM_LEFT);
        addComponentToFocXMLLayoutMap(comp);
    }// www .  j  ava  2  s .  c o m
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVValidationLayout.java

License:Apache License

public void adjustForSignatureSlideShow() {
    if (titleLabel != null)
        mainHorizontalLayout.removeComponent(titleLabel);
    if (getApplyButton(false) != null) {
        mainHorizontalLayout.setComponentAlignment(getApplyButton(false), Alignment.BOTTOM_LEFT);
    }/*from w w w . ja  va2s .  c o m*/
    if (getDiscardButton(false) != null) {
        mainHorizontalLayout.setComponentAlignment(getDiscardButton(false), Alignment.BOTTOM_LEFT);
    }
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVValidationLayout.java

License:Apache License

private void initButtonsLayout(boolean showBackButton) {
    if (validationSettings != null) {

        if (validationSettings.isWithPrint() && !FocWebApplication.getInstanceForThread().isMobile()) {

            if (Globals.isValo()) {
                mainHorizontalLayout.addComponent(valo_GetPrintEmbedded(true));
                PrintingAction printingAction = newPrintingAction();
                if (printingAction != null) {
                    printingAction.dispose();
                    mainHorizontalLayout.addComponent(valo_GetPDFPrintEmbedded(true));
                }//from w ww .j  a  va2  s . c  o m
                applyBrowserWindowOpenerToPrintButton(valo_GetPrintEmbedded(false));
                mainHorizontalLayout.setComponentAlignment(valo_GetPrintEmbedded(false), Alignment.BOTTOM_LEFT);
            } else {
                mainHorizontalLayout.addComponent(getPrintButton(true));
                applyBrowserWindowOpenerToPrintButton(getPrintButton(false));
                mainHorizontalLayout.setComponentAlignment(getPrintButton(false), Alignment.BOTTOM_LEFT);
            }

            if (getFocData() != null && getFocData() instanceof FocObject
                    && validationSettings.isWithPrintAndExit()) {
                if (Globals.isValo()) {
                    mainHorizontalLayout.addComponent(valo_GetPrintEmbedded(true));
                    applyBrowserWindowOpenerToPrintButton(valo_GetPrintEmbedded(false));
                    mainHorizontalLayout.setComponentAlignment(valo_GetPrintEmbedded(false),
                            Alignment.BOTTOM_LEFT);
                } else {
                    mainHorizontalLayout.addComponent(getPrintAndExitButton(true));
                    applyBrowserWindowOpenerToPrintButton(getPrintAndExitButton(false));
                    mainHorizontalLayout.setComponentAlignment(getPrintAndExitButton(false),
                            Alignment.BOTTOM_LEFT);
                }
            }
        }

        if (validationSettings.hasPDFGenerator()) {
            if (Globals.isValo()) {
                if (valo_GetPdfGeneratorEmbedded(true) != null) {
                    mainHorizontalLayout.addComponent(valo_GetPdfGeneratorEmbedded(false));
                    mainHorizontalLayout.setComponentAlignment(valo_GetPdfGeneratorEmbedded(false),
                            Alignment.BOTTOM_LEFT);
                }
            } else {
                if (getPdfGeneratorButton(true) != null) {
                    mainHorizontalLayout.addComponent(getPdfGeneratorButton(true));
                    mainHorizontalLayout.setComponentAlignment(getPdfGeneratorButton(true),
                            Alignment.BOTTOM_LEFT);
                }
            }
        }

        if (validationSettings.hasMSWordGenerator()) {
            if (valo_GetMSWordGeneratorEmbedded(true) != null) {
                mainHorizontalLayout.addComponent(valo_GetMSWordGeneratorEmbedded(false));
                mainHorizontalLayout.setComponentAlignment(valo_GetMSWordGeneratorEmbedded(false),
                        Alignment.BOTTOM_LEFT);
            }
        }

        if (validationSettings.isWithAttach() && isAttachementApplicable()) {
            if (Globals.isValo()) {
                mainHorizontalLayout.addComponent(valo_GetAttachEmbedded(true));
                mainHorizontalLayout.setComponentAlignment(valo_GetAttachEmbedded(false),
                        Alignment.BOTTOM_LEFT);
            } else {
                mainHorizontalLayout.addComponent(getAttachButton(true));
                mainHorizontalLayout.setComponentAlignment(getAttachButton(false), Alignment.BOTTOM_LEFT);
            }
        }

        if (validationSettings.isWithEmail() && !FocWebApplication.getInstanceForThread().isMobile()) {
            if (Globals.isValo()) {
                mainHorizontalLayout.addComponent(valo_GetEmailEmbedded(true));
                mainHorizontalLayout.setComponentAlignment(valo_GetEmailEmbedded(false), Alignment.BOTTOM_LEFT);
            } else {
                mainHorizontalLayout.addComponent(getEmailButton(true));
                mainHorizontalLayout.setComponentAlignment(getEmailButton(false), Alignment.BOTTOM_LEFT);
            }
        }

        //DO NOT DELETE THIS
        //UNDER DEVELOPMENT
        /*
        if (validationSettings.isWithInternalEmail() && !FocWebApplication.getInstanceForThread().isMobile()){
          addComponent(getInternalEmailButton(true));
          setComponentAlignment(getInternalEmailButton(false), Alignment.BOTTOM_LEFT);
        }
        */
    }

    if (Globals.isValo()) {
        Embedded embedded = valo_GetFullScreenEmbedded(true);
        if (embedded != null) {
            mainHorizontalLayout.addComponent(embedded);
            mainHorizontalLayout.setComponentAlignment(embedded, Alignment.BOTTOM_LEFT);
        }
    } else {
        Button fullScreenButton = getFullScreenButton(true);
        if (fullScreenButton != null) {
            mainHorizontalLayout.addComponent(fullScreenButton);
            mainHorizontalLayout.setComponentAlignment(fullScreenButton, Alignment.BOTTOM_LEFT);
        }
    }

    Component lastAdded = null;
    if (validationSettings.isWithViewSelector() && !FocWebApplication.getInstanceForThread().isMobile()
            && Globals.getApp() != null && Globals.getApp().getUser_ForThisSession() != null
            && Globals.getApp().getUser_ForThisSession().getGroup() != null && Globals.getApp()
                    .getUser_ForThisSession().getGroup().getViewsRight() < GroupXMLViewDesc.ALLOW_NOTHING) {

        mainHorizontalLayout.addComponent(getViewSelector(true));
        lastAdded = getViewSelector(false);
        mainHorizontalLayout.setComponentAlignment(getViewSelector(false), Alignment.MIDDLE_LEFT);
    }

    if (getStatusLayout(true) != null) {
        lastAdded = (Component) getStatusLayout(false);
    }

    if (getStageLayout(true) != null) {

        FocDesc focDesc = getFocObject().getThisFocDesc();
        if (focDesc instanceof IWorkflowDesc) {
            IWorkflowDesc iWorkflowDesc = (IWorkflowDesc) focDesc;
            WFMap map = WFTransactionConfigDesc.getMap_ForTransaction(iWorkflowDesc.iWorkflow_getDBTitle());
            if (map != null) {
                lastAdded = (Component) getStageLayout(false);
            }
        }
    }

    IValidationLayoutMoreMenuFiller filler = FVValidationMore.getInstance()
            .getIValidationLayoutMoreMenuFiller();
    if (filler != null
            && (FocWebApplication.getFocUser() == null || !FocWebApplication.getFocUser().isGuest())) {
        filler.addMenuItems(this);
        centralPanel.addMoreMenuItems(this);
    }

    MenuBar menuBar = getMenubar(false);
    if (menuBar != null && !FocWebApplication.getInstanceForThread().isMobile()) {
        mainHorizontalLayout.addComponent(menuBar);

        mainHorizontalLayout.setComponentAlignment(menuBar, Alignment.MIDDLE_LEFT);
        lastAdded = menuBar;
    }
    /*
      if(    getFocObject() != null 
    && getFocObject().workflow_IsWorkflowSubject()
    && FChatModule.userHasChat()
    && getCentralPanel() != null 
    && getCentralPanel() instanceof FocXMLLayout
    && getCentralPanel().getMainWindow() != null) {
         chatSlider = new FChatSlider((FocXMLLayout)getCentralPanel());
         chatSlider.build(FVValidationLayout.this);
    }
    */

    if (getLinkLayout(true) != null) {
        mainHorizontalLayout.addComponent(getLinkLayout(false));
        mainHorizontalLayout.setComponentAlignment(getLinkLayout(false), Alignment.BOTTOM_LEFT);
    }

    //    addHelpButtons();
    addTitle();

    addApplyDiscardButtons(showBackButton);
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVValidationLayout.java

License:Apache License

public void addApplyDiscardButtons(boolean showBackButton) {
    boolean showValidationAndSave = validationSettings != null && validationSettings.isWithApply();
    boolean showSave = validationSettings != null && validationSettings.isWithSave();
    boolean showDiscard = validationSettings != null && validationSettings.isWithDiscard();
    boolean showGoBack = validationSettings == null && showBackButton;

    ICentralPanel centralPanel = getCentralPanel();
    if (centralPanel instanceof FocXMLLayout) {
        FocXMLLayout layout = (FocXMLLayout) centralPanel;

        if (Globals.isValo()) {
            Component comp = valo_GetNotCompletedYet(true);
            if (comp != null) {
                mainHorizontalLayout.addComponent(comp);
                mainHorizontalLayout.setComponentAlignment(comp, Alignment.MIDDLE_RIGHT);
            }/*  w ww  .j  av a  2  s  .c om*/
        }

        if (layout.getTableTreeThatOpenedThisForm() != null
                && layout.getTableTreeThatOpenedThisForm().getTableTreeDelegate() != null
                && layout.getTableTreeThatOpenedThisForm().getTableTreeDelegate().isDeleteEnabled()
                && getFocObject() != null) {
            if (Globals.isValo()) {
                AbstractComponent deleteButtton = valo_GetDeleteEmbedded(true);
                if (deleteButtton != null) {
                    mainHorizontalLayout.addComponent(deleteButtton);
                    mainHorizontalLayout.setComponentAlignment(deleteButtton, Alignment.BOTTOM_LEFT);
                }
            } else {
                Button deleteButtton = getDeleteButton(true);
                if (deleteButtton != null) {
                    mainHorizontalLayout.addComponentAsFirst(deleteButtton);
                    mainHorizontalLayout.setComponentAlignment(deleteButtton, Alignment.BOTTOM_LEFT);
                }
            }
        }
    }

    Component discardOrGoBackButton = null;

    if (showDiscard) {
        if (Globals.isValo()) {
            discardOrGoBackButton = valo_GetDiscardButton(true);
        } else {
            discardOrGoBackButton = getDiscardButton(true);
        }
    } else if (showGoBack) {
        if (Globals.isValo()) {
            discardOrGoBackButton = valo_GetGoBackEmbedded(true);
        } else {
            discardOrGoBackButton = getGoBackButton(true);
        }
    }

    if (discardOrGoBackButton != null) {
        mainHorizontalLayout.addComponent(discardOrGoBackButton);
        if (Globals.isValo()) {
            mainHorizontalLayout.setComponentAlignment(discardOrGoBackButton, Alignment.MIDDLE_RIGHT);
        } else {
            mainHorizontalLayout.setComponentAlignment(discardOrGoBackButton, Alignment.BOTTOM_RIGHT);
        }

        if (titleLabel == null) {
        }
    }

    if (showValidationAndSave) {
        if (showSave) {
            if (Globals.isValo()) {
                mainHorizontalLayout.addComponent(valo_GetSaveButton(true));
                mainHorizontalLayout.setComponentAlignment(valo_GetSaveButton(false), Alignment.MIDDLE_LEFT);
            } else {
                mainHorizontalLayout.addComponent(getSaveButton(true));
                mainHorizontalLayout.setComponentAlignment(getSaveButton(false), Alignment.BOTTOM_LEFT);
            }
        }

        if (Globals.isValo()) {
            mainHorizontalLayout.addComponent(valo_GetApplyButton(true));
            mainHorizontalLayout.setComponentAlignment(valo_GetApplyButton(false), Alignment.MIDDLE_LEFT);
        } else {
            mainHorizontalLayout.addComponent(getApplyButton(true));
            mainHorizontalLayout.setComponentAlignment(getApplyButton(false), Alignment.BOTTOM_LEFT);
        }
    }
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVValidationLayout.java

License:Apache License

private WFConsole_Form getWorkflowConsole(boolean createIfNull) {
    FocObject focObj = getWorkflowFocObject();
    if (worflowConsole == null && focObj instanceof IWorkflow && createIfNull) {
        XMLViewKey key = new XMLViewKey(WorkflowWebModule.STORAGE_NAME_WORKFLOW_CONSOLE, XMLViewKey.TYPE_FORM);
        INavigationWindow window = findAncestor(FocCentralPanel.class);
        if (window == null)
            window = (INavigationWindow) getWindow();

        //      if(window != null) {
        worflowConsole = (WFConsole_Form) XMLViewDictionary.getInstance().newCentralPanel(window, key, focObj);

        worflowConsole.setForceHideSignCancel(isForceHideSignCancel());
        worflowConsole.setWidth("100%");
        addComponentAsFirst(worflowConsole);
        setComponentAlignment(worflowConsole, Alignment.BOTTOM_LEFT);

        worflowConsole.setFocXMLLayout(getCentralPanel());

        worflowConsole.addStyleName("foc-footerLayout");
        setLogLayoutInWorkflowConsole();
    }//from w w  w  .  ja v a 2 s .co m
    //      }
    return worflowConsole;
}