com.retek.commons.gui.table
Class RHeaderRow

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

public class RHeaderRow
extends RPanel
implements java.awt.event.MouseListener

ENTRY TABLE HEADER 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
RHeaderRow(java.lang.String[] labels)
          Creates a new header row for an RLayerTable, assigning a column to each of the labels in the label array.
 
Method Summary
 int getColumnIndex(java.lang.String label)
          Retrieves the numeric column index for a header label.
 int getColumnIndexByMnemonic(java.lang.String character)
          Retrieves the numeric column index for a header label mnemonic.
 int[] getColumnWidths()
          Retrieves an array of the header widths.
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
          Implements the MouseListener methods.
 void mouseEntered(java.awt.event.MouseEvent event)
          Remaining Mouse Listener methods.
 void mouseExited(java.awt.event.MouseEvent event)
           
 void mousePressed(java.awt.event.MouseEvent event)
           
 void mouseReleased(java.awt.event.MouseEvent event)
           
 void setBorderVisible(boolean visible)
          Sets whether or not the header border should be displayed around each header.
 void setColumnWidth(int column, int width)
          Assigns a column width to the header column.
 void setJustification(int column, int justification)
          Assigns a justification to a particular column of the header.
 void setMnemonic(java.lang.String label, char character)
          Assigns a mnemonic to a give header based on the header label.
 void setSortedHeader(int column, boolean ascending)
          Assigns the sort indicator to the header of a sorted column.
 boolean shouldSortAscending(int column)
          Retrieves whether or not the given column should be sorted ascending or not.
 java.lang.String toString()
          Returns string describing the header row.
 
Methods inherited from class com.retek.commons.gui.widget.RPanel
addREventListener, getFocusCycleComponents, notifyREventListeners, notifyREventListeners, performActionEvent, 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, 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

RHeaderRow

public RHeaderRow(java.lang.String[] labels)
Creates a new header row for an RLayerTable, assigning a column to each of the labels in the label array.

Method Detail

setBorderVisible

public void setBorderVisible(boolean visible)
Sets whether or not the header border should be displayed around each header. If true, a raised bevel border is displayed.

Parameters:
visible - True is a border should be displayed, false if not.

setJustification

public void setJustification(int column,
                             int justification)
Assigns a justification to a particular column of the header. This is used to display the text.

Parameters:
column - The column to assign the justification..
justification - The column to assign the justification.

setMnemonic

public void setMnemonic(java.lang.String label,
                        char character)
Assigns a mnemonic to a give header based on the header label.

Parameters:
label - The header label to match column.
character - The character to assign as a mnemonic.

getColumnIndex

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

Parameters:
label - The string label to retrieve the column index for.
Returns:
The column index or -1 if no column index is found for the label.

getColumnIndexByMnemonic

public int getColumnIndexByMnemonic(java.lang.String character)
Retrieves the numeric column index for a header label mnemonic.

Parameters:
character - The character to retrieve the column index for.
Returns:
The column index or -1 if no column index is found for the label.

setColumnWidth

public void setColumnWidth(int column,
                           int width)
Assigns a column width to the header column. The value "0" means the width should be the size of the label.

Parameters:
column - The column index.
width - The column width.

getColumnWidths

public int[] getColumnWidths()
Retrieves an array of the header widths. Each index in the array represents the column index for which the int value is the length.

Returns:
An integer array of column header widths.

shouldSortAscending

public boolean shouldSortAscending(int column)
Retrieves whether or not the given column should be sorted ascending or not.

Parameters:
column - The column index of the header.
Returns:
True if the column should sort ascending, false if not.

setSortedHeader

public void setSortedHeader(int column,
                            boolean ascending)
Assigns the sort indicator to the header of a sorted column.

Parameters:
column - The column index of the sorted column.
ascending - True if the column was sorted ascending, false if not.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Implements the MouseListener methods. Sends a notification to all event listeners (ie. table) when the row is clicked on.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Remaining Mouse Listener methods. These do not need to be defined.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

toString

public java.lang.String toString()
Returns string describing the header row.



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