public class OverridePriceDialog extends TitleAreaDialog
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.widgets.Text | comment_
Multiline input field for price override comment.
|
protected org.eclipse.swt.widgets.Text | negotiatedPrice_
Input field for negotiated price.
|
protected org.eclipse.swt.widgets.Text | negotiatedPriceAmountOffList_
Input field for negotiated price amount off the list price.
|
protected org.eclipse.swt.widgets.Text | negotiatedPricePercentOffList_
Input field for negotiated price percent off the list price.
|
protected org.eclipse.swt.widgets.Combo | reason_
List box for price override reason.
|
Constructor and Description |
---|
OverridePriceDialog() |
Modifier and Type | Method and Description |
---|---|
protected void | buttonPressed(int buttonId) |
protected int | comparePrice(java.lang.String price1, java.lang.String price2)
Compares its two arguments for order.
|
protected java.lang.String | computeAmountDiscountByPercentDiscount(java.lang.String listPrice, java.lang.String percent)
Computes the price by the amount discount off the list price.
|
protected java.lang.String | computeAmountDiscountByPrice(java.lang.String listPrice, java.lang.String price)
Computes the amount discount of the given price off the list price.
|
protected java.lang.String | computePercentDiscountByAmountDiscount(java.lang.String listPrice, java.lang.String amount)
Computes the percentage discount off list price by the amount discount off the list price.
|
protected java.lang.String | computePercentDiscountByPrice(java.lang.String listPrice, java.lang.String price)
Computes the percentage discount of the given price off the list price.
|
protected java.lang.String | computePriceByAmountDiscount(java.lang.String listPrice, java.lang.String amount)
Computes the given price by the amount discount off the list price.
|
protected java.lang.String | computePriceByPercentDiscount(java.lang.String listPrice, java.lang.String percent)
Computes the price by the amount discount off the list price.
|
protected void | configureShell(org.eclipse.swt.widgets.Shell newShell)
Configures the given shell in preparation for opening this window in it.
|
protected void | createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.swt.widgets.Composite | createCommentRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the comment row.
|
protected org.eclipse.swt.widgets.Composite | createContractPriceRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the contract price row.
|
protected org.eclipse.swt.widgets.Control | createDialogArea(org.eclipse.swt.widgets.Composite parent)
Creates and returns the contents of the upper part of the dialog (above the button bar).
|
protected org.eclipse.swt.widgets.Control | createFiller(org.eclipse.swt.widgets.Composite parent)
Adds an empty filler to the given composite.
|
protected org.eclipse.swt.widgets.Composite | createFloorPriceRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the floor price row.
|
protected org.eclipse.swt.widgets.Composite | createHeadings(org.eclipse.swt.widgets.Composite parent)
Creates and returns the column headings row.
|
protected org.eclipse.swt.widgets.Composite | createListPriceRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the list price row.
|
protected org.eclipse.swt.widgets.Composite | createNegotiatedPriceRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the negotiated price row.
|
protected org.eclipse.swt.widgets.Composite | createPriceGroup(org.eclipse.swt.widgets.Composite parent)
Creates and returns a group that contains the content for price override information and fields.
|
protected org.eclipse.swt.widgets.Composite | createReasonCodeRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the reason code row.
|
protected org.eclipse.swt.widgets.Composite | createUnitPriceRow(org.eclipse.swt.widgets.Composite parent)
Creates and returns the unit price row.
|
protected boolean | evaluateOkButton()
Evaluates if the OK button must be enable or disabled.
|
protected java.lang.String | getContractPrice()
Returns the contract price of the item.
|
protected java.lang.String | getCurrency()
Returns the currency used for the product.
|
protected java.lang.String | getFloorPrice()
Returns the floor price of the item.
|
protected java.lang.String | getHelpContextId()
Retrieves the help context ID.
|
protected java.lang.String | getListPrice()
Returns the list price of the item.
|
protected PriceList | getPriceList()
Returns the price list of the product.
|
protected java.lang.String[] | getPriceOverrideReasons()
Returns an array of price override reasons for display.
|
protected Product | getProduct()
Returns the Product whose details are shown in this dialog.
|
java.lang.Object | getResult()
Returns an PriceOverrideBean databean.
|
protected java.lang.String | getUnitPrice()
Returns the current unit price of the item.
|
protected void | populatePriceOverrideReasonsCombo(org.eclipse.swt.widgets.Combo combo)
Prepopulates the price override reasons selection control.
|
protected void | setPriceList(PriceList p)
Sets the current price list of the product.
|
protected void | setProduct(Product p)
Sets the current value of the product.
|
protected void | setResult(java.lang.Object result)
Sets the output as a result of the dialog work.
|
protected org.eclipse.swt.widgets.Text negotiatedPrice_
protected org.eclipse.swt.widgets.Text negotiatedPriceAmountOffList_
protected org.eclipse.swt.widgets.Text negotiatedPricePercentOffList_
protected org.eclipse.swt.widgets.Combo reason_
protected org.eclipse.swt.widgets.Text comment_
protected void buttonPressed(int buttonId)
protected int comparePrice(java.lang.String price1, java.lang.String price2) throws java.lang.NumberFormatException
protected java.lang.String computeAmountDiscountByPrice(java.lang.String listPrice, java.lang.String price)
protected java.lang.String computePercentDiscountByPrice(java.lang.String listPrice, java.lang.String price)
protected java.lang.String computePriceByAmountDiscount(java.lang.String listPrice, java.lang.String amount)
protected java.lang.String computePercentDiscountByAmountDiscount(java.lang.String listPrice, java.lang.String amount)
protected java.lang.String computePriceByPercentDiscount(java.lang.String listPrice, java.lang.String percent)
protected java.lang.String computeAmountDiscountByPercentDiscount(java.lang.String listPrice, java.lang.String percent)
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createCommentRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Control createFiller(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createFloorPriceRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createHeadings(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createListPriceRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createNegotiatedPriceRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createPriceGroup(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createReasonCodeRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createUnitPriceRow(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite createContractPriceRow(org.eclipse.swt.widgets.Composite parent)
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
protected java.lang.String getContractPrice()
protected java.lang.String getListPrice()
protected java.lang.String getUnitPrice()
protected java.lang.String getCurrency()
protected java.lang.String getFloorPrice()
protected java.lang.String getHelpContextId()
protected java.lang.String[] getPriceOverrideReasons()
protected PriceList getPriceList()
protected Product getProduct()
public java.lang.Object getResult()
protected void populatePriceOverrideReasonsCombo(org.eclipse.swt.widgets.Combo combo)
protected void setPriceList(PriceList p)
protected void setProduct(Product p)
protected void setResult(java.lang.Object result)
protected boolean evaluateOkButton()