public class PChangeStatusPage extends PMaintenancePage implements ActionListener, ItemListener, DeferralChangeListener, StatusChangeListener, HoldingsChangeListener, ServiceChangeListener
public class ModStatus extends PChangeStatusPage {
public ModStatus() {
PIACustomizablePanel p = new PIACustomizablePanel();
GridBagConstraints gbc = new GridBagConstraints(
0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST,
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
p.setLayout(new GridBagLayout());
p.add(new JButton("AAA"), gbc);
gbc.gridy++;
p.add(new JButton("BBB"), gbc);
gbc.gridy++;
p.add(new JButton("CCC"), gbc);
gbc.gridy++;
p.add(new JButton("DDD"), gbc);
p.add(new JLabel(), new GridBagConstraints(
1, 0, 2, 4, 1.0, 1.0 ,GridBagConstraints.WEST,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
setCustomData(p);
}
| Modifier and Type | Class and Description |
|---|---|
protected class |
PChangeStatusPage.PIAChangeStatusTextAreaField |
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected JButton |
btnServiceSearch |
protected static String |
CHANGE_ACCOUNT |
protected static String |
CHANGE_SERVICE |
static int |
DEFAULT_MOFSERVICE_INDEX |
protected ServiceSearchDialog |
dlgServiceSearch |
protected JLabel |
lblExceedsMsg |
protected static boolean |
load_chng_statuspg_in_prgrs |
protected PIADateField |
mdBackdate |
protected PModelHandle |
mhServicesList |
protected JRadioButton |
mrbBackdate |
protected static int |
STATUS_NO_CHANGE |
protected PModelHandle |
tempServicesMH |
mNeedsRefresh, mPagesCurrentCurrencyisTracking, mIAList, mImpl, unregListIMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImagelistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PChangeStatusPage()
Creates a panel that displays account status
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
void |
addNotify()
Overridden to create a renderer for mofService combobox
|
protected int |
confirmationMsg(String msg,
String title,
int messageType,
int def) |
protected int |
confirmWarningMsg(String msg,
String title)
Display a confirmation dialog containing the specified message, title
and 2 choices for the user (YES or NO).
|
void |
deferralChange(DeferralChangeEvent e)
Called when some other page performs some kind of deferral
|
void |
enteringPage()
This method will be called when the control enters the change status page.
|
protected Object |
formatWarningMessage(String msg) |
String |
getControllerClassName()
Retrieves the class name of this component's controller, in this case, null.
|
protected int |
getCurrentlySetStatusFromPanel()
Retrieves the current state of the status dropdown as an Enumerated
value.
|
String |
getLabel()
Returns the label that should appear in the breadcrumb trail
|
protected PModelHandle |
getSelectedService()
Returns the actual Portal storable class instance currently selected
in the UI.
|
void |
holdingsChange(HoldingsChangeEvent e)
Event listener for table HoldingsChangeEvent.
|
protected boolean |
isBackdDateValid()
Checks if the back date is in the valid format and not null
This method does not check if the back date is in past/future/current.
|
protected boolean |
isDeferredDateValid()
Checks if the Deferred date is in the future; status change is not
allowed if the date is in the past.
|
void |
itemStateChanged(ItemEvent e)
enable/disable date fields depending on radiobutton selection
|
protected void |
mbApply_actionPerformed(ActionEvent e)
Called when the apply button is selected - this method will invoke
the save() method.
|
protected void |
mbReset_actionPerformed(ActionEvent e)
Called when the reset button is selected
|
protected void |
meChangeStatusTo_actionPerformed(ActionEvent e)
Invoked when the widget that manipulates the status is changed by
the user
|
protected void |
preCommit(PModelHandle pm)
Affords subclasses the opportunity to inspect the data that is
about to be committed to Portal.
|
void |
refresh()
This method will be called when "refresh" button is pressed.
|
void |
refreshmhServicesList()
This method refreshes the mhServicesList handle from the selected services.
|
void |
removeNotify() |
void |
resetToDefault()
Removes any changes made to the account and reverts back to the
last read/saved values.
|
void |
save()
There are 3 type of different control flows of changing status
1.
|
void |
serviceChange(ServiceChangeEvent e)
Service change listener.
|
protected void |
setCustomData(PIACustomizablePanel p)
Allows a subclass to embed additional fields in the upper right
region of this page.
|
protected void |
setModelFieldDescription(String changeType) |
void |
setModelHandle(PModelHandle data)
Establishes the
PModelHandle for this component
and all its descendants. |
void |
setSelectedModel(PModelHandle mh)
Sets the selected service in the
ComboBox by
specifying the PModelHandle in the list. |
protected void |
setServiceLifeCycleData(PModelHandle serv)
This method sets the data on this page for the service is SLM enabled.
|
void |
statusChange(StatusChangeEvent e)
Called when some other page changes the status of an account/service
|
void |
unregister()
Used to disconnect the controller from the component for all
child widgets contained within this panel.
|
dataNeedsRefresh, getDisplayedCurrency, hasUnsavedChanges, isValidContext, primaryToSecondary, recycle, resetUnsavedChanges, revertToPrimaryclear, collectData, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setRequired, setResourceName, togglePrimaryToSecondary, viewDataChangegetBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcongetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, validateTreeaction, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static final int STATUS_NO_CHANGE
protected static final String CHANGE_ACCOUNT
protected static final String CHANGE_SERVICE
protected static boolean load_chng_statuspg_in_prgrs
public static final int DEFAULT_MOFSERVICE_INDEX
protected PModelHandle mhServicesList
protected PModelHandle tempServicesMH
protected PIADateField mdBackdate
protected JRadioButton mrbBackdate
protected JButton btnServiceSearch
protected JLabel lblExceedsMsg
protected ServiceSearchDialog dlgServiceSearch
public PChangeStatusPage()
public void enteringPage()
enteringPage in interface PCCPageenteringPage in class PMaintenancePagepublic void refresh()
refresh in interface PAccountViewPagerefresh in class PMaintenancePagepublic void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentpublic void setModelHandle(PModelHandle data) throws RemoteException
PIACustomizablePanelPModelHandle for this component
and all its descendants.setModelHandle in interface PComponentsetModelHandle in class PIACustomizablePaneldata - the new PModelHandle
from which to extract informationRemoteException - thrown for errorspublic void refreshmhServicesList()
public void setSelectedModel(PModelHandle mh)
ComboBox by
specifying the PModelHandle in the list.
If mh is in the list, the list displays with
mh selected.mh - the list PModelHandle to selectpublic String getLabel()
getLabel in interface PCCPagegetLabel in class PMaintenancePagepublic void save()
throws PSaveException
save in interface PAccountViewPagesave in class PMaintenancePagePSaveExceptionpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerprotected void setServiceLifeCycleData(PModelHandle serv)
serv - public void statusChange(StatusChangeEvent e)
statusChange in interface StatusChangeListenere - a StatusChangeEvent encapsulating the event informationpublic void deferralChange(DeferralChangeEvent e)
deferralChange in interface DeferralChangeListenere - a DeferralChangeEvent encapsulating the event informationpublic void holdingsChange(HoldingsChangeEvent e)
holdingsChange in interface HoldingsChangeListenere - a HoldingsChangeEvent encapsulating the event informationpublic void unregister()
throws RemoteException
PIACustomizablePanelunregister in interface PClientComponentunregister in class PIACustomizablePanelRemoteExceptionpublic String getControllerClassName() throws RemoteException
PIACustomizablePanelgetControllerClassName in interface PComponentgetControllerClassName in class PIACustomizablePanelString.RemoteException - thrown for errorspublic void resetToDefault()
resetToDefault in interface PComponentAttributeresetToDefault in class PIACustomizablePanelprotected void setModelFieldDescription(String changeType)
protected int confirmWarningMsg(String msg, String title)
msg - The confirmation message to displaytitle - The title of the confirmation dialogmessageType - an integer designating the kind of message this is,
primarily used to determine the icon from the
pluggable
Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEint - The default button. Use JOptionPane.YES_OPTION or
JOptionPane.NO_OPTIONprotected void setCustomData(PIACustomizablePanel p)
p - The custom panel to displayprotected void preCommit(PModelHandle pm) throws PSaveException
Because this particular pages deals with both services and accounts there is some slight data modification that occurs further upstream. If the FldPoid is the account then this data is fine. If it is a service object however it must be changed to FldServiceObj in the input FList and the account POID must be added in as the FldPoid argument. This processing occurs in the controller. If you wish to halt the save process for any reason throw a PSaveException. It is the subclass' responsibility to display an error dialog in this case.
PSaveExceptionprotected PModelHandle getSelectedService()
protected void mbReset_actionPerformed(ActionEvent e)
protected void mbApply_actionPerformed(ActionEvent e)
protected int getCurrentlySetStatusFromPanel()
protected void meChangeStatusTo_actionPerformed(ActionEvent e)
protected boolean isDeferredDateValid()
protected boolean isBackdDateValid()
public void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListenerpublic void serviceChange(ServiceChangeEvent e)
serviceChange in interface ServiceChangeListenere - a ServiceChangeEvent encapsulating the event informationCopyright © 2003, 2023, Oracle and/or its affiliates.