Example usage for com.vaadin.ui NativeButton NativeButton

List of usage examples for com.vaadin.ui NativeButton NativeButton

Introduction

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

Prototype

public NativeButton(String caption) 

Source Link

Usage

From source file:edu.nps.moves.mmowgli.modules.actionplans.ActionPlanPageTabImages.java

License:Open Source License

private void addOneImage(Media m) {
    MPanelWrapper wrap = new MPanelWrapper();
    wrap.setMargin(false);//from   ww  w . j  av  a 2  s  .  c  o  m
    wrap.setSpacing(false);
    wrap.ip = new MediaPanel(m, apId, 0, replaceLis);
    wrap.addComponent(wrap.ip);

    HorizontalLayout hl = new HorizontalLayout();
    hl.setWidth(MediaPanel.WIDTH);
    Label lab;
    hl.addComponent(lab = new Label());
    lab.setWidth("3px");
    hl.addComponent(lab = new Label(getDisplayedName(m)));
    lab.addStyleName("m-font-size-11");
    hl.setExpandRatio(lab, 1.0f);
    hl.addComponent(wrap.killButt = new NativeButton(null));
    hl.addComponent(lab = new Label());
    lab.setWidth("3px");

    wrap.addComponent(hl);
    wrap.killButt.setCaption("delete");
    wrap.killButt.setStyleName(BaseTheme.BUTTON_LINK);
    wrap.killButt.addStyleName("borderless");
    wrap.killButt.addStyleName("m-actionplan-nothumbs-button");
    wrap.killButt.addClickListener(new ImageRemover(m));
    ((AbstractLayout) imageScroller.getContent()).addComponent(wrap);
    wrap.ip.initGui();
}

From source file:edu.nps.moves.mmowgli.modules.actionplans.ActionPlanPageTabVideos.java

License:Open Source License

private void addOneVideo(Media m) {
    VMPanelWrapper vl = new VMPanelWrapper();
    vl.setMargin(false);//  w  w w.j  a v a2s. com
    vl.setSpacing(false);
    vl.ip = new MediaPanel(m, apId, 0, replaceLis);
    vl.addComponent(vl.ip);

    HorizontalLayout hl = new HorizontalLayout();
    hl.setWidth(MediaPanel.WIDTH);
    Label lab;
    hl.addComponent(lab = new Label());
    lab.setWidth("3px");

    if (m.getType() != MediaType.YOUTUBE) {
        hl.addComponent(lab = new Label(getDisplayedName(m))); // label
        lab.addStyleName("m-font-size-11");
        hl.setExpandRatio(lab, 1.0f);
    } else {
        NativeButton linkButt;
        hl.addComponent(linkButt = new NativeButton(null)); // link
        linkButt.setCaption(getDisplayedName(m));
        linkButt.setStyleName(BaseTheme.BUTTON_LINK);
        linkButt.addStyleName("borderless");
        linkButt.addStyleName("m-actionplan-nothumbs-button");
        linkButt.addClickListener(new LinkVisitor(m));

        hl.addComponent(lab = new Label());
        lab.setWidth("1px");
        hl.setExpandRatio(lab, 1.0f);
    }

    hl.addComponent(vl.killButt = new NativeButton(null));
    vl.killButt.setCaption("delete");
    vl.killButt.setStyleName(BaseTheme.BUTTON_LINK);
    vl.killButt.addStyleName("borderless");
    vl.killButt.addStyleName("m-actionplan-nothumbs-button");
    vl.killButt.addClickListener(new VideoRemover(m));

    hl.addComponent(lab = new Label());
    lab.setWidth("3px");

    vl.addComponent(hl);

    ((AbstractLayout) rightScroller.getContent()).addComponent(vl);
    vl.ip.initGui();
}

From source file:edu.nps.moves.mmowgli.modules.administration.CardColorChooserComponent.java

License:Open Source License

@SuppressWarnings("serial")
@HibernateSessionThreadLocalConstructor//from  w w w  . ja v  a  2s.  co m
CardColorChooserComponent(CardType ct) {
    this.ct = ct;
    setSpacing(true);
    setMargin(false);
    setSizeUndefined();

    // temp
    if (ct == null)
        this.ct = CardType.getCurrentPositiveIdeaCardTypeTL();

    addComponent(colorCombo = new ColorSelect());
    colorCombo.addValueChangeListener(new MyColorComboListener());

    Label lab;
    addComponent(lab = new Label());
    lab.setWidth("10px");

    openSamplesButt = new NativeButton("view color samples");
    addComponent(openSamplesButt);
    setComponentAlignment(openSamplesButt, Alignment.MIDDLE_CENTER);

    openSamplesButt.addClickListener(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            ColorSampler.show(openSamplesButt);
        }
    });
}

