com.retek.commons.gui.table
Class REntryRow

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.REntryRow
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, REventListener, java.io.Serializable

public class REntryRow
extends RPanel
implements java.awt.event.KeyListener

ENTRY ROW

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
REntryRow()
          Creates a new REntryRow object.
REntryRow(RowProperties properties)
          Creates a new REntry object with properties.
 
Method Summary
 java.awt.Component getColumnComponent(int column)
          Retrieves the component at a specified column.
 int getColumnType(int column)
          Retrieves the column type of the specified column.
 int getFocusedColumn()
          Retrieves the focused column in the row.
 int[] getFocusedLocation()
          Retrieves the location of the focus within the row.
 int getLevel()
          Retrieves the level of the row.
 java.lang.Object getRowData()
          Retrieves an object stored within the row.
 int getRowNumber()
          Retrieves the row number of the REntryRow.
 java.lang.String getValueAt(int column)
          Retrieves the string value at a specified column.
 java.lang.String[] getValues()
          Retrieves the row values used to display information within the row.
 boolean isColumnTraversable(int column)
          Retrieves whether or not a given column is traversable.
 boolean isPrimaryRow()
          Retrieves whether or not this row is a primary row.
 boolean isSelectedAt(int column)
          Retrieves whether or not a given column (if boolean type) is true or false.
 void keyPressed(java.awt.event.KeyEvent keyEvent)
          Implements the KeyListener method.
 void keyReleased(java.awt.event.KeyEvent event)
          The remaining key listener methods.
 void keyTyped(java.awt.event.KeyEvent event)
           
 void performActionEvent(RActionEvent event)
          Implements the REventListener method.
 void requestColumnFocus(int column)
          The component location at the given column will request the focus.
 void requestFocus()
          Override request focus to transfer the focus to the first widget of the row.
 void resizeColumns()
          Reset the width of the columns to the given widths.
 void setComboValuesAt(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 column, java.lang.String[] values)
          Assigns an array of strings to choose from in the combo box at the given location.
 void setEnabledAt(int column, boolean enabled)
          Sets the component at the specifiedcolumn to enabled or disabled state.
 void setRowData(java.lang.Object object)
          Assigns a generic object to be stored within the row.
 void setRowNumber(int row)
          Assigns a row number to the REntryRow.
 void setSelectedAt(int column, boolean selected)
          Sets the selected state of the component at the specified column.
 void setValueAt(int column, java.lang.String value)
          Assigns the value at the particular location.
 void setValues(java.lang.String[] values)
          Assigns data values to each column of the row The data comes from the parameter row where each index of the array matches the index of the column to display the string in.
 java.lang.String toString()
          Returns string describing this entry row.
 
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, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, 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, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

REntryRow

public REntryRow()
Creates a new REntryRow object.


REntryRow

public REntryRow(RowProperties properties)
Creates a new REntry object with properties. The details of the row will be calculated from the properties object.

Parameters:
properties - An object containing all the properties for the row.
Method Detail

setRowNumber

public void setRowNumber(int row)
Assigns a row number to the REntryRow. The row number represents the sequence of rows in the table.

Parameters:
row - The row number.

getRowNumber

public int getRowNumber()
Retrieves the row number of the REntryRow.

Returns:
The row number.

getLevel

public int getLevel()
Retrieves the level of the row.

Returns:
The row level.

isPrimaryRow

public boolean isPrimaryRow()
Retrieves whether or not this row is a primary row.

Returns:
The row level.

getColumnComponent

public java.awt.Component getColumnComponent(int column)
Retrieves the component at a specified column.

Returns:
The component at the specified column.

getColumnType

public int getColumnType(int column)
Retrieves the column type of the specified column.

Returns:
The column type.

setRowData

public void setRowData(java.lang.Object object)
Assigns a generic object to be stored within the row.

Parameters:
object - An object to store within the row.

getRowData

public java.lang.Object getRowData()
Retrieves an object stored within the row.

Returns:
The object stored within the row.

setValueAt

public void setValueAt(int column,
                       java.lang.String value)
Assigns the value at the particular location. First line of code refreshes values based on typed information.


setEnabledAt

public void setEnabledAt(int column,
                         boolean enabled)
Sets the component at the specifiedcolumn to enabled or disabled state.

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

setComboValuesAt

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

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

setComboValuesAt

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

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

isSelectedAt

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

Returns:
True if the column contains a true value, false if not.

setSelectedAt

public void setSelectedAt(int column,
                          boolean selected)
Sets the selected state of the component at the specified column. This only works if the component is a CheckBox.

Returns:
True if the column contains a true value, false if not.

getValueAt

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

Returns:
The value in the column as a string.

getValues

public java.lang.String[] getValues()
Retrieves the row values used to display information within the row. Each index of the string array is the column index of the represented data.

Returns:
The row values as a string array.

setValues

public void setValues(java.lang.String[] values)
Assigns data values to each column of the row The data comes from the parameter row where each index of the array matches the index of the column to display the string in.


resizeColumns

public void resizeColumns()
Reset the width of the columns to the given widths.


performActionEvent

public void performActionEvent(RActionEvent event)
Implements the REventListener method. It adds the row number and data object to the event and then notifies the listener.

Specified by:
performActionEvent in interface REventListener
Overrides:
performActionEvent in class RPanel
Parameters:
event - The RActionEvent that triggered this listener method.

keyPressed

public void keyPressed(java.awt.event.KeyEvent keyEvent)
Implements the KeyListener method. If the ALT key is down, then the table should attempt to perform a sort. If the ALT key is not down, then UP, DOWN, TAB, SPACE, and ENTER all notify the table that they have been pressed.

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent event)
The remaining key listener methods. These do not need to be defined.

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent event)
Specified by:
keyTyped in interface java.awt.event.KeyListener

getFocusedColumn

public int getFocusedColumn()
Retrieves the focused column in the row.

Returns:
The location of the focus component within the row or -1 if no component has focus.

getFocusedLocation

public int[] getFocusedLocation()
Retrieves the location of the focus within the row.

Returns:
The location of the focus within the row or null if the row does not have focus.

requestFocus

public void requestFocus()
Override request focus to transfer the focus to the first widget of the row.


requestColumnFocus

public void requestColumnFocus(int column)
The component location at the given column will request the focus.

Parameters:
column - The column index.

isColumnTraversable

public boolean isColumnTraversable(int column)
Retrieves whether or not a given column is traversable.

Parameters:
column - The column index.
Returns:
True if the widget in the column is traversable, false if not.

toString

public java.lang.String toString()
Returns string describing this entry row.



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