Package com.portal.app.comp
Class PIAPhoneTable
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.portal.bas.comp.PIASpreadSheet
com.portal.bas.comp.PIASpecSpreadSheet
com.portal.app.comp.PIAPhoneTable
- All Implemented Interfaces:
PAppComponent
,PAppFieldComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PFieldBean
,PViewDataChangeListener
,ActionListener
,MouseListener
,ImageObserver
,MenuContainer
,Serializable
,Remote
,EventListener
,Accessible
,CellEditorListener
,ListSelectionListener
,RowSorterListener
,TableColumnModelListener
,TableModelListener
,Scrollable
A table that displays phone number information from the Nameinfo array
- Version:
- %version: 18 % %date_modified: Sat Oct 13 17:03:33 2001 %
- Author:
- kapono
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode
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 JButton
protected JButton
protected JDialog
protected JButton
protected JTextField
protected JComboBox
protected boolean
Fields inherited from class com.portal.bas.comp.PIASpreadSheet
boundSupport, dpyFldFmt, mAttribImpl, mDataIsUntyped, mDefaultModel, mImpl, mSelSup, mSpreadSheetListener, mTableModel
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
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
ConstructorsConstructorDescriptionConstructs a 2 column table displaying phone numbers and phone number descriptions (i.e. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem()
Adds a new phone type entry.boolean
Useful if you want to enable/disable the controls that allow the user to add/delete rows.boolean
Useful if you want to enable/disable the controls that allow the user to add/delete rows.void
collectData
(PCollectDataEvent event) CollectDataListener override.void
Deletes all selected itemsRetreives the class name of the controller for this componentboolean
Returns the state of the trackDeletion propertyvoid
Called to modify the data in the selected row.void
removeRow
(int row) Overridden to track the type of phone number that is being deletedvoid
This method resets the modifyDlg to null and clears the contents from the table.void
selectRowWithError
(com.portal.app.util.CustomerValErrorData[] err) Highlights the exact row with error (This will select only the first matching row if there are multiple rows with error)void
set data to the tablevoid
setTrackDeletion
(boolean b) Determines if deletions in the phone table are tracked.void
swapFieldDescriptionIndex
(int index) Establishes the nameinfo array index this phone table editor is being used for.void
Implements the PViewDataChangeListener interfaceMethods inherited from class com.portal.bas.comp.PIASpecSpreadSheet
getCollectChangedCellsOnly, getIdxCurrencyDisplay, getIdxCurrencyDisplay, getIdxDisplayFieldDescription, getIdxDisplayFieldDescription, getIdxModelFieldDescription, getIdxModelFieldDescription, getIgnoreClassName, ignoreRenderingForThisClass, isIgnoringClassConfigured, isUntypedData, resetClassIgnoring, revertToPrimary, setCollectChangedCellsOnly, setData, setIdxCurrencyDisplay, setIdxCurrencyDisplay, setIdxDisplayFieldDescription, setIdxDisplayFieldDescription, setIdxModelFieldDescription, setIdxModelFieldDescription, setUntypedData, togglePrimaryToSecondary
Methods inherited from class com.portal.bas.comp.PIASpreadSheet
actionPerformed, addIASelectionListener, addNotify, addRow, addSpreadSheetListener, clear, convertToVector, createSSDefaultRenderers, editingStopped, editorFromType, export, getAscendingSortIcon, getAscendingSortIconWidth, getAssociatedClass, getColumnIdentifiers, getDescendingSortIcon, getDescendingSortIconWidth, getDisplayFieldDescription, getDisplayFieldFormat, getExportHandler, getExportHandler, getField, getHelpID, getIdxDisplayFieldFormat, getIdxDisplayFieldFormat, getModelFieldDescription, getModelHandle, getModelHandleAt, getModelIndex, getNewRenderer, getRemoteComponent, getResourceName, getRowBackground, getRowPosition, getRowPosition, getSavedSelectedRows, getTools, hideColumn, hideColumn, htmlProcess, initColumnLayout, insertRow, isCurrencyDisplay, isDirty, isError, isHeaderSortingSupported, isInputTracking, isLight, isRequired, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, removeColumn, removeIASelectionListener, removeSpreadSheetListener, resetSortColumn, saveColumnLayout, setAscendingSortIcon, setAssociatedClass, setClean, setColumnData, setColumnEditable, setColumnIdentifiers, setCurrencyDisplay, setData, setDefault, setDefaultEditor, setDefaultRenderer, setDescendingSortIcon, setDisplayFieldDescription, setDisplayFieldFormat, setError, setField, setHeaderSortingSupported, setHelpID, setIdxDisplayFieldFormat, setIdxDisplayFieldFormat, setInputTracking, setLayoutID, setModel, setModelFieldDescription, setRequired, setResourceName, setRowBackground, setRowBackground, setSelectedRows, setupDefaultModel, setValueAt, setValueAt, showColumn, showColumn, sortByColumn, tableChanged, unregister, valueChanged
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, 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, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, imageUpdate, 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
-
trackDeletion
protected boolean trackDeletion -
removedIndexes
-
phoneTypePicker
-
modifyDlg
-
phoneNumberTF
-
okBtn
-
canBtn
-
addBtn
-
-
Constructor Details
-
PIAPhoneTable
public PIAPhoneTable()Constructs a 2 column table displaying phone numbers and phone number descriptions (i.e. home, work, etc.)
-
-
Method Details
-
getControllerClassName
Retreives the class name of the controller for this component- Specified by:
getControllerClassName
in interfacePComponent
- Overrides:
getControllerClassName
in classPIASpecSpreadSheet
- Returns:
- the name of the controller for this component
- Throws:
RemoteException
-
viewDataChange
Implements the PViewDataChangeListener interface- Specified by:
viewDataChange
in interfacePViewDataChangeListener
- Overrides:
viewDataChange
in classPIASpecSpreadSheet
- Parameters:
event
- the data change event- Throws:
RemoteException
- e
-
setTrackDeletion
public void setTrackDeletion(boolean b) Determines if deletions in the phone table are tracked. This is required if you're dealing with pre-existing phone data and you need to delete one of the entries.
The default is false.- Parameters:
b
- The state of the trackDeletion property
-
isTrackDeletion
public boolean isTrackDeletion()Returns the state of the trackDeletion property- Returns:
- the state of the property
-
removeRow
public void removeRow(int row) Overridden to track the type of phone number that is being deleted- Overrides:
removeRow
in classPIASpreadSheet
- Parameters:
row
- The row to remove
-
addItem
public void addItem()Adds a new phone type entry. The entry added is based on the display field format - the first entry in the format that is not already present in the table is added. Duplicate entries are not allowed. -
deleteItem
public void deleteItem()Deletes all selected items -
modifySelectedItem
public void modifySelectedItem()Called to modify the data in the selected row. If no row is selected this method returns immediately. -
canAddItem
public boolean canAddItem()Useful if you want to enable/disable the controls that allow the user to add/delete rows.- Returns:
- true if you can add an additional row, false otherwise
-
canDeleteItem
public boolean canDeleteItem()Useful if you want to enable/disable the controls that allow the user to add/delete rows.- Returns:
- true if items exist for deletion, false otherwise
-
swapFieldDescriptionIndex
public void swapFieldDescriptionIndex(int index) Establishes the nameinfo array index this phone table editor is being used for. Values less than one are ignored.- Parameters:
index
- The PIN_FLD_NAMEINFO array index this data should be stored in.
-
setModelHandle
set data to the table- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIASpreadSheet
- Parameters:
pm
- The new PModelHandle from which information will be extracted.- Throws:
RemoteException
-
collectData
CollectDataListener override. Causes control to save chanes back to data model. Done prior to commiting changes to Portal- Specified by:
collectData
in interfacePCollectDataListener
- Overrides:
collectData
in classPIASpecSpreadSheet
- Parameters:
event
- The collect data event
-
getPhoneList
-
selectRowWithError
public void selectRowWithError(com.portal.app.util.CustomerValErrorData[] err) Highlights the exact row with error (This will select only the first matching row if there are multiple rows with error)- Parameters:
err
- Error data
-
resetToDefault
public void resetToDefault()This method resets the modifyDlg to null and clears the contents from the table.- Specified by:
resetToDefault
in interfacePComponentAttribute
- Overrides:
resetToDefault
in classPIASpreadSheet
-