com.retek.commons.gui.table
Class REntryTable

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.retek.commons.gui.widget.RPanel
                      extended bycom.retek.commons.gui.table.REntryTable
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ComponentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, REventListener, java.io.Serializable

public class REntryTable
extends RPanel
implements java.beans.PropertyChangeListener, java.awt.event.ComponentListener

BUGS #1) NO REFRESH OF ROWS AFTER PROPERTIES CHANGES #2) TABLE MOVES ON THE FIRST COLLAPSE OR EXPAND. #3) COMBO BOX WILL NOT WORK #4) MAKE WIDGET MANAGER WORK WITH SUB-LEVELS

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
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
REntryTable()
          Creates a new REntryTable that only allows one level of rows.
REntryTable(int levels)
          Creates a new REntryTable that allows multiple levels of rows.
 
Method Summary
 void addRow()
          Adds an empty row to the table as a primary row.
 void addRow(int level, java.lang.String[] values)
          Adds a row of values to the table at the specified row level.
 void addRow(int level, java.lang.String[] values, java.lang.Object object)
          Adds a row of values to the table at the specified row level, along with an object to store within the row.
 void addRow(java.lang.String[] values)
          Adds a row of values to the table as a primary row.
 void addRow(java.lang.String[] values, java.lang.Object object)
          Adds a row of values along with an object to store to the table as a primary row.
 void clear()
          Clears the table of all rows.
 void clearExceptions()
          Clears all exceptions.
 void clearPrimaryException()
          Clears the primary exception.
 void componentHidden(java.awt.event.ComponentEvent event)
           
 void componentMoved(java.awt.event.ComponentEvent event)
           
 void componentResized(java.awt.event.ComponentEvent event)
          Implements the component listener method.
 void componentShown(java.awt.event.ComponentEvent event)
           
 void displayException(BusinessException exception, RetekLogger logger)
          Displays an entire business exception, highlighting all the appropriate components based on the error message.
 void displayException(UiBusinessException exception, RetekLogger logger)
          Displays an entire business exception, highlighting all the appropriate components based on the error message.
 int findColumnIndex(java.lang.String header)
          Retrieves the column index for a particular header label.
 int findRowForObject(java.lang.Object object)
          Finds a row index for given object stored within a row.
 java.util.List getAllDataObjects()
          Retrieves all the stored object within the rows in sequential order.
 javax.swing.ButtonGroup getButtonGroup(int level, int column)
          Retrieves whether or not the particular column has a selection somewhere within the column.
 javax.swing.ButtonGroup getButtonGroup(java.lang.String header)
          Retrieves the button group at a particular column of the primary row.
 java.awt.Component getComponentAt(int row, int column)
          Retrieves the component at the specified row and column based upon a column header.
 java.awt.Component getComponentAt(int row, java.lang.String header)
          Retrieves the component at the specified row and column based upon a column header.
 java.lang.Object getDataObject(int row)
          Retrieves the stored object within the row.
 int getLastRow()
          Retrieves the last row index of the table.
 int getRowCount()
          Retrieves the number of rows in the table.
 java.lang.String getValueAt(int row, int column)
          Retrieves the string value at a specified row and column.
 java.lang.String getValueAt(int row, java.lang.String header)
          Retrieves the string value at a specified row and column.
 java.lang.String[] getValues(int row)
          Retrieves the values for a row.
 WidgetManager getWidgetManager()
          Retrieves the widget manager for the entry table.
 boolean hasAnyExceptions()
          Retrieves whether or not the table has errors associated with any of its components.
 boolean hasDataObject(java.lang.Object object)
          Retrieves whether or not the table contains the specified data object.
 boolean isEmpty()
          Retrieves whether or not the table is empty.
 boolean isModified()
          Retrieves whether or not the contents of any registered components or those of any child managers have been altered.
 boolean isSelectedAt(int row, int column)
          Retrieves whether or not a given column (if boolean type) is true or false.
 boolean isSelectedAt(int row, java.lang.String header)
          Retrieves whether or not a given column (if boolean type) is true or false.
 void performActionEvent(RActionEvent event)
          Parses all received RActionEvents and calls the appropriate method.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Executes a repaint whenever a property change event is received.
 void registerColumnName(int column, java.lang.String name)
          Registers a name for the widgets in a particular column.
 void registerColumnName(java.lang.String header, java.lang.String name)
          Registers a name for the widgets in a particular column.
 void removeRow(int rowIndex)
          Remove the row identified by the given row number.
 void removeRow(java.lang.Object object)
          Remove the row identified by the given object.
 void resort()
          Sorts the information in the table based on the last column used to sort.
 void setActionsEnabled(boolean enabled)
          Enables or disables the action triggers on all the components within the table.
 void setAutoInsert(boolean enabled)
          Assigns whether or not the table should manage auto insert.
 void setBackground(java.awt.Color background)
          Assigns the background color to the table.
 void setButtonGroup(int level, int column)
          Assigns a button group to a particular column.
 void setButtonGroup(java.lang.String header)
          Assigns a button group to a particular column.
 void setColumnAction(int level, int column, java.lang.String command)
          Assigns an action command to a column within a row level.
 void setColumnAction(java.lang.String label, java.lang.String command)
          Assigns an action command to a column within the primary row.
 void setColumnBackground(int level, int column, java.awt.Color background)
          Assigns the background color to a specific column within a specific row level of the table.
 void setColumnBackground(java.lang.String column, java.awt.Color background)
          Assigns the background color to all primary rows..
 void setColumnCount(int level, int columns)
          Assigns a number of columns to a particular row by level.
 void setColumnFont(int level, int column, java.awt.Font font)
          Assigns a font to a specific row level and column of the table.
 void setColumnFont(java.lang.String column, java.awt.Font font)
          Assigns a font to a column of the primary row level.
 void setColumnFontStyle(int level, int column, int style, int size)
          Alters the font of a particular row level and column.
 void setColumnFontStyle(java.lang.String label, int style, int size)
          Alters the font of a column of the primary row.
 void setColumnForeground(int level, int column, java.awt.Color foreground)
          Assigns the foreground color to a specific column within a specific row level of the table.
 void setColumnForeground(java.lang.String column, java.awt.Color foreground)
          Assigns the foreground color to all primary rows..
 void setColumnGap(int gap)
          Assigns a column gap to all the columns within the primary a row.
 void setColumnGap(int level, int gap)
          Assigns a column gap to all the columns within the specified row level.
 void setColumnIcon(int level, int column, java.lang.String filename)
          Assigns an icon to a column within a row level.
 void setColumnIcon(java.lang.String label, java.lang.String filename)
          Assigns an icon to a column in the primary row.
 void setColumnLabels(java.util.List list)
          Assigns the column header labels using a list.
 void setColumnLabels(java.lang.String[] labels)
          Assigns the column header labels using a string array.
 void setColumnMask(int level, int column, Mask mask)
          Assigns a mask to a column within a row level.
 void setColumnMask(java.lang.String label, Mask mask)
          Assigns a mask to a column within the primary row.
 void setColumnType(int level, int column, int columnType)
          Assigns a column type to a particular column.
 void setColumnType(java.lang.String label, int columnType)
          Assigns a column type to a particular column.
 void setColumnValidator(int level, int column, FormatValidator validator)
          Assigns a validator to a column within a row level.
 void setColumnValidator(java.lang.String label, FormatValidator validator)
          Assigns a validator to a column within the primary row.
 void setColumnWidth(int level, int column, int width)
          Assigns a column width to a specific column of a specific row level of the table.
 void setColumnWidth(java.lang.String label, int width)
          Assigns a column width to a specific column of the primary row.
 void setComboValuesAt(int row, int column, java.util.Collection values)
          Assigns an array of strings to choose from in the combo box at the given location.
 void setComboValuesAt(int row, int column, java.lang.String[] values)
          Assigns an array of strings to choose from in the combo box at the given location.
 void setComboValuesAt(int row, java.lang.String header, java.util.Collection values)
          Assigns an array of strings to choose from in the combo box at the given location.
 void setComboValuesAt(int row, java.lang.String header, java.lang.String[] values)
          Assigns an array of strings to choose from in the combo box at the given location.
 void setComponentType(int level, int column, int componentType)
          Assigns the component type based on row level and column.
 void setComponentType(java.lang.String label, int componentType)
          Assigns the component type of the primary row by header label.
 void setDataObject(int row, java.lang.Object object)
          Assigns a data object to a particular row.
 void setDefaultSortColumns(int[] defaultSortColumns)
          Sets the default columns to sort on.
 void setEnabled(boolean enabled)
          Sets the table to enabled or disabled state.
 void setEnabledAt(int row, int column, boolean enabled)
          Sets the compnoent at the row and column to enabled or disabled state.
 void setEnabledAt(int row, java.lang.String header, boolean enabled)
          Sets the component at the row and column to enabled or disabled state.
 void setFocusAt(int row, int column)
          Moves the focus to the requested row and column.
 void setFocusAt(int row, java.lang.String header)
          Moves the focus to the requested row and column based on the column header.
 void setFont(java.awt.Font font)
          Assigns a font to the table.
 void setFontStyle(int style, int size)
          Alters the default font of the table to the new style and size.
 void setForeground(java.awt.Color foreground)
          Assigns the foreground color to the table.
 void setIndentation(int level, int indentation)
          Assigns an indentation to a row by its level.
 void setJustification(int level, int column, int justification)
          Assigns a justification to a particular column..
 void setJustification(java.lang.String label, int justification)
          Assigns a justification to a particular column..
 void setMnemonic(java.lang.String label, char mnemonic)
          Assigns a mnemonic to a column in the header row.
 void setModified(boolean modified)
          Explicitly sets the state of the table.
 void setMonitorEnabled(boolean enabled)
          Enables or disables the modified monitor part of tracking components.
 void setRowBackground(int level, java.awt.Color background)
          Assigns the background color to a specific row of the table by its level.
 void setRowFont(int level, java.awt.Font font)
          Assigns a font to a specific row level of the table.
 void setRowFontStyle(int level, int style, int size)
          Alters the font of a particular row level.
 void setRowForeground(int level, java.awt.Color foreground)
          Assigns the foreground color to a specific row of the table by its level.
 void setRowHeight(int height)
          Assigns the row height of the table.
 void setRowHeight(int level, int height)
          Assigns the row height of the table.
 void setSelectedAt(int row, int column, boolean selected)
          Selects the component at the specified row and column.
 void setSelectedAt(int row, java.lang.String header, boolean selected)
          Selects the component at the specified row and column.
 void setSortingEnabled(boolean enabled)
          Enables or disables sorting on the table.
 void setStatusBar(RStatusBar statusBar)
          Sets the status bar for the table.
 void setValueAt(int row, int column, java.lang.String value)
          Sets the display value at the specifiec row and column.
 void setValueAt(int row, java.lang.String header, java.lang.String value)
          Sets the display value at the specifiec row and column using the header index.
 void updateRow(int rowIndex, java.lang.String[] values)
          Updates a row in the table identified by the row number.
 void updateRow(java.lang.Object object, java.lang.String[] values)
          Updates a row in the table identified by an object.
 
