public class ShippingChargesOverrideDialog extends TitleAreaDialog implements org.eclipse.swt.widgets.Listener, org.eclipse.swt.events.SelectionListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
Constructor and Description |
---|
ShippingChargesOverrideDialog() |
Modifier and Type | Method and Description |
---|---|
protected void | addProposedModifyListeners()
This method instantiates 3 ShippingChargesOverrideDialogModifyListeners.
|
protected void | addProposedVerifyListeners()
This method instantiates 3 ShippingChargesOverrideDialogVerifyListeners.
|
protected boolean | applyPressed()
This method is called when the 'Apply' button is pressed.
|
protected void | buttonPressed(int id)
Handles the 'Apply', 'Cancel', and 'OK' buttons here.
|
void | configureShell(org.eclipse.swt.widgets.Shell newShell)
Configures the given shell with the following style SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE in preparation for opening this window in it.
|
protected boolean | continueToApply()
This method is called by the applyPressed() method and calls the overFloor method.
|
protected void | createActualOriginalRow(org.eclipse.swt.widgets.Composite parent)
Creates the actual original row widgets.
|
protected void | createAmountOffListColumn(org.eclipse.swt.widgets.Composite parent)
Instantiates the amount off list column's Label widget.
|
void | createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
Creates the 'Details', 'Attributes', 'Ok' and 'Cancel' buttons.
|
protected void | createCommentField(org.eclipse.swt.widgets.Composite parent)
Instantiates the comment Label and Text widgets.
|
protected void | createCurrentRow(org.eclipse.swt.widgets.Composite parent)
Creates the current row widgets.
|
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 void | createDiscReasonCombo(org.eclipse.swt.widgets.Composite parent)
Instantiates the discount reason Label and list widgets, and adds listeners.
|
protected void | createFloorRow(org.eclipse.swt.widgets.Composite parent)
Creates the floor row widgets.
|
protected void | createGroup1(org.eclipse.swt.widgets.Composite parent)
Creates the lefthand group that will contain the table and the total.
|
protected void | createGroup2(org.eclipse.swt.widgets.Composite parent)
Creates the righthand group that will contain the details on the shipping charge for the selected shipmode.
|
protected void | createLastTsrField(org.eclipse.swt.widgets.Composite parent)
Instantiates the Label widgets displaying the last CSR to edit the shipping charge.
|
protected void | createOriginalRow(org.eclipse.swt.widgets.Composite parent)
Creates the Original row widgets.
|
protected void | createPercentOffListColumn(org.eclipse.swt.widgets.Composite parent)
Instantiates the percent off list column's Label widget.
|
protected void | createPriceColumn(org.eclipse.swt.widgets.Composite parent)
Instantiates the price column's Label widget.
|
protected void | createProposedAmountOff(org.eclipse.swt.widgets.Composite parent)
Creates the proposed amount off Text widget and adds listeners.
|
protected void | createProposedPercentOff(org.eclipse.swt.widgets.Composite parent)
Instantiates the proposed percent off Text widget and adds listeners.
|
protected void | createProposedPrice(org.eclipse.swt.widgets.Composite parent)
Creates the proposed price Text widget and adds listeners.
|
protected void | createProposedRow(org.eclipse.swt.widgets.Composite parent)
Instantiates the Label widget for the proposed row and calls the methods to create the widgets for the proposed row.
|
org.eclipse.swt.widgets.Control | createSeparator(org.eclipse.swt.widgets.Composite parent)
Adds a separator to the tab pane.
|
protected void | createShippedCharge(org.eclipse.swt.widgets.Composite parent)
Creates the shipped charge label.
|
protected void | createTableViewer(java.util.Vector tableInput)
This method associates a table viewer with the table widget and displays the given data.
|
protected void | createTotal()
Creates the total, which consists of 2 label widgets; the description and the value.
|
RequiredLabelComposite | getActualOriginalLabel()
Returns the actual original prompt label.
|
org.eclipse.swt.widgets.Label | getActualOriginalPrice()
Returns the actual original price label.
|
org.eclipse.swt.widgets.Label | getAmountOffLabel()
Returns the amount off prompt label.
|
org.eclipse.swt.widgets.Button | getApplyButton()
Returns the apply button
|
org.eclipse.swt.widgets.Button | getCancelButton()
Returns the cancel button.
|
org.eclipse.swt.widgets.Text | getComment()
Returns the comment text field.
|
RequiredLabelComposite | getCommentLabel()
Returns the comment prompt label.
|
org.eclipse.swt.widgets.Label | getCurrentAmountOff()
Returns the current amount off label.
|
RequiredLabelComposite | getCurrentLabel()
Returns the current prompt label.
|
org.eclipse.swt.widgets.Label | getCurrentPercentOff()
Returns the current percent off label.
|
org.eclipse.swt.widgets.Label | getCurrentPrice()
Returns the current price label.
|
com.ibm.commerce.telesales.ui.impl.dialogs.shippingchargesoverride.ShipChargeInfo | getCurrentShipChargeInfo()
Returns the currently selected ShipChargeInfo object.
|
protected java.lang.String | getCurrentTotal()
Sums up all of the shipping modes' charges.
|
org.eclipse.swt.widgets.Label | getFloorAmountOff()
Returns the floor amount off label.
|
RequiredLabelComposite | getFloorLabel()
Returns the floor prompt label.
|
org.eclipse.swt.widgets.Label | getFloorPercentOff()
Returns the floor percent off label.
|
org.eclipse.swt.widgets.Label | getFloorPrice()
Returns the floor price label.
|
java.lang.String | getHelpContextId()
Retrieves the help context ID.
|
org.eclipse.swt.widgets.Label | getLastTsrId()
Returns the TSR ID label.
|
RequiredLabelComposite | getLastTSRLabel()
Returns the last TSR prompt label.
|
org.eclipse.swt.widgets.Button | getOkButton()
Returns the OK button.
|
RequiredLabelComposite | getOriginalLabel()
Returns the original prompt label.
|
org.eclipse.swt.widgets.Label | getOriginalPrice()
Returns the original price label.
|
protected java.lang.String[] | getOverrideReasonDescriptions()
Gets the list of override reasons for the current store.
|
org.eclipse.swt.widgets.Label | getPendingItemChargeHeader()
Returns the pending charge header prompt label.
|
org.eclipse.swt.widgets.Label | getPercentOffListLabel()
Returns the percent off list prompt label.
|
org.eclipse.swt.widgets.Label | getPriceEmpty()
Return the price empty label.
|
org.eclipse.swt.widgets.Label | getPriceLabel()
Returns the price prompt label.
|
org.eclipse.swt.widgets.Text | getProposedAmountOff()
Returns the proposed amount off text field.
|
RequiredLabelComposite | getProposedLabel()
Returns the proposed prompt label.
|
org.eclipse.swt.widgets.Text | getProposedPercentOff()
Returns the proposed percent off text field.
|
org.eclipse.swt.widgets.Text | getProposedPrice()
Returns the proposed price text field.
|
org.eclipse.swt.widgets.Combo | getReasonCombo()
Gets the reason combo.
|
RequiredLabelComposite | getReasonLabel()
Returns the reason prompt label.
|
protected org.eclipse.swt.graphics.Color | getRequiredFieldForegroundColor()
Returns the foreground color for required fields' asterisk indicator.
|
java.lang.Object | getResult()
Returns the output as a result of the dialog work.
|
protected SalesContainer | getSales()
Returns the SalesContainer object that this class is using.
|
org.eclipse.swt.widgets.Label | getShippedChargeLabel()
Returns the shipped charge amount prompt label.
|
org.eclipse.swt.widgets.Table | getTable()
Returns the table.
|
org.eclipse.jface.viewers.TableViewer | getTableViewer()
Returns the table viewer.
|
org.eclipse.swt.widgets.Label | getTotalLabel()
Returns the total prompt label.
|
org.eclipse.swt.widgets.Label | getTotalValue()
Returns the total value label.
|
void | handleEvent(org.eclipse.swt.widgets.Event event)
Sent when an event that the receiver has registered for occurs.
|
protected org.eclipse.swt.widgets.Composite | initComposite()
Create the composite as a child of the scroll composite.
|
protected void | initialize()
Initialize the dialog.
|
protected boolean | isValidValue()
Check if the new negotiated value is valid; less than or equal to the original cost
|
protected void | makeTable()
Instantiates the Dialogs table widget.
|
protected void | okPressed() |
protected void | openErrorDialog()
Open an error dialog to let user know that the new negotiated value must be less than or equal to the original cost.
|
protected java.util.Vector | overFloor()
Checks the list of shipping charges to see if any that the current CSR has modified has a percent off that exceeds the floor percent off.
|
protected void | populateGroup1()
Populates the left side of the dialog and adds the table and total to their group widget.
|
protected void | populateGroup2()
Populates the right side of the dialog; adds widgets that will display the shipping charges details for the shipping mode selected in the table.
|
protected void | refreshComment()
Sets the comment text field for the current comment.
|
void | refreshDisplay()
Refresh the dialog display.
|
void | refreshProposedAmountOff()
Refresh the contents of the proposed amount off.
|
void | refreshProposedPercentOff()
Refresh the contents of the proposed percent off.
|
void | refreshProposedPrice()
Refresh the proposed price.
|
protected void | refreshReason()
Sets the reason drop down to the current given reason.
|
void | saveAmountOff()
Save the specified amount off.
|
void | saveCost()
Save the specified cost.
|
void | saveCurrentComment()
Save the specified comment.
|
void | saveCurrentReason()
Save the currently selected reason.
|
void | savePercentOff()
Save the specified percent off.
|
protected void | setScroll(org.eclipse.swt.widgets.Composite composite)
Initialize the scroll composite.
|
protected void | setToolTips()
Sets the tool tips for all the user editable fields (proposed price; proposed amount off; proposed percent off; discount reason; comment).
|
protected void | showSelectedShipChargeInfo(com.ibm.commerce.telesales.ui.impl.dialogs.shippingchargesoverride.ShipChargeInfo selectedShipChargeInfo)
This method is called when there is a new table selection; it refreshes the rest of the dialog to display information about the current selection.
|
protected void | turnListenersOff()
Calls the notifyListeners() method of the 3 text field members of this class with an event that has a Boolean data value set to false.
|
protected void | turnListenersOn()
Calls the notifyListeners() method of the 3 text field members of this class with an event that has a Boolean data value set to true.
|
void | widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent event)
Sent when default selection occurs in the control.
|
void | widgetSelected(org.eclipse.swt.events.SelectionEvent event)
Sent when selection occurs in the control.
|
public static final java.lang.String COPYRIGHT
public void configureShell(org.eclipse.swt.widgets.Shell newShell)
public java.lang.String getHelpContextId()
public org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
protected void buttonPressed(int id)
protected void okPressed()
protected boolean applyPressed()
protected boolean continueToApply()
protected boolean isValidValue()
protected void openErrorDialog()
protected java.util.Vector overFloor()
protected java.lang.String[] getOverrideReasonDescriptions()
protected org.eclipse.swt.widgets.Composite initComposite()
protected void setScroll(org.eclipse.swt.widgets.Composite composite)
protected void populateGroup2()
protected void createShippedCharge(org.eclipse.swt.widgets.Composite parent)
protected void addProposedVerifyListeners()
protected void addProposedModifyListeners()
protected void createCommentField(org.eclipse.swt.widgets.Composite parent)
protected void createPercentOffListColumn(org.eclipse.swt.widgets.Composite parent)
protected void createAmountOffListColumn(org.eclipse.swt.widgets.Composite parent)
protected void createPriceColumn(org.eclipse.swt.widgets.Composite parent)
protected void createLastTsrField(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.graphics.Color getRequiredFieldForegroundColor()
Checks for high contrast mode being enabled.
protected void createDiscReasonCombo(org.eclipse.swt.widgets.Composite parent)
protected void createProposedRow(org.eclipse.swt.widgets.Composite parent)
protected void createProposedPrice(org.eclipse.swt.widgets.Composite parent)
protected void createProposedAmountOff(org.eclipse.swt.widgets.Composite parent)
protected void createProposedPercentOff(org.eclipse.swt.widgets.Composite parent)
protected void createFloorRow(org.eclipse.swt.widgets.Composite parent)
protected void createCurrentRow(org.eclipse.swt.widgets.Composite parent)
protected void createActualOriginalRow(org.eclipse.swt.widgets.Composite parent)
protected void createOriginalRow(org.eclipse.swt.widgets.Composite parent)
protected void createGroup2(org.eclipse.swt.widgets.Composite parent)
protected void createGroup1(org.eclipse.swt.widgets.Composite parent)
public org.eclipse.swt.widgets.Control createSeparator(org.eclipse.swt.widgets.Composite parent)
This method adds a horizontal separator to the pane dividing the shipping charges and button bar.
Subclasses may override.
protected SalesContainer getSales()
protected void populateGroup1()
protected void createTableViewer(java.util.Vector tableInput)
protected void createTotal()
public org.eclipse.swt.widgets.Button getOkButton()
public org.eclipse.swt.widgets.Button getCancelButton()
public org.eclipse.swt.widgets.Button getApplyButton()
public RequiredLabelComposite getLastTSRLabel()
public RequiredLabelComposite getFloorLabel()
public RequiredLabelComposite getProposedLabel()
public RequiredLabelComposite getReasonLabel()
public RequiredLabelComposite getActualOriginalLabel()
public org.eclipse.swt.widgets.Label getShippedChargeLabel()
public org.eclipse.swt.widgets.Label getPendingItemChargeHeader()
public RequiredLabelComposite getOriginalLabel()
public RequiredLabelComposite getCurrentLabel()
public org.eclipse.swt.widgets.Label getActualOriginalPrice()
public org.eclipse.swt.widgets.Label getOriginalPrice()
public org.eclipse.swt.widgets.Label getCurrentPrice()
public org.eclipse.swt.widgets.Label getLastTsrId()
public org.eclipse.swt.widgets.Label getFloorPrice()
public org.eclipse.swt.widgets.Label getCurrentAmountOff()
public org.eclipse.swt.widgets.Label getCurrentPercentOff()
public org.eclipse.swt.widgets.Label getFloorAmountOff()
public org.eclipse.swt.widgets.Label getFloorPercentOff()
public org.eclipse.swt.widgets.Label getAmountOffLabel()
public org.eclipse.swt.widgets.Label getPercentOffListLabel()
public org.eclipse.swt.widgets.Label getPriceEmpty()
public org.eclipse.swt.widgets.Label getPriceLabel()
public RequiredLabelComposite getCommentLabel()
public org.eclipse.swt.widgets.Label getTotalLabel()
public org.eclipse.swt.widgets.Label getTotalValue()
public org.eclipse.swt.widgets.Text getProposedPrice()
public org.eclipse.swt.widgets.Text getProposedAmountOff()
public org.eclipse.swt.widgets.Text getProposedPercentOff()
public org.eclipse.swt.widgets.Text getComment()
public org.eclipse.swt.widgets.Combo getReasonCombo()
public org.eclipse.swt.widgets.Table getTable()
public org.eclipse.jface.viewers.TableViewer getTableViewer()
public com.ibm.commerce.telesales.ui.impl.dialogs.shippingchargesoverride.ShipChargeInfo getCurrentShipChargeInfo()
protected java.lang.String getCurrentTotal()
protected void makeTable()
protected void showSelectedShipChargeInfo(com.ibm.commerce.telesales.ui.impl.dialogs.shippingchargesoverride.ShipChargeInfo selectedShipChargeInfo)
public void refreshDisplay()
public void refreshProposedPrice()
public void refreshProposedAmountOff()
public void refreshProposedPercentOff()
protected void refreshReason()
protected void refreshComment()
protected void setToolTips()
public void saveCurrentComment()
public void saveCurrentReason()
public void saveCost()
public void saveAmountOff()
public void savePercentOff()
public void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
protected void initialize()
public void handleEvent(org.eclipse.swt.widgets.Event event)
public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent event)
public java.lang.Object getResult()
protected void turnListenersOff()
protected void turnListenersOn()