public class PricingItemsPanel
extends com.google.gwt.user.client.ui.Composite
PricingItem.getItemType().| Modifier and Type | Class and Description |
|---|---|
static class |
PricingItemsPanel.Context |
| Constructor and Description |
|---|
PricingItemsPanel(AppEventBus eventBus,
PricingItemsPanel.Context context) |
| Modifier and Type | Method and Description |
|---|---|
List<PricingItem> |
bind()
Binds all pricing items with the values from UI and returns its instances as list.
|
void |
changeVatInTree(VatRate rate)
Changes the specified VAT for entire pricing tree recursively.
|
void |
fill(List<PricingItem> items)
Updates pricing item tree and row items.
|
List<PricingItem> |
fill(Product product,
TreeItemWithModel parentItem)
Adds and populates a row and tree item.
|
static String |
formatPrice(String currency,
Double number) |
void |
handleAdd(com.google.gwt.event.dom.client.ClickEvent event) |
void |
reset() |
void |
setCurrency(String currency)
Sets the currency for entire pricing tree recursively.
|
void |
setReadOnly(boolean readOnly)
If
true sets all editable fields read only. |
void |
update(Pricing pricing) |
static void |
updatePricing(Double priceExclVat,
Double vatBase,
Double finalPrice,
Double amountToPay,
List<PricingItem> items,
gwt.material.design.client.ui.MaterialTextBox priceExclVatBox,
gwt.material.design.client.ui.MaterialTextBox vatBaseBox,
gwt.material.design.client.ui.MaterialTextBox priceInclVatBox,
gwt.material.design.client.ui.MaterialTextBox toPayBox)
The price properties formatting.
|
static void |
updatePricing(Double priceExclVat,
Double vatBase,
Double finalPrice,
List<PricingItem> items,
gwt.material.design.client.ui.MaterialTextBox priceExclVatBox,
gwt.material.design.client.ui.MaterialTextBox vatBaseBox,
gwt.material.design.client.ui.MaterialTextBox priceInclVatBox)
The price properties formatting.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString@Inject public PricingItemsPanel(AppEventBus eventBus, PricingItemsPanel.Context context)
public static void updatePricing(@Nullable Double priceExclVat, @Nullable Double vatBase, @Nullable Double finalPrice, @Nullable List<PricingItem> items, @Nonnull gwt.material.design.client.ui.MaterialTextBox priceExclVatBox, @Nonnull gwt.material.design.client.ui.MaterialTextBox vatBaseBox, @Nonnull gwt.material.design.client.ui.MaterialTextBox priceInclVatBox)
priceExclVat - the price excluding VATvatBase - the VAT basefinalPrice - the final price including VATitems - the pricing itemspriceExclVatBox - the text box of the price excluding VATvatBaseBox - the input text of the base VATpriceInclVatBox - the text box of price final pricepublic static void updatePricing(@Nullable Double priceExclVat, @Nullable Double vatBase, @Nullable Double finalPrice, @Nullable Double amountToPay, @Nullable List<PricingItem> items, @Nonnull gwt.material.design.client.ui.MaterialTextBox priceExclVatBox, @Nonnull gwt.material.design.client.ui.MaterialTextBox vatBaseBox, @Nonnull gwt.material.design.client.ui.MaterialTextBox priceInclVatBox, @Nullable gwt.material.design.client.ui.MaterialTextBox toPayBox)
priceExclVat - the price excluding VATvatBase - the VAT basefinalPrice - the final price including VATamountToPay - the total amount to be paiditems - the pricing itemspriceExclVatBox - the text box of the price excluding VATvatBaseBox - the input text of the base VATpriceInclVatBox - the text box of price final pricetoPayBox - the text box of total amount to be paidpublic void setReadOnly(boolean readOnly)
true sets all editable fields read only.
If false sets all fields previously editable back to be editable.public void reset()
public List<PricingItem> bind()
public List<PricingItem> fill(@Nonnull Product product, @Nullable TreeItemWithModel parentItem)
product - the product as a source of pricing itemparentItem - the empty tree item as a parent item to be populated from given productpublic void changeVatInTree(@Nonnull VatRate rate)
rate - the vat rate to be setpublic void setCurrency(@Nonnull String currency)
currency - the target currencypublic void fill(@Nullable List<PricingItem> items)
items - the pricing items@UiHandler(value="btnAdd") public void handleAdd(com.google.gwt.event.dom.client.ClickEvent event)
Copyright © 2020. All rights reserved.