Methods inherited from class com.retek.commons.gui.widget.RPanel
addREventListener, getFocusCycleComponents, notifyREventListeners, notifyREventListeners, performErrorEvent, removeAllREventListeners, removeREventListener, repaintPanel, setEmptyBorder, setEmptyBorder, setFocusCycleComponents, setLineBorder, setLineBorder, setLoweredBevelBorder, setMinimumHeight, setRaisedBevelBorder, setTitleBorder, setTitleBorder, setTitleBorder, setTitleBorder
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

REntryTable

public REntryTable()
Creates a new REntryTable that only allows one level of rows.


REntryTable

public REntryTable(int levels)
Creates a new REntryTable that allows multiple levels of rows.

Parameters:
levels - The number of row levels to be allowed in the table.
Method Detail

setColumnLabels

public void setColumnLabels(java.util.List list)
Assigns the column header labels using a list.

Parameters:
list - A list of column header labels (strings).

setColumnLabels

public void setColumnLabels(java.lang.String[] labels)
Assigns the column header labels using a string array.

Parameters:
labels - The column header labels to assign to the table.

setColumnCount

public void setColumnCount(int level,
                           int columns)
Assigns a number of columns to a particular row by level. The number of columns in the primary row (level 0) is assigned by the declaration of table column headers.

