Example usage for com.google.gwt.user.client.ui Label Label

List of usage examples for com.google.gwt.user.client.ui Label Label

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Label Label.

Prototype

protected Label(Element element) 

Source Link

Document

This constructor may be used by subclasses to explicitly use an existing element.

Usage

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

Widget getCol(int col) {
    switch (col) {
    case 0:/*from   ww w  .  ja va2  s .c om*/
        return new Label(String.valueOf(id));
    case 1:
        return new Label(Preference.dateFormat.format(depDate));
    case 2:
        return new Label(depAccount);
    case 3:
        return new Label(Operation.accountAction[Operation.ACC_DEPOSIT]);
    case 4:
        return new Label(CurrencyUtil.format(depValueCents));
    case 5:
        return new Label(CurrencyUtil.format(depExpenseCents));
    default:
        return new Label("Deposit.getCol error col=" + col);
    }
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

Widget getCol(int col) {
    switch (col) {
    case 0://from   w  w w . ja  v  a  2  s.  com
        return new Label(String.valueOf(id));
    case 1:
        return new Label(Preference.dateFormat.format(wdrawDate));
    case 2:
        return new Label(wdrawAccount);
    case 3:
        return new Label(Operation.accountAction[Operation.ACC_WITHDRAW]);
    case 4:
        return new Label(CurrencyUtil.format(wdrawValueCents));
    case 5:
        return new Label("--");
    default:
        return new Label("Withdraw.getCol error col=" + col);
    }
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

Widget getCol(int col) {
    switch (col) {
    case 0:/*from   w  ww  .j  av  a 2s  .  c o  m*/
        return new Label(String.valueOf(id));
    case 1:
        return new Label(Preference.dateFormat.format(transferDate));
    case 2:
        return new Label(getAccount());
    case 3:
        return new Label(Operation.accountAction[Operation.ACC_TRANSFER]);
    case 4:
        return new Label(CurrencyUtil.format(transferValueCents));
    case 5:
        return new Label("--");
    default:
        return new Label("Transfer.getCol error col=" + col);
    }
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

Widget getCol(int col) {
    switch (col) {
    case 0:/*from  www  . j  a v  a 2  s  .  com*/
        return new Label(String.valueOf(id));
    case 1:
        return new Label(Preference.dateFormat.format(feeDate));
    case 2:
        return new Label(feeAccount);
    case 3:
        return new Label(Operation.accountAction[Operation.ACC_FEE]);
    case 4:
        return new Label(CurrencyUtil.format(feeValueCents));
    case 5:
        return new Label("--");
    default:
        return new Label("Fee.getCol error col=" + col);
    }
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

Carteira() {
    accountList.add("--"); // built-in account NONE

    aboutPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    aboutPanel.add(new Label("Carteira Investe"));
    aboutPanel.add(new Label(Constant.VERSION + ": " + Constant.V_NUMBER));
    aboutPanel.add(new HTML(Constant.LICENSE));

    portfolioEndDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat));
    portfolioEndDate.setValue(new Date());
    portfolioEndDate.addValueChangeHandler(portfolioEndDateHandler);

    summaryEndDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat));
    summaryEndDate.setValue(new Date());
    summaryEndDate.addValueChangeHandler(summaryEndDateHandler);

    evolutionEndDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat));
    evolutionEndDate.setValue(new Date());
    evolutionEndDate.addValueChangeHandler(evolutionEndDateHandler);

    taxEndDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat));
    taxEndDate.setValue(new Date());
    taxEndDate.addValueChangeHandler(taxEndDateHandler);

    tabPanel.addSelectionHandler(mainTabSelectionHandler);

    addYieldAsset.addChangeHandler(assetHandler);
    addAssetName.addChangeHandler(assetHandler);
    addAssetAmount.addChangeHandler(addAssetAmountHandler);
    addAssetGrossValue.addChangeHandler(addAssetGrossValueCurrencyHandler);
    addAssetCost.addChangeHandler(addAssetCostCurrencyHandler);
    addAssetExpense.addChangeHandler(addAssetExpenseCurrencyHandler);
    addAssetRetainedTax.addChangeHandler(addAssetRetainedTaxCurrencyHandler);
    addAccountValue.addChangeHandler(currencyHandler);
    addAccountExpense.addChangeHandler(currencyHandler);
    addYieldGrossValue.addChangeHandler(currencyHandler);
    addYieldNetValue.addChangeHandler(currencyHandler);

    addAssetDtBuyGross.addChangeHandler(addAssetDtBuyGrossCurrencyHandler);
    addAssetDtSellGross.addChangeHandler(addAssetDtSellGrossCurrencyHandler);
    addAssetDtSellNet.addChangeHandler(addAssetDtSellNetCurrencyHandler);

    assetAccountDropBox.setSelectedIndex(addAssetPanelCurrAccountIndex);
    assetAccountDropBox.addChangeHandler(assetAccountHandler);

    tradeFilterYear.addChangeHandler(tradeFilterHandler);
    tradeFilterAssetSuggest.getValueBox().addChangeHandler(tradeFilterHandler);
    tradeFilterAccountSuggest.getValueBox().addChangeHandler(tradeFilterHandler);
    tradeFilterAssetSuggest.addSelectionHandler(tradeFilterHandler);
    tradeFilterAccountSuggest.addSelectionHandler(tradeFilterHandler);

    portfolioHideSoldPositionsCheckBox.setValue(false);
    portfolioHideSoldPositionsCheckBox.addValueChangeHandler(portfolioHideSoldPositionsHandler);

    prefSellSpreadText.addChangeHandler(prefChangeHandler);
    prefBrokerFeeText.addChangeHandler(prefChangeHandler);
    prefTaxExemptionText.addChangeHandler(prefChangeHandler);
    prefTaxFeeText.addChangeHandler(prefChangeHandler);
    prefDayTradeTaxFeeText.addChangeHandler(prefChangeHandler);

    Preference.stockDayTradeAffectExemptionLimit.addValueChangeHandler(dayTradeAffectExemptionHandler);
    Preference.stockExemptGainsReduceCarriedLoss.addValueChangeHandler(exemptGainReduceLossHandler);
    Preference.stockTaxRatioOverPretaxEarnings.addValueChangeHandler(taxRatioOverPretaxHandler);

    Preference.startTaxCarryLoss.addChangeHandler(startTaxCarryLossHandler);
    Preference.startTaxDayTradeCarryLoss.addChangeHandler(startTaxDayTradeCarryLossHandler);

    taxGrid.addStyleName("taxGrid");
    taxYearlySummaryGrid.addStyleName("taxGrid");
    summaryAccountGrid.addStyleName("boxedTable");
    summaryAssetGrid.addStyleName("boxedTable");
    summaryGrid.addStyleName("boxedTable");
    summaryFlowGrid.addStyleName("boxedTable");
    evolutionGrid.addStyleName("boxedTable");

    build();//  w w w .  jav a 2 s  .  c o  m
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