From source file:edu.nps.moves.mmowgli.modules.administration.GameDesignPanel.java

License:Open Source License

@SuppressWarnings("serial")
@HibernateSessionThreadLocalConstructor/*w ww .  ja  va  2  s.  c  o  m*/
public PhasesEditPanel(Move move, GameDesignGlobals globs) {
    this.moveBeingEdited = move;
    setWidth("100%");
    setSpacing(true);
    phaseBeingEdited = moveBeingEdited.getCurrentMovePhase();
    tabSh = new TabSheet();

    tabPanels.add(titlePan = new PhaseTitlesGameDesignPanel(phaseBeingEdited, auxListener, globs));
    tabPanels.add(signupPan = new SignupHTMLGameDesignPanel(phaseBeingEdited, auxListener, globs));
    tabPanels.add(loginPan = new LoginSignupGameDesignPanel(phaseBeingEdited, auxListener, globs));
    tabPanels.add(welcomePan = new WelcomeScreenGameDesignPanel(phaseBeingEdited, auxListener, globs));
    tabPanels.add(call2ActionPan = new CallToActionGameDesignPanel(phaseBeingEdited, auxListener, globs));

    Label lab;
    addComponent(lab = new Label());
    lab.setHeight("5px");

    HorizontalLayout topHL = new HorizontalLayout();
    topHL.setSpacing(true);

    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);
    topHL.addComponent(topLevelLabel = new Label());
    setTopLabelText(moveBeingEdited);
    topLevelLabel.setSizeUndefined();
    topHL.addComponent(phaseSelector = new PhaseSelector(null, Move.getCurrentMoveTL()));
    phaseSelector.addValueChangeListener(new PhaseComboListener());

    topHL.addComponent(
            runningPhaseWarningLabel = new HtmlLabel("<font color='red'><i>Active game phase!</i></font>"));
    runningPhaseWarningLabel.setSizeUndefined();
    runningPhaseWarningLabel.setVisible(AbstractGameBuilderPanel.isRunningPhaseTL(phaseBeingEdited));

    topHL.addComponent(newPhaseButt = new NativeButton("Add new phase to round"));
    newPhaseButt.setEnabled(false);
    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);
    topHL.setWidth("100%");
    addComponent(topHL);

    propagateCB = new CheckBox("Propagate new phase-dependent edits to all other phases in this round");
    addComponent(propagateCB);
    setComponentAlignment(propagateCB, Alignment.MIDDLE_CENTER);
    propagateCB.setVisible(phaseBeingEdited.isPreparePhase());

    addComponent(lab = new HtmlLabel(
            "<b>The currently running phase is set through the Game Administrator menu</b>"));
    lab.setSizeUndefined();
    setComponentAlignment(lab, Alignment.TOP_CENTER);

    newPhaseButt.addClickListener(new ClickListener() {
        @Override
        @MmowgliCodeEntry
        @HibernateOpened
        @HibernateClosed
        public void buttonClick(ClickEvent event) {
            HSess.init();
            NewMovePhaseDialog dial = new NewMovePhaseDialog(moveBeingEdited);
            dial.addCloseListener(new CloseListener() {
                @Override
                public void windowClose(CloseEvent e) {
                    Object key = HSess.checkInit();
                    phaseSelector.fillCombo(moveBeingEdited);
                    HSess.checkClose(key);
                }
            });
            dial.showDialog();
            HSess.close();
        }
    });
}

From source file:edu.nps.moves.mmowgli.modules.administration.SubCardsGameDesignPanel.java

License:Open Source License