Parameters:
level - The row level to assign a particular number of columns to.
columns - The number of columns to assign to the particular row level.

setIndentation

public void setIndentation(int level,
                           int indentation)
Assigns an indentation to a row by its level.

Parameters:
level - The row level of the row to indent.
indentation - The number of pixels to indent the

setRowHeight

public void setRowHeight(int height)
Assigns the row height of the table.

Parameters:
height - The row height of the table (in pixels).

setRowHeight

public void setRowHeight(int level,
                         int height)
Assigns the row height of the table.

Parameters:
height - The row height of the table (in pixels).

setComponentType

public void setComponentType(java.lang.String label,
                             int componentType)
Assigns the component type of the primary row by header label.

Parameters:
label - The header label of the column to assign the type.

setComponentType

public void setComponentType(int level,
                             int column,
                             int componentType)
Assigns the component type based on row level and column. It should be noted that this determines what widget is used to display the information. This resets column information to the default values for the widget. This means that other values such as mask, justification and column type should be set after the component.

Parameters:
level - The row level.
column - The column index.

setColumnMask

public void setColumnMask(java.lang.String label,
                          Mask mask)
Assigns a mask to a column within the primary row.

Parameters:
label - The header label of the column to assign the mask.
mask - The mask to assign to the column.

setColumnMask