void buildAddAssetPanel() {
    // Create addAssetPanel
    addAssetPanel.clear();/*from   www.j a  va2s . c  o  m*/

    addAssetPanel.add(assetTypeDropBox);
    addAssetPanel.add(operationDropBox);

    // Create a DateBox
    addAssetDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat));
    addAssetDate.setValue(new Date());
    addAssetPanel.add(addAssetDate);

    buildAddAssetAccountDropBox();

    switch (addAssetPanelCurrTrade) {
    case Operation.TRADE_BUY: {
        VerticalPanel namePanel = new VerticalPanel();
        VerticalPanel amountPanel = new VerticalPanel();
        VerticalPanel costPanel = new VerticalPanel();
        VerticalPanel expensePanel = new VerticalPanel();
        VerticalPanel accPanel = new VerticalPanel();
        VerticalPanel avgPricePanel = new VerticalPanel();

        namePanel.add(new Label("Ativo"));
        amountPanel.add(new Label("Quant."));
        costPanel.add(new Label("Custo Bruto"));
        expensePanel.add(new Label("Remessa"));
        accPanel.add(new Label("Conta"));
        avgPricePanel.add(new Label("C." + Constant.AVERAGE_O));

        namePanel.add(addAssetName);
        amountPanel.add(addAssetAmount);
        costPanel.add(addAssetCost);
        expensePanel.add(addAssetExpense);
        accPanel.add(assetAccountDropBox);
        avgPricePanel.add(addAssetAveragePriceLabel);

        addAssetPanel.add(namePanel);
        addAssetPanel.add(amountPanel);
        addAssetPanel.add(costPanel);
        addAssetPanel.add(expensePanel);
        addAssetPanel.add(accPanel);
        addAssetPanel.add(avgPricePanel);
    }
        break;

    case Operation.TRADE_SELL: {
        VerticalPanel namePanel = new VerticalPanel();
        VerticalPanel amountPanel = new VerticalPanel();
        VerticalPanel grossPanel = new VerticalPanel();
        VerticalPanel costPanel = new VerticalPanel();
        VerticalPanel retainedTaxPanel = new VerticalPanel();
        VerticalPanel accPanel = new VerticalPanel();
        VerticalPanel avgPricePanel = new VerticalPanel();

        namePanel.add(new Label("Ativo"));
        amountPanel.add(new Label("Quant."));
        grossPanel.add(new Label("Valor Bruto"));
        costPanel.add(new Label("Receita " + Constant.NET_A));
        retainedTaxPanel.add(new Label("IRRF"));
        accPanel.add(new Label("Conta"));
        avgPricePanel.add(new Label("P." + Constant.AVERAGE_O));

        namePanel.add(addAssetName);
        amountPanel.add(addAssetAmount);
        grossPanel.add(addAssetGrossValue);
        costPanel.add(addAssetCost);
        retainedTaxPanel.add(addAssetRetainedTax);
        accPanel.add(assetAccountDropBox);
        avgPricePanel.add(addAssetAveragePriceLabel);

        addAssetPanel.add(namePanel);
        addAssetPanel.add(amountPanel);
        addAssetPanel.add(grossPanel);
        addAssetPanel.add(costPanel);
        addAssetPanel.add(retainedTaxPanel);
        addAssetPanel.add(accPanel);
        addAssetPanel.add(avgPricePanel);
    }
        break;

    case Operation.TRADE_DAYTRADE: {
        VerticalPanel namePanel = new VerticalPanel();
        VerticalPanel amountPanel = new VerticalPanel();
        VerticalPanel buyGrossPanel = new VerticalPanel();
        VerticalPanel sellGrossPanel = new VerticalPanel();
        VerticalPanel sellNetPanel = new VerticalPanel();
        VerticalPanel retainedTaxPanel = new VerticalPanel();
        VerticalPanel accPanel = new VerticalPanel();
        VerticalPanel netResultPanel = new VerticalPanel();

        namePanel.add(new Label("Ativo"));
        amountPanel.add(new Label("Quant."));
        buyGrossPanel.add(new Label("Compra.Bruta"));
        sellGrossPanel.add(new Label("Venda.Bruta"));
        sellNetPanel.add(new Label("Venda.Liq."));
        retainedTaxPanel.add(new Label("IRRF"));
        accPanel.add(new Label("Conta"));
        netResultPanel.add(new Label("Resultado"));

        namePanel.add(addAssetName);
        amountPanel.add(addAssetAmount);
        buyGrossPanel.add(addAssetDtBuyGross);
        sellGrossPanel.add(addAssetDtSellGross);
        sellNetPanel.add(addAssetDtSellNet);
        retainedTaxPanel.add(addAssetRetainedTax);
        accPanel.add(assetAccountDropBox);
        netResultPanel.add(addAssetDtResultLabel);

        addAssetPanel.add(namePanel);
        addAssetPanel.add(amountPanel);
        addAssetPanel.add(buyGrossPanel);
        addAssetPanel.add(sellGrossPanel);
        addAssetPanel.add(sellNetPanel);
        addAssetPanel.add(retainedTaxPanel);
        addAssetPanel.add(accPanel);
        addAssetPanel.add(netResultPanel);
    }
        break;
    default:
    }

    // Add a normal button
    addAssetPanel.add(addAssetButton);
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