private Component renderFields(CardTypeFields fields, NativeSelect combo, String name) {
    VerticalLayout topPan = new VerticalLayout();
    topPan.setWidth("98%");
    topPan.addStyleName("m-greyborder3");
    Label lab;/*www .  ja v  a 2  s  . c  om*/
    topPan.addComponent(lab = new Label());
    lab.setHeight("18px");

    HorizontalLayout topHL = new HorizontalLayout();
    topHL.setSpacing(true);
    ;
    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);
    topHL.addComponent(lab = new HtmlLabel("<b>" + name + "</b>"));
    lab.setSizeUndefined();

    topHL.addComponent(combo);

    Button newTypeButt;
    topHL.addComponent(newTypeButt = new NativeButton("Define new type"));
    newTypeButt.addStyleName(Runo.BUTTON_SMALL);

    newTypeButt.setReadOnly(globs.readOnlyCheck(false));
    newTypeButt.setEnabled(!newTypeButt.isReadOnly());
    if (!newTypeButt.isReadOnly())
        newTypeButt.addClickListener(new NewTypeListener(fields.typeOrdinal));

    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);

    topPan.addComponent(topHL);
    topHL.setWidth("100%");

    topPan.addComponent(fields);
    fields.setWidth("100%");
    return topPan;
}

From source file:edu.nps.moves.mmowgli.modules.administration.TopCardsGameDesignPanel.java

License:Open Source License

private Component renderFields(CardTypeFields fields, NativeSelect combo, String name, Label editWarningLab) {
    VerticalLayout topPan = new VerticalLayout();
    topPan.setWidth("98%");
    topPan.addStyleName("m-greyborder3");
    Label lab;//  ww  w  . j  a  v a  2 s .  c  om
    topPan.addComponent(lab = new Label());
    lab.setHeight("18px");

    HorizontalLayout topHL = new HorizontalLayout();
    topHL.setSpacing(true);
    ;
    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);
    topHL.addComponent(lab = new HtmlLabel("<b>" + name + "</b>"));
    lab.setSizeUndefined();

    topHL.addComponent(combo);

    Button newTypeButt;
    topHL.addComponent(newTypeButt = new NativeButton("Define new top-level type"));
    newTypeButt.addStyleName(Runo.BUTTON_SMALL);
    newTypeButt.setReadOnly(globals.readOnlyCheck(false));
    newTypeButt.setEnabled(!newTypeButt.isReadOnly());
    if (!newTypeButt.isReadOnly())
        newTypeButt.addClickListener(new NewCardClassListener(fields.cardClass));

    topHL.addComponent(lab = new Label());
    lab.setWidth("1px");
    topHL.setExpandRatio(lab, 0.5f);

    topPan.addComponent(topHL);
    topHL.setWidth("100%");

    addComponent(editWarningLab);

    topPan.addComponent(fields);
    fields.setWidth("100%");
    return topPan;
}

From source file:edu.nps.moves.mmowgli.modules.cards.CardChainPage.java

License:Open Source License

@HibernateRead
private GhostVerticalLayoutWrapper makeCardMarkingPanelTL() {
    GhostVerticalLayoutWrapper wrapper = new GhostVerticalLayoutWrapper();
    VerticalLayout vl = new VerticalLayout();
    vl.setSpacing(true);// ww w .jav a  2  s .  co m
    wrapper.ghost_setContent(vl);

    Label lab = new HtmlLabel("<b><i>Game Master Actions</i></b>");
    vl.addComponent(lab);
    vl.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

    NativeButton editCardButt = new NativeButton("Edit Card");
    editCardButt.addStyleName(BaseTheme.BUTTON_LINK);
    editCardButt.addClickListener(new EditCardTextListener());
    vl.addComponent(editCardButt);

    markingRadioGroup = new OptionGroup(null);
    markingRadioGroup.setMultiSelect(false);
    markingRadioGroup.setImmediate(true);
    markingRadioGroup.setDescription("Only game masters may change.");
    vl.addComponent(markingRadioGroup);

    NativeButton clearButt = new NativeButton("clear card marking");
    clearButt.addStyleName(BaseTheme.BUTTON_LINK);
    vl.addComponent(clearButt);
    clearButt.addClickListener(new MarkingClearListener());

    Collection<?> markings = CardMarking.getContainer().getItemIds();
    CardMarking hiddencm = null;
    for (Object o : markings) {
        CardMarking cm = CardMarking.getTL(o);
        if (cm == CardMarkingManager.getHiddenMarking())
            hiddencm = cm;
        else if (cm == CardMarkingManager.getNoChildrenMarking())
            ; // todo enable with game switch
        else
            markingRadioGroup.addItem(cm);
    }

    if (hiddencm != null)
        markingRadioGroup.addItem(hiddencm);

    Card card = Card.getTL(cardId); // feb refactor DBGet.getCardTL(cardId);
    vl.addComponent(lab = new Label());
    lab.setHeight("5px");

    NativeButton newActionPlanButt = new IDNativeButton("create action plan from this card",
            CARDCREATEACTIONPLANCLICK, cardId);
    newActionPlanButt.addStyleName(BaseTheme.BUTTON_LINK);
    vl.addComponent(newActionPlanButt);

    if (Mmowgli2UI.getGlobals().getUserTL().isTweeter()) {
        String tweet = TWEETBUTTONEMBEDDED_0 + buildTweet(card) + TWEETBUTTONEMBEDDED_1;
        Label tweeter = new HtmlLabel(tweet);
        tweeter.setHeight(TWEETBUTTON_HEIGHT);
        tweeter.setWidth(TWEETBUTTON_WIDTH);
        vl.addComponent(tweeter);
    }
    return wrapper;
}