public void setColumnMask(int level,
                          int column,
                          Mask mask)
Assigns a mask to a column within a row level.

Parameters:
level - The row level.
column - The column index.
mask - The mask to assign to the column.

setColumnValidator

public void setColumnValidator(java.lang.String label,
                               FormatValidator validator)
Assigns a validator to a column within the primary row.

Parameters:
label - The header label of the column to assign the validator.
validator - The validator to assign to the column.

setColumnValidator

public void setColumnValidator(int level,
                               int column,
                               FormatValidator validator)
Assigns a validator to a column within a row level.

Parameters:
level - The row level.
column - The column index.
validator - The validator to assign to the column.

setColumnAction

public void setColumnAction(java.lang.String label,
                            java.lang.String command)
Assigns an action command to a column within the primary row.

Parameters:
label - The header label of the column to assign the validator.
command - The command to assign to the column.

setColumnAction

public void setColumnAction(int level,
                            int column,
                            java.lang.String command)
Assigns an action command to a column within a row level.

Parameters:
level - The row level.
column - The column index.
command - The command to assign to the column.

setColumnType

public void setColumnType(java.lang.String label,
                          int columnType)
Assigns a column type to a particular column. The column type determines sorting order.

Parameters:
label - The header label of the column to assign the mask.
columnType - The column type to assign to the column.

setColumnType

public void setColumnType(int level,
                          int column,
                          int columnType)
Assigns a column type to a particular column. The column type determines sorting order.

Parameters:
level - The row level.
column - The column index.
columnType - The column type to assign to the column.

setJustification

public void setJustification(java.lang.String label,
                             int justification)
Assigns a justification to a particular column..

Parameters:
label - The header label of the column to assign the mask.
justification - The justification to assign to the column.

setJustification

public void setJustification(int level,
                             int column,
                             int justification)
Assigns a justification to a particular column..

Parameters:
level - The row level.
column - The column index.
justification - The justification to assign to the column.

setMnemonic

public void setMnemonic(java.lang.String label,
                        char mnemonic)
Assigns a mnemonic to a column in the header row.

Parameters:
label - The column header label.
mnemonic - The mnemonic to assign to the column.

setColumnIcon

public void setColumnIcon(java.lang.String label,
                          java.lang.String filename)
Assigns an icon to a column in the primary row.

Parameters:
label - The header label of the column to assign the icon to.
filename - The filename of the icon.

setColumnIcon

public void setColumnIcon(int level,
                          int column,
                          java.lang.String filename)
Assigns an icon to a column within a row level. The filename must be in the classpath of the VM.

