Package com.portal.app.cc
Class PProductAttributesPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIACustomizablePanel
com.portal.app.cc.PProductAttributesPanel
- All Implemented Interfaces:
PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ActionListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
This Class holds the GUI components for the validity period of the products
This class is reused for the Validity Period Panel in Tailormadeplan feature
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PIADefaultChoiceEnumField
protected PIADefaultChoiceEnumField
protected PIADefaultChoiceEnumField
protected PIADefaultChoiceEnumField
protected PIADefaultChoiceEnumField
protected PIADefaultChoiceEnumField
protected long
protected JCheckBox
protected PIACurrencyField
protected PIACustomizablePanel
protected PIAPercentField
protected PIADateField
protected PIACurrencyField
protected PIACustomizablePanel
protected PIADateField
protected PIAIntegerField
protected PIAIntegerField
protected PIAIntegerField
protected PIAIntegerField
protected PIAIntegerField
protected PIAIntegerField
protected JCheckBox
protected PIACurrencyField
protected PIACustomizablePanel
protected PIAPercentField
protected PIADateField
protected PIACurrencyField
protected PIACustomizablePanel
protected PIADateField
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JRadioButton
protected JCheckBox
protected PIACustomizablePanel
protected PIAPercentField
protected PIADateField
protected PIADateField
static final int
static final int
Fields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregList
Fields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImage
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformedprotected boolean
This method returns true if any of the validity period section has modifiedvoid
collects the modified data and updates the model handleprotected static Object[]
decodeDate
(int encodedModeUnitOffset) this method will decode the start_details/end_details to unit and offsetprotected void
disableOrEnableAll
(JPanel wPanel, boolean status) protected void
doCycleDiscountInits
(boolean hasAmount) protected void
doCycleOverrideInits
(boolean override) protected void
doPurchaseDiscountInits
(boolean hasAmount) protected void
doPurchaseOverrideInits
(boolean override) protected void
handleCBoxAction
(Object source) protected void
handleRButtonAction
(Object source) void
initializeDateValues
(PModelHandle pModelHandle) protected void
boolean
Ask for the confirmation before saving if default end dates are not changedboolean
isFirstUsage
(String wFieldName) protected boolean
isInWizardprotected void
void
setAmountFieldsVisible
(boolean b) void
setBackdateData
(boolean flag, Date date) called by PCustomizeProductsPanel to let this panel know that backdate option is selected/deselected and the selected back dateprotected void
void
setCyclePanelEnabled
(boolean b) void
setDealCustomizedFlag
(int dealCustomizeFlag) void
setEnabled
(boolean isEnabled) This overriden method checks the following permissions /customercenter/plans/productdetails/purchase /customercenter/plans/productdetails/cycle /customercenter/plans/productdetails/usage if isEnabled is passed as true and if it is during account maintenance.void
setIsCustomizableDuringDealPurchase
(boolean wIsCustomizableDuringDealPurchase) void
setIsCustomizedProductValidity
(boolean b) void
setMultiMonthPanelEnabled
(boolean b) void
setMultiMonthPanelVisible
(boolean b) protected void
setPurchasePanelEnabled
(boolean b) void
setRateFieldsVisible
(boolean b) void
setUsageEnabled
(boolean b) protected void
updateValidityDatesUI
(boolean status) void
Validates dates.void
Validates Discount and Override Amountsvoid
Validates status.void
Check if the amount fields of 'Purchase','Cycle' sections of 'Product customizations' panel exceeds its respective min-max range.protected int
whichMode
(String wFieldName, PModelHandle wModelHandle) Methods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, collectData, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getControllerClassName, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setModelHandle, setRequired, setResourceName, togglePrimaryToSecondary, unregister, viewDataChange
Methods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcon
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
mCurrentTime
protected long mCurrentTime -
mPurchaseDiscountPanel
-
mRdbPurchaseFU
-
mRdbPurchaseStartRelative
-
mRdbPurchaseEndRelative
-
mIntPurReltveStartCycle
-
mIntPurchaseRelativeEndOffset
-
mCmbPurchaseEndRelativeUnit
-
mCmbPurReltveStartUnit
-
mRdbCycleFU
-
mRdbCycleStartRelative
-
mRdbCycleEndRelative
-
mIntCylReltveStartCycle
-
mIntCycleRelativeEndOffset
-
mCmbCycleEndRelativeUnit
-
mCmbCylReltveStartUnit
-
mRdbUsageFU
-
mRdbUsageStartRelative
-
mRdbUsageEndRelative
-
mIntUsgReltveStartCycle
-
mIntUsageRelativeEndOffset
-
mCmbUsageEndRelativeUnit
-
mCmbUsgReltveStartUnit
-
mPurchaseDiscountAmount
-
mPurchaseDiscountPercent
-
mPurchaseOverridePanel
-
mPurchaseOverrideAmount
-
mPurchaseCBoxNeverCheckBox
-
mPurchaseEndDate
-
mPurchaseStartDate
-
mUsageEndDate
-
mUsageCBoxNeverCheckBox
-
mUsageStartDate
-
mUsageDiscountPercent
-
mUsageDiscountPanel
-
mCycleDiscountAmount
-
mCycleOverrideAmount
-
mCycleEndDate
-
mCycleOverridePanel
-
mCycleDiscountPercent
-
mCycleDiscountPanel
-
mCycleStartDate
-
mCycleCBoxNeverCheckBox
-
VALIDITY_FIRST_USAGE
public static final int VALIDITY_FIRST_USAGE- See Also:
-
VALIDITY_RELATIVE
public static final int VALIDITY_RELATIVE- See Also:
-
-
Constructor Details
-
PProductAttributesPanel
public PProductAttributesPanel()constructs the PProductAttributesPanel
-
-
Method Details
-
resizefields
protected void resizefields() -
doPurchaseDiscountInits
protected void doPurchaseDiscountInits(boolean hasAmount) -
doCycleDiscountInits
protected void doCycleDiscountInits(boolean hasAmount) -
doPurchaseOverrideInits
protected void doPurchaseOverrideInits(boolean override) -
doCycleOverrideInits
protected void doCycleOverrideInits(boolean override) -
setCyclePanelEnabled
public void setCyclePanelEnabled(boolean b) -
setUsageEnabled
public void setUsageEnabled(boolean b) -
setMultiMonthPanelEnabled
public void setMultiMonthPanelEnabled(boolean b) -
actionPerformed
actionPerformed- Specified by:
actionPerformed
in interfaceActionListener
- Parameters:
e
- ActionEvent
-
isInWizard
protected boolean isInWizard()isInWizard- Returns:
- boolean whether the panel is in wizard
-
setCurrentTimeToDateCtrl
-
validateOffsetUnit
Validates status.- Throws:
Exception
- with error message if failed.
-
validateDiscountOverrideAmounts
public void validateDiscountOverrideAmounts()Validates Discount and Override Amounts -
validateDates
Validates dates.- Throws:
Exception
- with error message if failed.
-
isEndDateConfirmed
public boolean isEndDateConfirmed()Ask for the confirmation before saving if default end dates are not changed- Returns:
- true if the falg is off or user selects Yes in the confirmation when the flag is on false if user selects NO in the confirmation when the flag is on
-
setBackdateData
called by PCustomizeProductsPanel to let this panel know that backdate option is selected/deselected and the selected back date- Parameters:
flag
- true if backdate option is selected, false otherwisedate
- selected backdate if backdate option is selected, current date otherwise
-
handleRButtonAction
-
handleCBoxAction
-
initProductPurchaseDetailsObjects
protected void initProductPurchaseDetailsObjects() -
setRateFieldsVisible
public void setRateFieldsVisible(boolean b) -
setAmountFieldsVisible
public void setAmountFieldsVisible(boolean b) -
setPurchasePanelEnabled
protected void setPurchasePanelEnabled(boolean b) -
setMultiMonthPanelVisible
public void setMultiMonthPanelVisible(boolean b) -
getPurchaseStartDateField
-
getCycleStartDateField
-
getUsageStartDateField
-
areDateFieldsDirty
protected boolean areDateFieldsDirty()This method returns true if any of the validity period section has modified- Returns:
- boolean
-
collectDateFieldsData
collects the modified data and updates the model handle- Parameters:
event
- PCollectDataEvent In case of Absolute and Never Ends date, Unit and Offset should be 0. In case of First Usage, Unit should be -1 and Offset should be 0 In case of Relative date, Unit and Offset will be same as the user selection.
-
decodeDate
this method will decode the start_details/end_details to unit and offset- Parameters:
encodedUnitOffset
- Object, encoded relative date- Returns:
- Object[], unit and offset array
-
initializeDateValues
- Throws:
RemoteException
-
updateValidityDatesUI
protected void updateValidityDatesUI(boolean status) -
disableOrEnableAll
-
setIsCustomizedProductValidity
public void setIsCustomizedProductValidity(boolean b) -
setIsCustomizableDuringDealPurchase
public void setIsCustomizableDuringDealPurchase(boolean wIsCustomizableDuringDealPurchase) -
setDealCustomizedFlag
public void setDealCustomizedFlag(int dealCustomizeFlag) -
isFirstUsage
-
whichMode
-
setEnabled
public void setEnabled(boolean isEnabled) This overriden method checks the following permissions /customercenter/plans/productdetails/purchase /customercenter/plans/productdetails/cycle /customercenter/plans/productdetails/usage if isEnabled is passed as true and if it is during account maintenance. Based on the above permissions purchase/usage/cycle sections will be enabled/disabled. If isEnabled is passed as false then the purchase/cycle/usage section's permissions need not be checked and all the sections will be disabled.- Overrides:
setEnabled
in classJComponent
- Parameters:
boolean
- isEnabled pass true to enable the product attributes, If true passed then permissions also will be considered.
-
validateRangeInProductCustomizationsPanel
Check if the amount fields of 'Purchase','Cycle' sections of 'Product customizations' panel exceeds its respective min-max range.- Throws:
Exception
- Value is not in range.
-