From source file:edu.nps.moves.mmowgli.modules.cards.IdeaDashboardTabRecent.java

License:Open Source License

private Button buildButt(String s) {
    Button b = new NativeButton(s);
    b.setStyleName(BaseTheme.BUTTON_LINK);
    b.addStyleName("borderless");
    b.addStyleName("m-actionplan-comments-button");
    b.addClickListener(this);
    return b;/*  ww  w  .  jav  a 2 s  . c om*/
}

From source file:edu.nps.moves.mmowgli.modules.cards.PlayAnIdeaPage2.java

License:Open Source License

@Override
public void initGui() {
    setSpacing(true);//from w  w w .j av  a  2  s.c  om
    Label lab = new Label();
    lab.setWidth(CALLTOACTION_HOR_OFFSET_STR);
    addComponent(lab);

    MovePhase phase = MovePhase.getCurrentMovePhaseTL();

    String playTitle = phase.getPlayACardTitle();
    if (playTitle != null && playTitle.length() > 0) {
        addComponent(lab = new Label(playTitle));
        setComponentAlignment(lab, Alignment.TOP_CENTER);
        lab.addStyleName("m-calltoaction-playprompt");
    }
    AbsoluteLayout mainAbsL = new AbsoluteLayout();
    mainAbsL.setWidth(PAIP_WIDTH);
    mainAbsL.setHeight("675px");

    addComponent(mainAbsL);

    // do this at the bottom so z order is top: mainAbsL.addComponent(topHL = new HorizontalLayout(),"top:0px;left:0px");
    topHL = new HorizontalLayout();
    topHL.addComponent(leftAbsL = new AbsoluteLayout());
    topHL.addComponent(rightAbsL = new AbsoluteLayout());

    leftAbsL.setWidth(PAIP_HALFWIDTH);
    rightAbsL.setWidth(PAIP_HALFWIDTH);
    leftAbsL.setHeight(PAIP_TOP_HEIGHT);
    rightAbsL.setHeight(PAIP_TOP_HEIGHT);

    GameLinks gl = GameLinks.getTL();
    final String howToPlayLink = gl.getHowToPlayLink();
    if (howToPlayLink != null && howToPlayLink.length() > 0) {
        howToPlayButt = new NativeButton(null);
        BrowserWindowOpener bwo = new BrowserWindowOpener(howToPlayLink);
        bwo.setWindowName(MmowgliConstants.PORTALTARGETWINDOWNAME);
        bwo.extend(howToPlayButt);
    } else if (mockupOnly)
        howToPlayButt = new NativeButton(null);
    else
        howToPlayButt = new IDNativeButton(null, HOWTOPLAYCLICK);

    leftAbsL.addComponent(howToPlayButt, HOWTO_POS);

    leftType = CardType.getCurrentPositiveIdeaCardTypeTL();
    leftAbsL.addComponent(poshdr = CardSummaryListHeader.newCardSummaryListHeader(leftType, mockupOnly, null),
            POS_POS);
    poshdr.initGui();
    poshdr.addNewCardListener(newCardListener);

    if (mockupOnly)
        gotoDashboardButt = new NativeButton(null);
    else
        gotoDashboardButt = new IDNativeButton(null, IDEADASHBOARDCLICK);

    rightAbsL.addComponent(gotoDashboardButt, GOTO_POS);

    rightType = CardType.getCurrentNegativeIdeaCardTypeTL();
    rightAbsL.addComponent(neghdr = CardSummaryListHeader.newCardSummaryListHeader(rightType, mockupOnly, null),
            NEG_POS);
    neghdr.initGui();
    neghdr.addNewCardListener(newCardListener);

    howToPlayButt.setStyleName("m-howToPlayButton");
    gotoDashboardButt.setStyleName("m-gotoIdeaDashboardButton");
    // end of top gui

    VerticalLayout bottomVLay = new VerticalLayout();
    mainAbsL.addComponent(bottomVLay, "top:200px;left:0px");
    mainAbsL.addComponent(topHL, "top:0px;left:0px"); // doing this at the bottom so z order is top: 

    HorizontalLayout hLay = buildLabelPopupRow(leftType.getTitle(),
            topNewCardLabel = new Label("new card played"));

    bottomVLay.addComponent(hLay);
    bottomVLay.setComponentAlignment(hLay, Alignment.MIDDLE_LEFT);

    User me = Mmowgli2UI.getGlobals().getUserTL();

    topholder = new HorizontalCardDisplay(new Dimension(CARDWIDTH, CARDHEIGHT), NUMCARDS, me, mockupOnly,
            "top");
    bottomVLay.addComponent(topholder);
    ;
    topholder.initGui();

    bottomVLay.addComponent(lab = new Label());
    lab.setHeight("10px");

    hLay = buildLabelPopupRow(rightType.getTitle(), bottomNewCardLabel = new Label("new card played"));

    bottomVLay.addComponent(hLay);
    bottomVLay.setComponentAlignment(hLay, Alignment.MIDDLE_LEFT);
    bottomholder = new HorizontalCardDisplay(new Dimension(CARDWIDTH, CARDHEIGHT), NUMCARDS, me, mockupOnly,
            "bottom");
    bottomVLay.addComponent(bottomholder);
    bottomholder.initGui();

    MCacheManager cMgr = AppMaster.instance().getMcache();

    if (mockupOnly) {
        addCardsTL(topholder, cMgr.getPositiveIdeaCardsCurrentMove());
        addCardsTL(bottomholder, cMgr.getNegativeIdeaCardsCurrentMove());
    } else {
        Game g = Game.getTL();
        if (g.isShowPriorMovesCards() || me.isAdministrator()) {
            addCardsTL(topholder, cMgr.getAllPositiveIdeaCards());
            addCardsTL(bottomholder, cMgr.getAllNegativeIdeaCards());
        } else if (!g.isShowPriorMovesCards()) {
            addCardsTL(topholder, cMgr.getPositiveUnhiddenIdeaCardsCurrentMove());
            addCardsTL(bottomholder, cMgr.getNegativeUnhiddenIdeaCardsCurrentMove());
        }
    }
}