Parameters:
level - The row level.
column - The column index.
filename - The filename of the icon.

setColumnWidth

public void setColumnWidth(java.lang.String label,
                           int width)
Assigns a column width to a specific column of the primary row.

Parameters:
label - The header label of the column.
width - The width of the column (in pixels).

setColumnWidth

public void setColumnWidth(int level,
                           int column,
                           int width)
Assigns a column width to a specific column of a specific row level of the table.

Parameters:
level - The row level to assign the column width to.
column - The column index.
width - The width of the column (in pixels).

setColumnGap

public void setColumnGap(int gap)
Assigns a column gap to all the columns within the primary a row.

Parameters:
gap - The gap in pixels to place between the columns.

setColumnGap

public void setColumnGap(int level,
                         int gap)
Assigns a column gap to all the columns within the specified row level.

Parameters:
gap - The gap in pixels to place between the columns.

setButtonGroup

public void setButtonGroup(java.lang.String header)
Assigns a button group to a particular column. If the column is not set as Component Type CheckBox, this will have no effect.

Parameters:
header - The header label of the column to assign the button group to.

setButtonGroup

public void setButtonGroup(int level,
                           int column)
Assigns a button group to a particular column. If the column is not set as Component Type CheckBox, this will have no effect.

Parameters:
level - The row level to assign the column width to.
column - The column index.

getButtonGroup

public javax.swing.ButtonGroup getButtonGroup(java.lang.String header)
Retrieves the button group at a particular column of the primary row.

Parameters:
header - The column header.
Returns:
The ButtonGroup at the particular level and column.

getButtonGroup

public javax.swing.ButtonGroup getButtonGroup(int level,
                                              int column)
Retrieves whether or not the particular column has a selection somewhere within the column. This only works if a button group has been assigned and the component type is a RTable.CHECKBOX.

Returns:
The ButtonGroup at the particular level and column.

setForeground

public void setForeground(java.awt.Color foreground)
Assigns the foreground color to the table. If rows already exist, the row properties are modified as well.

Parameters:
foreground - The foreground color to assign to the table.

setBackground

public void setBackground(java.awt.Color background)
Assigns the background color to the table. If rows already exist, the row properties are modified as well.

Parameters:
background - The background color to assign to the table.

setRowForeground

public void setRowForeground(int level,
                             java.awt.Color foreground)
Assigns the foreground color to a specific row of the table by its level.

Parameters:
level - The row level.
foreground - The foreground color.

setRowBackground

public void setRowBackground(int level,
                             java.awt.Color background)
Assigns the background color to a specific row of the table by its level.

Parameters:
level - The row level.
background - The background color.

setColumnForeground

public void setColumnForeground(int level,
                                int column,
                                java.awt.Color foreground)
Assigns the foreground color to a specific column within a specific row level of the table.

Parameters:
level - The row level.
column - The column index.
foreground - The foreground color.

setColumnBackground

public void setColumnBackground(int level,
                                int column,
                                java.awt.Color background)
Assigns the background color to a specific column within a specific row level of the table.

Parameters:
level - The row level.
column - The column index.
background - The background color.

setColumnForeground

public void setColumnForeground(java.lang.String column,
                                java.awt.Color foreground)
Assigns the foreground color to all primary rows..

Parameters:
column - The column header label.
foreground - The foreground color.

setColumnBackground

public void setColumnBackground(java.lang.String column,
                                java.awt.Color background)
Assigns the background color to all primary rows..

Parameters:
column - The column header label.
background - The background color.

setFont

public void setFont(java.awt.Font font)
Assigns a font to the table. This font is assigned as the default faunt of all rows.

Parameters:
font - The font to assign to the table.

setRowFont

public void setRowFont(int level,
                       java.awt.Font font)
Assigns a font to a specific row level of the table.

Parameters:
level - The row level.
font - The font to assign to the row level.

setColumnFont

public void setColumnFont(int level,
                          int column,
                          java.awt.Font font)
Assigns a font to a specific row level and column of the table.

Parameters:
level - The row level.
column - The column index.
font - The font to assign.

setColumnFont

public void setColumnFont(java.lang.String column,
                          java.awt.Font font)