void buildTradeFilterPanel() {
    tradeFilterPanel.clear();//  w  w w  .  ja v  a2  s. co m

    VerticalPanel yearPanel = new VerticalPanel();
    VerticalPanel assetSuggest = new VerticalPanel();
    VerticalPanel accountSuggest = new VerticalPanel();

    yearPanel.add(new Label("Ano"));
    yearPanel.add(tradeFilterYear);
    assetSuggest.add(new Label("Ativo"));
    assetSuggest.add(tradeFilterAssetSuggest);
    accountSuggest.add(new Label("Conta"));
    accountSuggest.add(tradeFilterAccountSuggest);

    tradeFilterPanel.add(new Label("Mostrar somente:"));
    tradeFilterPanel.add(yearPanel);
    tradeFilterPanel.add(assetSuggest);
    tradeFilterPanel.add(accountSuggest);
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

void buildOpPanel() {
    // Create operacao panel
    opPanel.clear();//from  ww w .jav a  2  s .  com

    opPanel.add(addAssetPanel);
    opPanel.add(tradeFilterPanel);
    opPanel.add(new Label("operacoes=" + operationList.size() + " negocios=" + operationListTradeCount
            + " contas=" + operationListAccountCount));
    opPanel.add(opTab);
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

void buildSummaryPanel() {
    HorizontalPanel selectionPanel = new HorizontalPanel();

    summaryPanel.clear();/* w w  w .  ja  va2  s.  c  o  m*/
    summaryEndDatePanel.add(new Label("Data:"));
    summaryEndDatePanel.add(summaryEndDate);

    selectionPanel.add(summaryAccountGrid);
    selectionPanel.add(summaryAssetGrid);

    summaryPanel.add(summaryEndDatePanel);
    summaryPanel.add(summaryUpdateButton);
    summaryPanel.add(selectionPanel);
    summaryPanel.add(summaryGrid);
    summaryPanel.add(summaryFlowGrid);
    summaryPanel.add(summaryLogConsole);
}

From source file:carteirainveste.client.DateUtil.java

License:Creative Commons License

void summaryLog(String msg) {
    summaryLogConsole.add(new Label(msg));
}