List of usage examples for com.google.gwt.user.client.ui Label Label
protected Label(Element element)
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildAccPanel() { accountPanel.clear();//from w w w. ja v a 2s. c o m accountPanel.add(addAccountPanel); accountPanel.add(new Label("filtros conta ano")); accountPanel.add(new Label("operacoes=" + operationList.size() + " negocios=" + operationListTradeCount + " contas=" + operationListAccountCount)); accountPanel.add(accTab); }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildAccTab() { int cols = 6; accTab.resize(operationListAccountCount + 1, cols + 1); accTab.getRowFormatter().addStyleName(0, "tableHeader"); final int COL_VALUE = 4; final int COL_EXPENSE = 5; // Header/*from ww w . jav a2s. c o m*/ accTab.setWidget(0, 0, new Label("Id")); accTab.setWidget(0, 1, new Label("Data")); accTab.setWidget(0, 2, new Label("Conta")); accTab.setWidget(0, 3, new Label("Op.")); accTab.setWidget(0, COL_VALUE, new Label("Valor")); accTab.setWidget(0, COL_EXPENSE, new Label("Remessa")); accTab.setWidget(0, 6, new Label("Excluir")); for (int i = 0, row = operationListAccountCount + 1; i < operationList.size(); ++i) { Operation op = operationList.get(i); if (!((op instanceof Deposit) || (op instanceof Withdraw) || (op instanceof Fee) || (op instanceof Transfer))) continue; --row; // Create edit boxes for Deposit ? EditDepositValueBox editDepositValueBox = null; EditDepositExpenseBox editDepositExpenseBox = null; if (op instanceof Deposit) { Deposit dep = (Deposit) op; editDepositValueBox = new EditDepositValueBox(dep, editDepositBoxHandler); editDepositExpenseBox = new EditDepositExpenseBox(dep, editDepositBoxHandler); } for (int j = 0; j < cols; ++j) { if ((editDepositValueBox != null) && (j == COL_VALUE)) { accTab.setWidget(row, j, editDepositValueBox); continue; } if ((editDepositExpenseBox != null) && (j == COL_EXPENSE)) { accTab.setWidget(row, j, editDepositExpenseBox); continue; } // default: get from operation accTab.setWidget(row, j, op.getCol(j)); } ClickHandler del = new DelOpButtonHandler(); CarrierButton delButton = new CarrierButton("X", del, op); accTab.setWidget(row, cols, delButton); } }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildAddYieldPanel() { addYieldPanel.clear();//from w ww .ja v a 2s. c o m // Create a DateBox Date today = new Date(); addYieldDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat)); addYieldDate.setValue(today); // Create tax year text box with today's year //VerticalPanel addYieldTaxYearPanel = new VerticalPanel(); //addYieldTaxYearPanel.add(new Label("Ano IR")); //addYieldTaxYearPanel.add(addYieldTaxYear); //addYieldTaxYear.setText(DateTimeFormat.getFormat("y").format(today)); VerticalPanel addYieldAssetPanel = new VerticalPanel(); addYieldAssetPanel.add(new Label("Ativo")); addYieldAssetPanel.add(addYieldAsset); VerticalPanel addYieldAmountPanel = new VerticalPanel(); addYieldAmountPanel.add(new Label("Quant.")); addYieldAmountPanel.add(addYieldAmount); VerticalPanel addYieldGrossValuePanel = new VerticalPanel(); addYieldGrossValuePanel.add(new Label("Valor Bruto")); addYieldGrossValuePanel.add(addYieldGrossValue); VerticalPanel addYieldNetValuePanel = new VerticalPanel(); addYieldNetValuePanel.add(new Label("Valor " + Constant.NET_O)); addYieldNetValuePanel.add(addYieldNetValue); buildAddYieldAccountDropBox(); VerticalPanel addYieldAccountPanel = new VerticalPanel(); addYieldAccountPanel.add(new Label("Conta")); addYieldAccountPanel.add(yieldAccountDropBox); addYieldPanel.add(yieldTypeDropBox); addYieldPanel.add(addYieldDate); //addYieldPanel.add(addYieldTaxYearPanel); addYieldPanel.add(addYieldAssetPanel); addYieldPanel.add(addYieldAmountPanel); addYieldPanel.add(addYieldGrossValuePanel); addYieldPanel.add(addYieldNetValuePanel); addYieldPanel.add(addYieldAccountPanel); addYieldPanel.add(addYieldButton); }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildYieldTable() { int cols = 8; yieldTable.resize(operationListYieldCount + 1, cols + 1); yieldTable.getRowFormatter().addStyleName(0, "tableHeader"); // Header/*from w w w . j a v a 2 s . com*/ yieldTable.setWidget(0, 0, new Label("Id")); yieldTable.setWidget(0, 1, new Label("Provento")); yieldTable.setWidget(0, 2, new Label("Data")); //yieldTable.setWidget(0, 3, new Label("Ano IR")); yieldTable.setWidget(0, 3, new Label("Ativo")); yieldTable.setWidget(0, 4, new Label("Quant.")); yieldTable.setWidget(0, 5, new Label("Valor Bruto")); yieldTable.setWidget(0, 6, new Label("Valor " + Constant.NET_O)); yieldTable.setWidget(0, 7, new Label("Conta")); yieldTable.setWidget(0, 8, new Label("Excluir")); for (int i = 0, row = operationListYieldCount + 1; i < operationList.size(); ++i) { Operation op = operationList.get(i); if (!(op instanceof Yield)) continue; --row; for (int j = 0; j < cols; ++j) { yieldTable.setWidget(row, j, op.getCol(j)); } ClickHandler del = new DelOpButtonHandler(); CarrierButton delButton = new CarrierButton("X", del, op); yieldTable.setWidget(row, cols, delButton); } }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildAddSplitPanel() { addSplitPanel.clear();//from w ww . ja v a 2s.com // Create a DateBox Date today = new Date(); addSplitDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat)); addSplitDate.setValue(today); VerticalPanel addSplitAssetPanel = new VerticalPanel(); addSplitAssetPanel.add(new Label("Ativo")); addSplitAssetPanel.add(addSplitAssetSuggest); VerticalPanel addSplitFromPanel = new VerticalPanel(); addSplitFromPanel.add(new Label("De")); addSplitFromPanel.add(addSplitFrom); VerticalPanel addSplitToPanel = new VerticalPanel(); addSplitToPanel.add(new Label("Para")); addSplitToPanel.add(addSplitTo); addSplitPanel.add(addSplitDate); addSplitPanel.add(addSplitAssetPanel); addSplitPanel.add(addSplitFromPanel); addSplitPanel.add(addSplitToPanel); addSplitPanel.add(addSplitButton); }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildSplitGrid() { int cols = 4; splitGrid.resize(operationListSplitCount + 1, cols + 1); splitGrid.getRowFormatter().addStyleName(0, "tableHeader"); // Header/*w ww. j a va 2 s.c o m*/ splitGrid.setWidget(0, 0, new Label("Data")); splitGrid.setWidget(0, 1, new Label("Ativo")); splitGrid.setWidget(0, 2, new Label("De")); splitGrid.setWidget(0, 3, new Label("Para")); splitGrid.setWidget(0, 4, new Label("Excluir")); for (int i = 0, row = operationListSplitCount + 1; i < operationList.size(); ++i) { Operation op = operationList.get(i); if (!(op instanceof Split)) continue; --row; for (int j = 0; j < cols; ++j) { splitGrid.setWidget(row, j, op.getCol(j)); } ClickHandler del = new DelOpButtonHandler(); CarrierButton delButton = new CarrierButton("X", del, op); splitGrid.setWidget(row, cols, delButton); } }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildAddQuotePanel() { addQuotePanel.clear();/*ww w.ja v a2 s . c om*/ // Create a DateBox Date today = new Date(); addQuoteDate.setFormat(new DateBox.DefaultFormat(Preference.dateFormat)); addQuoteDate.setValue(today); buildAddQuoteAssetDropBox(); VerticalPanel addQuoteAssetPanel = new VerticalPanel(); addQuoteAssetPanel.add(new Label("Ativo")); addQuoteAssetPanel.add(quoteAssetDropBox); VerticalPanel addQuoteAmountPanel = new VerticalPanel(); addQuoteAmountPanel.add(new Label("Quant.")); addQuoteAmountPanel.add(addQuoteAmount); VerticalPanel addQuoteValuePanel = new VerticalPanel(); addQuoteValuePanel.add(new Label(Constant.QUOTE)); addQuoteValuePanel.add(addQuoteValue); addQuotePanel.add(addQuoteDate); addQuotePanel.add(addQuoteAssetPanel); addQuotePanel.add(addQuoteAmountPanel); addQuotePanel.add(addQuoteValuePanel); addQuotePanel.add(addQuoteButton); }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildQuoteGrid() { int cols = 5; quoteGrid.resize(quoteTable.size() + 1, cols + 1); quoteGrid.getRowFormatter().addStyleName(0, "tableHeader"); // Header/*from w w w . j a va 2s . c o m*/ quoteGrid.setWidget(0, 0, new Label("Data")); quoteGrid.setWidget(0, 1, new Label("Ativo")); quoteGrid.setWidget(0, 2, new Label("Quant.")); quoteGrid.setWidget(0, 3, new Label(Constant.QUOTE)); quoteGrid.setWidget(0, 4, new Label("Unidade")); quoteGrid.setWidget(0, 5, new Label("Excluir")); int row = quoteTable.size() + 1; for (Object obj : quoteTable.values()) { Quote q = (Quote) obj; --row; for (int j = 0; j < cols; ++j) { quoteGrid.setWidget(row, j, q.getCol(j)); } ClickHandler del = new DelQuoteButtonHandler(); CarrierButton delButton = new CarrierButton("X", del, q); quoteGrid.setWidget(row, cols, delButton); } }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void buildPrefPanel() { updatePrefPanel();/*from w w w. j a v a 2 s . c o m*/ HorizontalPanel prefSellSpreadPanel = new HorizontalPanel(); HorizontalPanel prefBrokerFeePanel = new HorizontalPanel(); HorizontalPanel prefTaxExemptionPanel = new HorizontalPanel(); HorizontalPanel prefTaxFeePanel = new HorizontalPanel(); HorizontalPanel prefDayTradeTaxFeePanel = new HorizontalPanel(); prefSellSpreadPanel.add(new Label("Spread de venda")); prefBrokerFeePanel.add(new Label("Corretagem fixa")); prefTaxExemptionPanel.add(new Label("Limite de isencao")); prefTaxFeePanel.add(new Label("Taxa de IR sobre lucro")); prefDayTradeTaxFeePanel.add(new Label("Taxa de IR sobre lucro day-trade")); prefSellSpreadPanel.add(prefSellSpreadText); prefBrokerFeePanel.add(prefBrokerFeeText); prefTaxExemptionPanel.add(prefTaxExemptionText); prefTaxFeePanel.add(prefTaxFeeText); prefDayTradeTaxFeePanel.add(prefDayTradeTaxFeeText); prefSellSpreadPanel.add(new Label("%")); prefTaxFeePanel.add(new Label("%")); prefDayTradeTaxFeePanel.add(new Label("%")); //prefPanel.add(new Label("Estimativa de Valor Realizavel para Venda de Acoes no Mercado a Vista")); prefPanel.add(prefSellSpreadPanel); prefPanel.add(prefBrokerFeePanel); prefPanel.add(prefTaxExemptionPanel); prefPanel.add(prefTaxFeePanel); prefPanel.add(prefDayTradeTaxFeePanel); }
From source file:carteirainveste.client.DateUtil.java
License:Creative Commons License
void build() { for (int i = 0; i < Asset.assetTypeName.length; ++i) assetTypeDropBox.addItem(Asset.assetTypeName[i]); assetTypeDropBox.setSelectedIndex(addAssetPanelCurrType); assetTypeDropBox.addChangeHandler(assetTypeHandler); for (int i = 0; i < Operation.operationName.length; ++i) operationDropBox.addItem(Operation.operationName[i]); operationDropBox.setSelectedIndex(addAssetPanelCurrTrade); operationDropBox.addChangeHandler(assetTradeHandler); for (int i = 0; i < Operation.accountAction.length; ++i) accountActionDropBox.addItem(Operation.accountAction[i]); accountActionDropBox.addChangeHandler(accountActionHandler); for (int i = 0; i < Yield.yieldTypeName.length; ++i) yieldTypeDropBox.addItem(Yield.yieldTypeName[i]); buildAddAssetPanel();/* w ww. j a v a 2 s . c o m*/ buildTradeFilterPanel(); buildOpTab(); buildOpPanel(); buildPortfolioPanel(); buildAddAccountPanel(); buildAccTab(); buildAccPanel(); buildAddYieldPanel(); buildYieldTable(); buildYieldPanel(); buildAddSplitPanel(); buildSplitGrid(); buildSplitPanel(); buildAddQuotePanel(); buildQuoteGrid(); buildQuotePanel(); buildSummaryPanel(); buildEvolutionPanel(); buildTaxPanel(); buildPrefPanel(); // Build DB panel dbText.setCharacterWidth(60); dbText.setVisibleLines(20); dbText.addChangeHandler(dbTextHandler); dbPanel.add(new Label( "Copie o texto XML abaixo e guarde para salvar os dados. Cole abaixo um texto XML previamente salvo para restaurar os dados.")); dbPanel.add(dbText); dbPanel.add(dbLogConsole); updateXmlDb(); // Create a tab panel //tabPanel.setWidth("400px"); //tabPanel.setAnimationEnabled(true); for (int i = 0; i < mainTabList.length; ++i) tabPanel.add(mainTabList[i].getWidget(), mainTabList[i].getText()); // Assemble Main panel mainPanel.add(tabPanel); }