Assigns a font to a column of the primary row level.

Parameters:
column - The column header label.
font - The font to assign.

setFontStyle

public void setFontStyle(int style,
                         int size)
Alters the default font of the table to the new style and size.

Parameters:
style - The font style (plain, bold, italic).
size - The font size.

setRowFontStyle

public void setRowFontStyle(int level,
                            int style,
                            int size)
Alters the font of a particular row level.

Parameters:
level - The row level.
style - The font style (plain, bold, italic).
size - The font size.

setColumnFontStyle

public void setColumnFontStyle(int level,
                               int column,
                               int style,
                               int size)
Alters the font of a particular row level and column.

Parameters:
level - The row level.
column - The column index.
style - The font style (plain, bold, italic).
size - The font size.

setColumnFontStyle

public void setColumnFontStyle(java.lang.String label,
                               int style,
                               int size)
Alters the font of a column of the primary row.

Parameters:
label - The column header label.
style - The font style (plain, bold, italic).
size - The font size.

setDefaultSortColumns

public void setDefaultSortColumns(int[] defaultSortColumns)
Sets the default columns to sort on. The column index array will be sorted after the column clicked on in the order the indexes appear in the array.


setSortingEnabled

public void setSortingEnabled(boolean enabled)
Enables or disables sorting on the table.

Parameters:
enabled - True if the table should allow sorting, false if not

setAutoInsert

public void setAutoInsert(boolean enabled)
Assigns whether or not the table should manage auto insert. In auto insert mode, the table will ensure that there is always one additional empty row at the bottom of the table.


addRow

public void addRow()
Adds an empty row to the table as a primary row.


addRow

public void addRow(java.lang.String[] values)
Adds a row of values to the table as a primary row.

Parameters:
values - An array of values representing the data of the primary row.

addRow

public void addRow(java.lang.String[] values,
                   java.lang.Object object)
Adds a row of values along with an object to store to the table as a primary row.

Parameters:
values - An array of values representing the data of the primary row.

addRow

public void addRow(int level,
                   java.lang.String[] values)
Adds a row of values to the table at the specified row level.

Parameters:
level - The row level to assign the new values to.
values - An array of values representing the data of the primary row.

addRow

public void addRow(int level,
                   java.lang.String[] values,
                   java.lang.Object object)
Adds a row of values to the table at the specified row level, along with an object to store within the row.

Note: Instead of revalidate(), we used to use setVisible(false) at the beginning of the mainPanel code and setVisible(true) at the end. This caused problems with reestablishing the focus.

Parameters:
level - The row level to assign the new values to.
values - An array of values representing the data of the primary row.
object - A data storage object to place inside the row.

updateRow

public void updateRow(int rowIndex,
                      java.lang.String[] values)
Updates a row in the table identified by the row number.

Parameters:
rowIndex - The row number of the row to update.
values - The display values to display at that row.

updateRow

public void updateRow(java.lang.Object object,
                      java.lang.String[] values)
Updates a row in the table identified by an object.

Parameters:
object - The object stored within the row.
values - The display values to display at that row.

removeRow

public void removeRow(int rowIndex)
Remove the row identified by the given row number.

Parameters:
rowIndex - The row index of the row to remove.

removeRow

public void removeRow(java.lang.Object object)
Remove the row identified by the given object.

Parameters:
object - The object to identify the row with.

getComponentAt

public java.awt.Component getComponentAt(int row,
                                         java.lang.String header)
Retrieves the component at the specified row and column based upon a column header.

Parameters:
row - The row number.
header - A column header.
Returns:
The component located at the row and column.

getComponentAt

public java.awt.Component getComponentAt(int row,
                                         int column)
Retrieves the component at the specified row and column based upon a column header.

Parameters:
row - The row number.
column - A column index.
Returns:
The component located at the row and column.

getValues

public java.lang.String[] getValues(int row)
Retrieves the values for a row. Each index of the string array matched the column index. Returns null if row or object does not exist.

Parameters:
row - The row number.
Returns:
The values that represent the row.

getValueAt

public java.lang.String getValueAt(int row,
                                   java.lang.String header)