From source file:edu.nps.moves.mmowgli.modules.registrationlogin.RegistrationPageBase.java

License:Open Source License

@Override
public void initGui() {
    setWidth("988px"); // same width as included panel
    setHeight(BIGGESTWINDOW_HEIGHT_S); // try to handle making the popup miss the video

    Instrumentation.addInstrumentation(this);

    Game game = Game.getTL();/*  w  w w  .  j ava 2s  . c  o m*/
    MovePhase phase = game.getCurrentMove().getCurrentMovePhase();

    HorizontalLayout outerLayout = new HorizontalLayout();
    outerLayout.setSpacing(true);
    addComponent(outerLayout);
    outerLayout.setWidth("988px");
    setExpandRatio(outerLayout, 1);
    Label spacer;

    outerLayout.addComponent(baseVLayout = new VerticalLayout());
    baseVLayout.setWidth("988px");
    outerLayout.setComponentAlignment(baseVLayout, Alignment.TOP_CENTER);
    baseVLayout.setSpacing(true);

    // This is just to give us a hidden widget to update to keep push channel alive through Akamai
    outerLayout.addComponent(pushPingLab = new HtmlLabel(""));
    pushPingLab.setWidth("5px");

    String headingStr = phase.getOrientationCallToActionText();
    String summaryStr = phase.getOrientationHeadline();
    String textStr = phase.getOrientationSummary();
    Media vid = phase.getOrientationVideo();

    vidPan = new VideoWithRightTextPanel(vid, headingStr, summaryStr, textStr, null);
    vidPan.setLargeText(true);
    baseVLayout.addComponent(vidPan);
    vidPan.initGui();

    HorizontalLayout bottomHLayout = new HorizontalLayout();
    bottomHLayout.addComponent(spacer = new Label()); // special spacer
    bottomHLayout.setExpandRatio(spacer, 1.0f);

    Label[] spacers = new Label[5];

    Label lab;
    int numButts = 0;

    // Email signup button
    //-----------------------
    if (phase.isSignupButtonShow()) {
        VerticalLayout signupVL = new VerticalLayout();
        signupVL.setHeight("50px");
        signupVL.setMargin(false);

        if (mockupOnly)
            signupVL.addComponent(signupButt = new NativeButton(null)); // no handler
        else
            signupVL.addComponent(signupButt = new NativeButton(null, this));
        signupButt.addStyleName("signupbutton");
        signupButt.setEnabled(phase.isSignupButtonEnabled());
        Mmowgli2UI.getGlobals().mediaLocator().decorateImageButton(signupButt, phase.getSignupButtonIcon());
        signupVL.setComponentAlignment(signupButt, Alignment.MIDDLE_CENTER);

        signupVL.addComponent(lab = new Label());
        lab.setHeight("1px");
        signupVL.setExpandRatio(lab, 1.0f);

        signupVL.addComponent(lab = new HtmlLabel(phase.getSignupButtonSubText()));
        lab.addStyleName("m-text-align-center");
        signupButt.setDescription(phase.getSignupButtonToolTip());
        lab.setDescription(phase.getSignupButtonToolTip());
        lab.setEnabled(phase.isSignupButtonEnabled());
        signupVL.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

        bottomHLayout.addComponent(signupVL);
        numButts++;
    }

    // New player reg button
    //----------------------
    if (phase.isNewButtonShow()) {
        if (numButts > 0)
            bottomHLayout.addComponent(spacers[numButts] = new Label());

        VerticalLayout newButtVL = new VerticalLayout();
        newButtVL.setHeight("50px");
        newButtVL.setMargin(false);

        if (mockupOnly)
            newButtVL.addComponent(imNewButt = new NativeButton(null)); // no handler
        else
            newButtVL.addComponent(imNewButt = new NativeButton(null, this));
        imNewButt.setEnabled(phase.isNewButtonEnabled());
        imNewButt.addStyleName("newuserbutton");
        Mmowgli2UI.getGlobals().mediaLocator().decorateImageButton(imNewButt, phase.getNewButtonIcon());
        newButtVL.setComponentAlignment(imNewButt, Alignment.MIDDLE_CENTER);

        newButtVL.addComponent(lab = new Label());
        lab.setHeight("1px");
        newButtVL.setExpandRatio(lab, 1.0f);

        /*
              boolean gameRO = game.isReadonly();
              boolean gameClamped = game.isRegisteredLogonsOnly();
              imNewButt.setEnabled(!gameRO & !gameClamped);
                
              // Label lab;
              if (gameRO) {
                newButtVL.addComponent(lab = new Label("No new player accounts, for now")); // "Player registration is currently closed"));
                                                                            // //"Sorry, no more new players"));
                String s;
                lab.setDescription(s = "New player accounts will open when game play starts");
                imNewButt.setDescription(s);
              }
              else if (gameClamped)
                newButtVL.addComponent(lab = new Label("The game is full, please retry later")); // "Sorry, no more new players"));
              else
                newButtVL.addComponent(lab = new Label("You can get started in 2 minutes..."));
        */
        newButtVL.addComponent(lab = new HtmlLabel(phase.getNewButtonSubText()));
        newButtVL.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);
        lab.addStyleName("m-text-align-center");
        lab.setEnabled(phase.isNewButtonEnabled());
        imNewButt.setDescription(phase.getNewButtonToolTip());
        lab.setDescription(phase.getNewButtonToolTip());

        newButtVL.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

        bottomHLayout.addComponent(newButtVL);
        numButts++;
    }

    // Existing player button
    //-----------------------
    if (phase.isLoginButtonShow()) {
        if (numButts > 0)
            bottomHLayout.addComponent(spacers[numButts] = new Label());

        VerticalLayout rightButtVL = new VerticalLayout();
        rightButtVL.setHeight("50px");
        rightButtVL.setMargin(false);

        if (mockupOnly)
            rightButtVL.addComponent(imRegisteredButt = new NativeButton(null)); // no handler
        else
            rightButtVL.addComponent(imRegisteredButt = new NativeButton(null, this));
        imRegisteredButt.addStyleName("loginbutton");
        imRegisteredButt.setEnabled(phase.isLoginButtonEnabled());

        Mmowgli2UI.getGlobals().mediaLocator().decorateImageButton(imRegisteredButt,
                phase.getLoginButtonIcon());
        rightButtVL.setComponentAlignment(imRegisteredButt, Alignment.MIDDLE_CENTER);

        rightButtVL.addComponent(lab = new Label());
        lab.setHeight("1px");
        rightButtVL.setExpandRatio(lab, 1.0f);

        rightButtVL.addComponent(lab = new HtmlLabel(phase.getLoginButtonSubText()));
        lab.addStyleName("m-text-align-center");
        lab.setEnabled(phase.isLoginButtonEnabled());
        rightButtVL.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

        imRegisteredButt.setDescription(phase.getLoginButtonToolTip());
        lab.setDescription(phase.getLoginButtonToolTip());

        bottomHLayout.addComponent(rightButtVL);
        numButts++;

        checkQuickCACLoginTL();
    }

    // Guest signup button
    //-----------------------
    if (phase.isGuestButtonShow()) {
        if (numButts > 0)
            bottomHLayout.addComponent(spacers[numButts] = new Label());

        VerticalLayout guestButtVL = new VerticalLayout();
        guestButtVL.setHeight("50px");
        guestButtVL.setMargin(false);

        if (mockupOnly)
            guestButtVL.addComponent(guestButt = new NativeButton(null));
        else
            guestButtVL.addComponent(guestButt = new NativeButton(null, this));
        guestButt.addStyleName("guestbutton");
        guestButt.setEnabled(phase.isGuestButtonEnabled());

        Mmowgli2UI.getGlobals().mediaLocator().decorateImageButton(guestButt, phase.getGuestButtonIcon());
        guestButtVL.setComponentAlignment(guestButt, Alignment.MIDDLE_CENTER);

        guestButtVL.addComponent(lab = new Label());
        lab.setHeight("1px");
        guestButtVL.setExpandRatio(lab, 1.0f);

        guestButtVL.addComponent(lab = new HtmlLabel(phase.getGuestButtonSubText()));
        lab.addStyleName("m-text-align-center");
        guestButtVL.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

        guestButt.setDescription(phase.getGuestButtonToolTip());
        lab.setDescription(phase.getGuestButtonToolTip());
        lab.setEnabled(phase.isGuestButtonEnabled());
        bottomHLayout.addComponent(guestButtVL);
        numButts++;
    }

    for (int i = 0; i < numButts; i++)
        if (spacers[i] != null)
            spacers[i].setWidth(BUTTON_SPACING[numButts]);

    bottomHLayout.addComponent(spacer = new Label()); // special spacer
    bottomHLayout.setExpandRatio(spacer, 1.0f);

    baseVLayout.addComponent(bottomHLayout);
    baseVLayout.setComponentAlignment(bottomHLayout, Alignment.TOP_CENTER);

    lab = new HtmlLabel(
            "<center>Each MMOWGLI game is independent.<br>&nbsp;You need a new account for every game.&nbsp;</center>");
    lab.setSizeUndefined();
    lab.addStyleName("m-margintop-20");
    lab.addStyleName("m-greyborder");
    lab.addStyleName("m-background-white");
    lab.addStyleName("m-opacity-75");
    baseVLayout.addComponent(lab);
    baseVLayout.setComponentAlignment(lab, Alignment.MIDDLE_CENTER);

    String troubleUrl = GameLinks.getTL().getTroubleLink();
    Link lnk = new Link("Trouble signing in?", new ExternalResource(troubleUrl));
    baseVLayout.addComponent(lnk);
    lnk.setTargetName(PORTALTARGETWINDOWNAME);
    lnk.setTargetBorder(BorderStyle.DEFAULT);
    lnk.addStyleName("m-margin-top-20");
    baseVLayout.setComponentAlignment(lnk, Alignment.MIDDLE_CENTER);

    //checkUserLimits();  done from app entry point
}