public class PIASpreadSheet extends JTable implements PAppFieldComponent, MouseListener, ActionListener, ListSelectionListener, PComponentAttribute, Serializable
setIdxDisplayFieldFormat()
method. This means less work/code for the developer since they don't have
to implement their own renderers just to control the way the data is
displayed. Note that this spreadsheet contains an internal TableModel
so you should not have to explicitely set one. Besides, data will
typically be filled in automatically from the database via a call to
setModelHandle()
See the PTableCellEditor class for the set of default editors.JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintModeJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected PropertyChangeSupport |
boundSupport |
protected Vector<com.portal.app.util.CellVal> |
dpyFldFmt |
protected PComponentAttributeImpl |
mAttribImpl |
protected boolean |
mDataIsUntyped |
protected DefaultTableModel |
mDefaultModel |
protected PFieldDelegate |
mImpl |
protected PIASelectionSupport |
mSelSup |
protected Vector<PSpreadSheetListener> |
mSpreadSheetListener |
protected com.portal.bas.comp.PSpreadSheetModel |
mTableModel |
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, tableHeaderlistenerList, 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 |
|---|
PIASpreadSheet()
Creates a new Portal-aware spread sheet component.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
void |
addIASelectionListener(PIASelectionListener l)
Notify the given listener when the table row selection changes
|
void |
addNotify()
Overridden to add keyboard action listeners for the Enter & Space
keys.
|
void |
addRow(Vector data)
Used to append a row of data to the display.
|
void |
addSpreadSheetListener(PSpreadSheetListener l)
Notify the given listener when the user performs a gesture
|
void |
clear()
Removes all data from this table (and its model)
|
protected Vector |
convertToVector(Object[][] data)
Takes the given array and converts it to a Vector of Vectors
|
protected void |
createSSDefaultRenderers() |
void |
editingStopped(ChangeEvent e)
Invoked when editing is finished.
|
protected PTableCellEditor |
editorFromType(Class c)
An internal method used to determine the appropriate editor for the
given Class type
|
void |
export(BufferedWriter bw,
String caption)
Exports the table's data, as displayed on the screen, to the
given FileOutputStream as HTML data.
|
Icon |
getAscendingSortIcon()
Returns the icon used for to indicate ascending sort.
|
int |
getAscendingSortIconWidth()
Returns the width for the ascending sort icon.
|
String |
getAssociatedClass()
Gets the associated class, if any, for this field.
|
String[] |
getColumnIdentifiers()
Retrieves the column names from the column model
|
String |
getControllerClassName()
Retrieves the class name of this component's controller
|
Icon |
getDescendingSortIcon()
Returns the icon used for to indicate descending sort.
|
int |
getDescendingSortIconWidth()
Returns the width for the descending sort icon.
|
String |
getDisplayFieldDescription()
Get the data field description used by the component
|
String |
getDisplayFieldFormat()
Gets the display field format used by this component
|
ActionListener |
getExportHandler(String caption)
Retrieves an action listener that can be used to support an
"export" command for this table.
|
ActionListener |
getExportHandler(String caption,
ExportTemplate h)
Retrieves an action listener that can be used to support an
"export" command for this table.
|
Object |
getField()
Gets the value of the field referred to in the
displayFieldDescription. |
String |
getHelpID()
Get the current help id for this component
|
String[] |
getIdxDisplayFieldFormat()
Retrieves the MessageFormat-compliant format pattern that should
be used when rendering data in the table columns
|
String |
getIdxDisplayFieldFormat(int col)
Retrieves the MessageFormat-compliant format pattern that should
be used when rendering data in the given column
|
String |
getModelFieldDescription()
Get the data field description used by the component
|
PModelHandle |
getModelHandle()
Retrieves the PModelHandle for this component
|
PModelHandle |
getModelHandleAt(int row)
Retrieves the PModelHandle for a given row in this component
|
int |
getModelIndex(int row)
Returns the table model index based upon the row index.
|
protected PFieldComponentRenderer |
getNewRenderer(String pattern)
Returns the new instance of PFieldComponentRenderer.
|
Remote |
getRemoteComponent()
Get a reference to the remote component for this object.
|
String |
getResourceName()
Get the base resource name used in resource lookup.
|
Color |
getRowBackground() |
Point |
getRowPosition(int row)
Gets the screen position of the given row (at column 0).
|
Point |
getRowPosition(int row,
int col)
Gets the screen position of the given row (at column 0).
|
int[] |
getSavedSelectedRows()
Returns the saved selected rows.
|
Vector |
getTools()
Get a list of Actions supported by this component.
|
void |
hideColumn(int modelIndex)
Hides the specified column of data from the spreadsheet
|
void |
hideColumn(int modelIndex,
boolean saveToPref)
Hides the specified column of data from the spreadsheet and
stores in user prefrances so that it is hidden for next use also for the same user
|
protected String |
htmlProcess(String s) |
void |
initColumnLayout()
Initialize layout of the column order and width based on saved
preferences.
|
void |
insertRow(int row,
Vector data)
Inserts a row of data to the table at the specified position regardless
of the sort order.
|
boolean |
isCurrencyDisplay()
Determines if the component is displaying currency data.
|
boolean |
isDirty()
Determines if this component is currently in a DIRTY state.
|
boolean |
isError()
Used to determine if this component is currently in error state
|
boolean |
isHeaderSortingSupported()
Determines if this component allows data sorting by clicking on
a column header.
|
boolean |
isInputTracking()
Determines if input tracking is enabled.
|
boolean |
isLight()
Determines if this is component defers PModelHandle knowledge to
its parent container.
|
boolean |
isRequired()
Determines if this component is required in its current context.
|
boolean |
isUntypedData()
Determines if this table supports typed or untyped data
|
void |
mouseClicked(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
removeColumn(int col)
Deletes the specified column of data from the spreadsheet
|
void |
removeIASelectionListener(PIASelectionListener l)
Don't notify the given listener when the table row selection changes
|
void |
removeRow(int row)
Deletes the specified row of data from the spreadsheet
|
void |
removeSpreadSheetListener(PSpreadSheetListener l)
Remove the given listener from the notification list when the user
performs a gesture
|
void |
resetSortColumn(int col)
Resets the sort state for the specified column.
|
void |
resetToDefault()
Resets the component value to the original value (that which was
established by calling
setDefault()). |
void |
revertToPrimary(int primary)
Causes the widget to display its data in the primary currency
|
void |
saveColumnLayout()
Saves the column layout order and width to properties object mColProps.
|
void |
setAscendingSortIcon(Icon icon)
Sets the icon used for to indicate ascending sort.
|
void |
setAssociatedClass(String name)
Sets the associated class, if any, for this field.
|
void |
setClean()
Used to reset the component to the 'clean' state.
|
void |
setColumnData(int column,
Vector data)
Used to specify the data that should be displayed in the given column.
|
void |
setColumnEditable(int col,
boolean editable)
Determines if the end-user can click to edit data in the given
column.
|
void |
setColumnIdentifiers(String[] names)
Establishes the header names for the table columns
|
void |
setCurrencyDisplay(boolean b)
Used to determine if this component is displaying currency data.
|
void |
setData(Object[][] data)
Replaces the current data displayed in the spreadsheet with the
given data.
|
void |
setData(Vector data)
Replaces the current data displayed in the spreadsheet with the
given data.
|
void |
setDefault()
Establishes the current value (or element count, depending on the
given component) as the default value.
|
void |
setDefaultEditor(int col,
TableCellEditor editor)
Specifies the editor which should be used for the given column
Note that this editor takes precedence over the editor set by specifying the Class type. |
void |
setDefaultRenderer(int col,
TableCellRenderer renderer)
Specifies the renderer which should be used for the given column
Note that this renderer takes precedence over the renderer set by specifying the Class type. |
void |
setDescendingSortIcon(Icon icon)
Sets the icon used for to indicate descending sort.
|
void |
setDisplayFieldDescription(String fieldDisp)
Set the description of the field(s) in the data model that
this component will display.
|
void |
setDisplayFieldFormat(String fieldForm)
Sets the java.text.MessageFormat-type format used to display data in
this component.
|
void |
setError(boolean b)
At this time, the entire table is marked.
|
void |
setField(Object field)
Sets the value of the field referred to in the
modelFieldDescription. |
void |
setHeaderSortingSupported(boolean b)
Determines if this component allows data sorting by clicking on
a column header.
|
void |
setHelpID(String id)
Set the help id for this component.
|
void |
setIdxDisplayFieldFormat(int col,
String pattern)
Specifies the MessageFormat-compliant format pattern that should
be used when rendering data in the given column.
|
void |
setIdxDisplayFieldFormat(String[] pattern)
Specifies the MessageFormat-compliant format pattern that should
be used when rendering data in the table columns.
|
void |
setInputTracking(boolean b)
If input tracking is turned on, any changes made by the user to the
component will be tracked and the component will be marked "dirty".
|
void |
setLayoutID(String id)
Specifies the unique id of this table when storing preferences.
|
void |
setModel(TableModel newModel)
Establish new data for the table.
|
void |
setModelFieldDescription(String fieldDesc)
Set the description of the field in the data model that this
component is interested in.
|
void |
setModelHandle(PModelHandle data)
Establishes the PModelHandle for this component
|
void |
setRequired(boolean b)
Marks this component as required in its current context.
|
void |
setResourceName(String name)
Set the base resource name used in resource lookup.
|
void |
setRowBackground(Color c)
Specifies the background color for the rows in this component
|
void |
setRowBackground(Color c1,
Color c2)
Specifies the alternating row color scheme for the component
|
void |
setSelectedRows(int[] selection)
Convenience method that sets several selected rows.
|
void |
setUntypedData(boolean b)
Use this API to inform the table that the PModelHandle data it will
receive from BAS will contain UNTYPED data (hand-generated FLists).
|
protected void |
setupDefaultModel() |
void |
setValueAt(Object value,
int row,
int column)
Override that maintains the selected rows in case the table is sorted and
the view position of rows changes as a result of this call.
|
void |
setValueAt(Object value,
int row,
int column,
boolean dirtyTable)
Override that maintains the selected rows in case the table is sorted and
the view position of rows changes as a result of this call.
|
void |
showColumn(int modelIndex)
Shows the specified column of data in the spreadsheet
|
void |
showColumn(int modelIndex,
boolean saveToPref)
Shows the specified column of data in the spreadsheet and
stores in user prefrances so that it is displayed for next use also for the same user
|
void |
sortByColumn(int column,
boolean ascending)
Causes the table to be sorted according to the specified column.
|
void |
tableChanged(TableModelEvent e)
Listener for tableChanged events
|
Object |
togglePrimaryToSecondary(int primary,
int secondary)
Causes the widget to convert its data using the BEIDManager.
|
void |
unregister()
Used to disassociate this component from its delegate (controller)
|
void |
valueChanged(ListSelectionEvent e)
Implements the ListSelectionListener interface.
|
void |
viewDataChange(PViewDataChangeEvent event)
Implements the PViewDataChangeListener interface
|
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, 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, 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, updateadd, 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, 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, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected boolean mDataIsUntyped
protected Vector<com.portal.app.util.CellVal> dpyFldFmt
protected PropertyChangeSupport boundSupport
protected com.portal.bas.comp.PSpreadSheetModel mTableModel
protected DefaultTableModel mDefaultModel
protected transient PFieldDelegate mImpl
protected transient PComponentAttributeImpl mAttribImpl
protected transient PIASelectionSupport mSelSup
protected Vector<PSpreadSheetListener> mSpreadSheetListener
public PIASpreadSheet()
public void addNotify()
addNotify in class JTablePSpreadSheetEventpublic void unregister()
throws RemoteException
unregister in interface PClientComponentRemoteExceptionpublic void setModelHandle(PModelHandle data) throws RemoteException
setModelHandle in interface PComponentdata - The new PModelHandle from which information will be
extracted.RemoteExceptionpublic PModelHandle getModelHandle() throws RemoteException
getModelHandle in interface PComponentRemoteExceptionpublic PModelHandle getModelHandleAt(int row) throws RemoteException
RemoteExceptionpublic void setUntypedData(boolean b)
b - If true, informs the table its data should be considered UNTYPED
This is false by defaultpublic boolean isUntypedData()
public boolean isLight()
throws RemoteException
setModelHandle() will not be called.isLight in interface PComponentRemoteExceptionpublic String getControllerClassName() throws RemoteException
getControllerClassName in interface PComponentRemoteExceptionpublic Vector getTools()
getTools in interface PClientComponentpublic void setResourceName(String name)
setResourceName in interface PClientComponentname - The new base resource name.public String getResourceName()
getResourceName in interface PClientComponentRemoteExceptionpublic Remote getRemoteComponent()
getRemoteComponent in interface PAppComponentpublic void setModelFieldDescription(String fieldDesc) throws RemoteException
setModelFieldDescription in interface PFieldBeanfieldDesc - A String describing the field used by this component.RemoteExceptionpublic String getModelFieldDescription() throws RemoteException
getModelFieldDescription in interface PFieldBeanRemoteExceptionpublic void setDisplayFieldDescription(String fieldDisp) throws RemoteException
setDisplayFieldDescription in interface PFieldBeanfieldDesc - A String describing the field displayed by this
component.RemoteExceptionpublic String getDisplayFieldDescription() throws RemoteException
getDisplayFieldDescription in interface PFieldBeanRemoteExceptionpublic void setDisplayFieldFormat(String fieldForm) throws RemoteException
setIdxDisplayFieldFormat()
which allows format specifications on a per/column basis.setDisplayFieldFormat in interface PAppFieldComponentfieldForm - the format used when displaying the dataRemoteExceptionpublic String getDisplayFieldFormat() throws RemoteException
getDisplayFieldFormat in interface PAppFieldComponentRemoteExceptionpublic void setAssociatedClass(String name) throws RemoteException
PFieldBeansetAssociatedClass in interface PFieldBeanname - the class nameRemoteException - thrown for errorspublic String getAssociatedClass() throws RemoteException
PFieldBeangetAssociatedClass in interface PFieldBeanRemoteException - thrown for errorspublic void setField(Object field) throws RemoteException
PFieldBeanmodelFieldDescription.setField in interface PFieldBeanfield - the field's valueRemoteException - thrown for errorspublic Object getField() throws RemoteException
PFieldBeandisplayFieldDescription.getField in interface PFieldBeanRemoteException - thrown for errorspublic void setHelpID(String id)
setHelpID in interface PAppFieldComponentid - The new help id.public String getHelpID()
getHelpID in interface PAppFieldComponentpublic void resetToDefault()
setDefault()). If no default
value exists, the component data will be cleared.resetToDefault in interface PComponentAttributepublic void clear()
clear in interface PComponentAttributepublic boolean isRequired()
isRequired in interface PComponentAttributepublic void setRequired(boolean b)
setRequired in interface PComponentAttributeb - the required flagpublic void setError(boolean b)
setError in interface PComponentAttributeb - the new state of the Error attributepublic boolean isError()
isError in interface PComponentAttributepublic void setInputTracking(boolean b)
setInputTracking in interface PComponentAttributeb - the state of the inputTracking propertypublic boolean isInputTracking()
PComponentAttributeisInputTracking in interface PComponentAttributepublic void setClean()
setClean in interface PComponentAttributepublic boolean isDirty()
PComponentAttributeisDirty in interface PComponentAttributepublic void setDefault()
setDefault in interface PComponentAttributepublic boolean isCurrencyDisplay()
isCurrencyDisplay in interface PComponentAttributepublic void setCurrencyDisplay(boolean b)
setCurrencyDisplay in interface PComponentAttributeb - If true, indicates the widget is displaying currency data.public Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
togglePrimaryToSecondary in interface PComponentAttributetogglePrimaryToSecondary in interface PFieldBeanprimary - secondary - RemoteExceptionpublic void revertToPrimary(int primary)
throws RemoteException
revertToPrimary in interface PComponentAttributerevertToPrimary in interface PFieldBeanprimary - The primary currency ID for an accountRemoteExceptionpublic void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenertableChanged in class JTablethe - change eventpublic void setModel(TableModel newModel)
public void editingStopped(ChangeEvent e)
editingStopped in interface CellEditorListenereditingStopped in class JTableCellEditorListenerpublic void setHeaderSortingSupported(boolean b)
b - If true, sorting will be allowed.public void sortByColumn(int column,
boolean ascending)
column - the view index of the columnascending - if true, the sort will be in ascending orderpublic boolean isHeaderSortingSupported()
public Point getRowPosition(int row)
row - The row whose position you wish to retrievepublic Point getRowPosition(int row, int col)
row - The row whose position you wish to retrievecol - The col whose position you wish to retrievepublic void setSelectedRows(int[] selection)
an - array of ints containing the indices of rows to
be selected.public void setRowBackground(Color c)
c - The (unselected) row background colorpublic Color getRowBackground()
public void setRowBackground(Color c1, Color c2)
c1 - The (unselected) row background color for odd rowsc2 - The (unselected) row background color for even rowspublic void setColumnIdentifiers(String[] names)
names - The array of table column header namespublic String[] getColumnIdentifiers()
public void setColumnEditable(int col,
boolean editable)
col - The column whose editability is being changed.editable - The flag which determines if the column is editablepublic void setDefaultEditor(int col,
TableCellEditor editor)
col - the spreadsheet column for which this editor should be usededitor - the editor component for this columnpublic void setDefaultRenderer(int col,
TableCellRenderer renderer)
col - the spreadsheet column for which this renderer should be usedrenderer - the renderer component for this columnpublic void setData(Vector data)
data - The new data to displaypublic void setData(Object[][] data)
data - The new data to displaypublic void setColumnData(int column,
Vector data)
column - The column number which should contain the associated datadata - The data that should be displayed in the given columnpublic void removeColumn(int col)
col - the column index to deletepublic void resetSortColumn(int col)
col - the sort column index to resetpublic void hideColumn(int modelIndex)
modelIndex - the column index to hidehideColumn(int, boolean)public void hideColumn(int modelIndex,
boolean saveToPref)
modelIndex - the model index of the column to hidesaveToPref - true if its required to save in prefrances, false otherwise
(if false the behaviour of this method will be same as hideColumn(int) methodhideColumn(int)public void showColumn(int modelIndex)
col - the column index to showshowColumn(int, boolean)public void showColumn(int modelIndex,
boolean saveToPref)
modelIndex - the model index of the column to showsaveToPref - true if its required to save in prefrances, false otherwise
(if false the behaviour of this method will be same as showColumn(int) methodshowColumn(int)public void removeRow(int row)
row - the row index to deletepublic void addRow(Vector data)
data - The data that should be displayed in the given rowpublic void insertRow(int row,
Vector data)
row - The row numberdata - The data that should be displayed in the given rowpublic String[] getIdxDisplayFieldFormat()
public String getIdxDisplayFieldFormat(int col)
public void setIdxDisplayFieldFormat(String[] pattern) throws IllegalArgumentException, RemoteException
pattern - a MessageFormat specific patternRemoteException - reIllegalArgumentException - iaepublic void setIdxDisplayFieldFormat(int col,
String pattern)
throws IllegalArgumentException,
RemoteException
col - the spreadsheet column this pattern should be applied topattern - a MessageFormat specific patternRemoteException - reIllegalArgumentException - iaeprotected PFieldComponentRenderer getNewRenderer(String pattern)
pattern - format that should be applied to the rendererpublic void viewDataChange(PViewDataChangeEvent event) throws RemoteException
viewDataChange in interface PViewDataChangeListenerevent - the data change eventRemoteException - epublic void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenervalueChanged in class JTablee - the event indicating the selection changedpublic void setValueAt(Object value, int row, int column)
setValueAt in class JTablepublic void setValueAt(Object value, int row, int column, boolean dirtyTable)
public int getModelIndex(int row)
row - Table row index.public void addSpreadSheetListener(PSpreadSheetListener l)
l - The selection listenerpublic void removeSpreadSheetListener(PSpreadSheetListener l)
l - The selection listenerpublic void addIASelectionListener(PIASelectionListener l)
l - The selection listenerpublic void removeIASelectionListener(PIASelectionListener l)
l - The selection listenerprotected Vector convertToVector(Object[][] data)
data - The array to be convertedprotected void createSSDefaultRenderers()
protected PTableCellEditor editorFromType(Class c)
type - the Class typeprotected void setupDefaultModel()
public int[] getSavedSelectedRows()
public void setLayoutID(String id)
id - Unique string identifier of this tablesaveColumnLayout,
initColumnLayoutpublic void saveColumnLayout()
mColLayoutID must be set for layout to be saved.
Saves the following properties:
table.mColLayoutID.colnum: number of colums
table.mColLayoutID.widthcol:
column col width
table.mColLayoutID.indexcol:
column col index in the model, which basically
says that column appearing in position col is
really column x in the model
mColLayoutID,
initColumnLayoutpublic void initColumnLayout()
saveColumnLayout,
mColLayoutIDpublic int getAscendingSortIconWidth()
public Icon getAscendingSortIcon()
public void setAscendingSortIcon(Icon icon)
icon - Icon to be used for ascending sort.public int getDescendingSortIconWidth()
public Icon getDescendingSortIcon()
public void setDescendingSortIcon(Icon icon)
icon - Icon to be used for descending sort.public ActionListener getExportHandler(String caption)
export() method
explicitely instead.caption - A caption to display above the table. Can be used to
to identify the table's contents.public ActionListener getExportHandler(String caption, ExportTemplate h)
export() method
explicitely instead.caption - A caption to display above the table. Can be used to
to identify the table's contents.If - not null, identifies a provider of HTML data exported
along with (above) the table data. The purpose of this data is to
provide context (name, date, etc.) of the exported data.public void export(BufferedWriter bw, String caption) throws IOException, UnsupportedEncodingException
bw - The stream to export the data tocaption - A caption to display above the table. Can be used to
to identify the table's contents.IOExceptionUnsupportedEncodingExceptionpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerCopyright © 2003, 2023, Oracle and/or its affiliates.