Retrieves the string value at a specified row and column.

Parameters:
row - The row number.
header - A column header.
Returns:
The value in the column as a string.

getValueAt

public java.lang.String getValueAt(int row,
                                   int column)
Retrieves the string value at a specified row and column.

Parameters:
row - The row number.
column - A column index.
Returns:
The value in the column as a string.

setValueAt

public void setValueAt(int row,
                       java.lang.String header,
                       java.lang.String value)
Sets the display value at the specifiec row and column using the header index.

Parameters:
row - The row number.
header - A column header.
value - The text to display at the specified location.

setValueAt

public void setValueAt(int row,
                       int column,
                       java.lang.String value)
Sets the display value at the specifiec row and column.

Parameters:
row - The row number.
column - A column index.
value - The text to display at the specified location.

isSelectedAt

public boolean isSelectedAt(int row,
                            java.lang.String header)
Retrieves whether or not a given column (if boolean type) is true or false.

Parameters:
row - The row number.
header - A column header.
Returns:
True if row and column contains a true value, false if not.

isSelectedAt

public boolean isSelectedAt(int row,
                            int column)
Retrieves whether or not a given column (if boolean type) is true or false.

Parameters:
row - The row number.
column - A column index.
Returns:
True if row and column contains a true value, false if not.

setSelectedAt

public void setSelectedAt(int row,
                          java.lang.String header,
                          boolean selected)
Selects the component at the specified row and column. This only works on columns that have the component type RTable.CHECKBOX.

Parameters:
row - The row number.
header - A column header.
selected - True if row and column should be selected, false if not.

setSelectedAt

public void setSelectedAt(int row,
                          int column,
                          boolean selected)
Selects the component at the specified row and column. This only works on columns that have the component type RTable.CHECKBOX.

Parameters:
row - The row number.
column - A column index.
selected - True if row and column should be selected, false if not.

setEnabled

public void setEnabled(boolean enabled)
Sets the table to enabled or disabled state.

Parameters:
enabled - True if the component should be enabled, false if not.

setEnabledAt

public void setEnabledAt(int row,
                         java.lang.String header,
                         boolean enabled)
Sets the component at the row and column to enabled or disabled state.

Parameters:
enabled - True if the component should be enabled, false if not.

setEnabledAt

public void setEnabledAt(int row,
                         int column,
                         boolean enabled)
Sets the compnoent at the row and column to enabled or disabled state.

Parameters:
enabled - True if the component should be enabled, false if not.

setFocusAt

public void setFocusAt(int row,
                       java.lang.String header)
Moves the focus to the requested row and column based on the column header.


setFocusAt

public void setFocusAt(int row,
                       int column)
Moves the focus to the requested row and column.


setComboValuesAt

public void setComboValuesAt(int row,
                             java.lang.String header,
                             java.lang.String[] values)
Assigns an array of strings to choose from in the combo box at the given location.

Parameters:
row - The row number.
header - A column header.
values - The array of strings to place in the combo box.

setComboValuesAt

public void setComboValuesAt(int row,
                             int column,
                             java.lang.String[] values)
Assigns an array of strings to choose from in the combo box at the given location.

Parameters:
row - The row number.
column - The column index.
values - The array of strings to place in the combo box.

setComboValuesAt

public void setComboValuesAt(int row,
                             java.lang.String header,
                             java.util.Collection values)
Assigns an array of strings to choose from in the combo box at the given location.

Parameters:
row - The row number.
header - A column header.
values - The collection to place in the combo box.

setComboValuesAt

public void setComboValuesAt(int row,
                             int column,
                             java.util.Collection values)
Assigns an array of strings to choose from in the combo box at the given location.

Parameters:
row - The row number.
column - The column index.
values - The collection to place in the combo box.

hasDataObject

public boolean hasDataObject(java.lang.Object object)
Retrieves whether or not the table contains the specified data object.

Parameters:
object - The data object to check for.
Returns:
True if the table contains the object, false if not.

getAllDataObjects

public java.util.List getAllDataObjects()
Retrieves all the stored object within the rows in sequential order. This will skip null objects however.

Returns:
A list of all the stored data objects.

getDataObject

public java.lang.Object getDataObject(int row)
Retrieves the stored object within the row. Returns null if row or object does not exist.

Parameters:
row - The row number.
Returns:
The object stored within the row.

setDataObject

public void setDataObject(int row,
                          java.lang.Object object)
Assigns a data object to a particular row.

Parameters:
row - The row number.

findRowForObject

public int findRowForObject(java.lang.Object object)
Finds a row index for given object stored within a row.

Parameters:
object - The object to identify the row with.
Returns:
The index of the row where the object is stored or false if no row is found.

findColumnIndex

public int findColumnIndex(java.lang.String header)
Retrieves the column index for a particular header label.

Parameters:
header - The header label.
Returns:
The column index.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Executes a repaint whenever a property change event is received.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

performActionEvent

public void performActionEvent(RActionEvent event)
Parses all received RActionEvents and calls the appropriate method.

Specified by:
performActionEvent in interface REventListener
Overrides:
performActionEvent in class RPanel
Parameters:
event - The RActionEvent.

resort

public void resort()
Sorts the information in the table based on the last column used to sort.


getLastRow

public int getLastRow()
Retrieves the last row index of the table.

Returns:
The last row index of the table.

getRowCount

public int getRowCount()
Retrieves the number of rows in the table.

Returns:
The number of rows in the table.

isEmpty

public boolean isEmpty()
Retrieves whether or not the table is empty.

Returns:
True if the table is empty, false if not.

clear

public void clear()
Clears the table of all rows. In order for the scrollbar to reset itself, this requires deleting the panel and scrollpane, rebuilding a new reference to a scrollpane and adding it back to the table. The setVisible() method is the only means of getting BorderLayout to accurately redraw itself.


componentResized

public void componentResized(java.awt.event.ComponentEvent event)
Implements the component listener method. It resizes the columns every time the table size is resized or whent he component is shown.

Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent event)
Specified by:
componentShown in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent event)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent event)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

getWidgetManager

public WidgetManager getWidgetManager()
Retrieves the widget manager for the entry table.

Returns:
The widget manager for the entry table.

setStatusBar

public void setStatusBar(RStatusBar statusBar)
Sets the status bar for the table.

Parameters:
statusBar - A status bar.

registerColumnName

public void registerColumnName(java.lang.String header,
                               java.lang.String name)
Registers a name for the widgets in a particular column. This only works on the primary row.

`

Parameters:
name - The widget name.

registerColumnName

public void registerColumnName(int column,
                               java.lang.String name)
Registers a name for the widgets in a particular column. This only works on the primary row.

Parameters:
column - The column index.
name - The widget name.

setActionsEnabled

public void setActionsEnabled(boolean enabled)
Enables or disables the action triggers on all the components within the table.

Parameters:
enabled - True if the actions should be enabled, false if they should be ignored.

setMonitorEnabled

public void setMonitorEnabled(boolean enabled)
Enables or disables the modified monitor part of tracking components.

Parameters:
enabled - True if the monitor should be active, false if not.

setModified

public void setModified(boolean modified)
Explicitly sets the state of the table. If true, the contents of the the components being monitored are considered altered. If false, then the state is reset.

Parameters:
modified - True is the compnent contents are altered, false if not.

isModified

public boolean isModified()
Retrieves whether or not the contents of any registered components or those of any child managers have been altered.

Returns:
True if the contents of any components have been altered, false if not.

displayException

public void displayException(BusinessException exception,
                             RetekLogger logger)
Displays an entire business exception, highlighting all the appropriate components based on the error message.

Parameters:
exception - The business exception to display.

displayException

public void displayException(UiBusinessException exception,
                             RetekLogger logger)
Displays an entire business exception, highlighting all the appropriate components based on the error message.

Parameters:
exception - The business exception to display.

hasAnyExceptions

public boolean hasAnyExceptions()
Retrieves whether or not the table has errors associated with any of its components.

Returns:
True if it has errors, false if it does not.

clearPrimaryException

public void clearPrimaryException()
Clears the primary exception.


clearExceptions

public void clearExceptions()
Clears all exceptions.



Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28