|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--arlut.csd.JTable.baseTable
|
+--arlut.csd.JTable.rowTable
rowTable is a specialized baseTable, supporting a per-row access model based on a hashtable.
baseTable,
Serialized Form| Field Summary | |
(package private) arlut.csd.JTable.rowSelectCallback |
callback
|
(package private) java.util.Vector |
crossref
|
(package private) javax.swing.JMenuItem |
DeleteColMI
|
(package private) java.util.Hashtable |
index
|
(package private) javax.swing.JMenuItem |
OptimizeMI
|
(package private) javax.swing.JMenuItem |
RevSortByMI
|
(package private) javax.swing.JPopupMenu |
rowMenu
|
(package private) java.lang.Object |
rowSelectedKey
|
(package private) javax.swing.JMenuItem |
SortByMI
|
(package private) boolean |
sortForward
|
| Fields inherited from class arlut.csd.JTable.baseTable |
bounding_rect, canvas, colPos, cols, debug, hbar, hbar_visible, headerAttrib, headerMenu, hHeadLineColor, hHeadLineThickness, horizLines, hRowLineColor, hRowLineThickness, hVertFill, in, menu, menuCol, menuRow, origTotalWidth, row_baseline, row_height, rows, rowsToShow, scalefact, selectedRow, tableAttrib, vbar, vbar_visible, vertFill, vertLines, vHeadLineColor, vLineThickness, vRowLineColor |
| 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.Container |
|
| 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 | |
rowTable(int[] colWidths,
java.lang.String[] headers,
arlut.csd.JTable.rowSelectCallback callback,
boolean horizLines,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
Constructor with default fonts, justification, and behavior |
|
rowTable(int[] colWidths,
java.lang.String[] headers,
arlut.csd.JTable.rowSelectCallback callback,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
Constructor with default fonts, justification, and behavior |
|
rowTable(arlut.csd.JTable.tableAttr headerAttrib,
arlut.csd.JTable.tableAttr tableAttrib,
arlut.csd.JTable.tableAttr[] colAttribs,
int[] colWidths,
java.awt.Color vHeadLineColor,
java.awt.Color vRowLineColor,
java.awt.Color hHeadLineColor,
java.awt.Color hRowLineColor,
java.lang.String[] headers,
boolean horizLines,
boolean vertLines,
boolean vertFill,
boolean hVertFill,
arlut.csd.JTable.rowSelectCallback callback,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
This is the base constructor for rowTable, which allows all aspects of the rowTable's appearance and behavior to be customized. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Method used to handle the popup menu |
void |
clearCells()
Erases all the cells in the table and removes any per-cell attribute sets. |
void |
clickInCell(int x,
int y,
boolean rightButton)
Hook for subclasses to implement selection logic |
boolean |
containsKey(java.lang.Object key)
Returns true if a key is already in use in the table |
void |
deleteRow(java.lang.Object key,
boolean repaint)
Deletes a row. |
void |
doubleClickInCell(int x,
int y)
Hook for subclasses to implement selection logic |
arlut.csd.JTable.tableCell |
getCell(java.lang.Object key,
int col)
Gets a cell based on hashkey |
arlut.csd.JTable.tableAttr |
getCellAttr(java.lang.Object key,
int col)
Gets the tableAttr of a cell in the table. |
java.lang.String |
getCellText(java.lang.Object key,
int col)
Gets the contents of a cell in the table. |
java.lang.Object |
getSelectedRow()
|
java.util.Enumeration |
keys()
Return an enumeration of the keys in the table |
void |
newRow(java.lang.Object key)
Creates a new row, adds it to the hashtable |
void |
resort(int column,
boolean repaint)
Sort by column |
void |
resort(int column,
boolean forward,
boolean repaint)
|
void |
selectRow(java.lang.Object key,
boolean refreshTable)
This method unselects any rows currently selected that do not match key and selects the row that does match key (if any). |
void |
setCellAttr(java.lang.Object key,
int col,
arlut.csd.JTable.tableAttr attr,
boolean repaint)
Sets the tableAttr of a cell in the table. |
void |
setCellBackColor(java.lang.Object key,
int col,
java.awt.Color color,
boolean repaint)
Sets the background color of a cell A color of (Color) null will cause baseTable to revert to using the background selected for the column (if defined) or the background for the table. |
void |
setCellColor(java.lang.Object key,
int col,
java.awt.Color color,
boolean repaint)
Sets the foreground color of a cell A color of (Color) null will cause baseTable to revert to using the foreground selected for the column (if defined) or the foreground for the table. |
void |
setCellFont(java.lang.Object key,
int col,
java.awt.Font font,
boolean repaint)
Sets the font of a cell in the table. |
void |
setCellJust(java.lang.Object key,
int col,
int just,
boolean repaint)
Sets the justification of a cell in the table. |
void |
setCellText(java.lang.Object key,
int col,
java.lang.String cellText,
boolean repaint)
Sets the contents of a cell in the table. |
void |
setCellText(java.lang.Object key,
int col,
java.lang.String cellText,
java.lang.Object data,
boolean repaint)
Sets the contents of a cell in the table. |
void |
unSelectAll()
Unselect all cells.. |
void |
unSelectRow()
This method unselects the currently selected row. |
| 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, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, updateUI |
| 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, 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 |
| Field Detail |
java.util.Hashtable index
java.util.Vector crossref
arlut.csd.JTable.rowSelectCallback callback
javax.swing.JPopupMenu rowMenu
javax.swing.JMenuItem SortByMI
javax.swing.JMenuItem RevSortByMI
javax.swing.JMenuItem DeleteColMI
javax.swing.JMenuItem OptimizeMI
boolean sortForward
java.lang.Object rowSelectedKey
| Constructor Detail |
public rowTable(arlut.csd.JTable.tableAttr headerAttrib,
arlut.csd.JTable.tableAttr tableAttrib,
arlut.csd.JTable.tableAttr[] colAttribs,
int[] colWidths,
java.awt.Color vHeadLineColor,
java.awt.Color vRowLineColor,
java.awt.Color hHeadLineColor,
java.awt.Color hRowLineColor,
java.lang.String[] headers,
boolean horizLines,
boolean vertLines,
boolean vertFill,
boolean hVertFill,
arlut.csd.JTable.rowSelectCallback callback,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
headerAttrib - attribute set for the column headerstableAttrib - default attribute set for the body of the tablecolAttribs - per column attribute setscolWidths - array of initial column widthsvHeadLineColor - color of vertical lines in the column headers, if anyvRowLineColor - color of vertical lines in the table body, if anyhHeadLineColor - color of horizontal lines in the column headers, if anyheaders - array of column header titles, must be same size as colWidthshorizLines - true if horizontal lines should be shown between rows in report tablevertLines - true if vertical lines should be shown between columns in report tablevertFill - true if table should expand vertically to fill size of baseTablehVertFill - true if horizontal lines should be drawn in the vertical fill region
(only applies if vertFill and horizLines are true)callback - reference to an object that implements the rowSelectCallback interfacemenu - reference to a popup menu to be associated with rows in this table
public rowTable(int[] colWidths,
java.lang.String[] headers,
arlut.csd.JTable.rowSelectCallback callback,
boolean horizLines,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
colWidths - array of initial column widthsheaders - array of column header titles, must be same size as colWidthscallback - reference to an object that implements the rowSelectCallback interfacehorizLines - draw horizontal lines between rows?menu - reference to a popup menu to be associated with rows in this table
public rowTable(int[] colWidths,
java.lang.String[] headers,
arlut.csd.JTable.rowSelectCallback callback,
javax.swing.JPopupMenu menu,
boolean allowDeleteColumn)
colWidths - array of initial column widthsheaders - array of column header titles, must be same size as colWidthscallback - reference to an object that implements the rowSelectCallback interfacemenu - reference to a popup menu to be associated with rows in this table| Method Detail |
public void clickInCell(int x,
int y,
boolean rightButton)
clickInCell in class baseTablex - col of cell clicked iny - row of cell clicked inrightButton - if true, the cell click was with the right button
public void doubleClickInCell(int x,
int y)
doubleClickInCell in class baseTablex - col of cell double clicked iny - row of cell double clicked inpublic void unSelectAll()
unSelectAll in class baseTablepublic java.lang.Object getSelectedRow()
public void selectRow(java.lang.Object key,
boolean refreshTable)
key - The key to the row to be selectedpublic void unSelectRow()
public void clearCells()
clearCells in class baseTablepublic void newRow(java.lang.Object key)
key - A hashtable key to be used to refer to this row in the future
public void deleteRow(java.lang.Object key,
boolean repaint)
key - A hashtable key for the row to deleterepaint - true if the table should be redrawn after the row is deleted
public arlut.csd.JTable.tableCell getCell(java.lang.Object key,
int col)
key - A hashtable key for the row of the cellcol - Column number, range 0..# of columns - 1
public final void setCellText(java.lang.Object key,
int col,
java.lang.String cellText,
boolean repaint)
key - key to the row of the cell to be changedcol - column of the cell to be changedcellText - the text to place into cellrepaint - true if the table should be redrawn after changing cell
public final void setCellText(java.lang.Object key,
int col,
java.lang.String cellText,
java.lang.Object data,
boolean repaint)
key - key to the row of the cell to be changedcol - column of the cell to be changedcellText - the text to place into celldata - A piece of data to be held with this cell, will be used for sortingrepaint - true if the table should be redrawn after changing cell
public final java.lang.String getCellText(java.lang.Object key,
int col)
key - key to the row of the cellcol - column of the cell
public final void setCellAttr(java.lang.Object key,
int col,
arlut.csd.JTable.tableAttr attr,
boolean repaint)
key - key to the row of the cell to be changedcol - column of the cell to be changedattr - the tableAttr to assign to cellrepaint - true if the table should be redrawn after changing cell
public final arlut.csd.JTable.tableAttr getCellAttr(java.lang.Object key,
int col)
key - key to the row of the cellcol - column of the cell
public final void setCellFont(java.lang.Object key,
int col,
java.awt.Font font,
boolean repaint)
key - key to the row of the cellcol - column of the cellfont - the Font to assign to cell, may be null to use defaultrepaint - true if the table should be redrawn after changing cell
public final void setCellJust(java.lang.Object key,
int col,
int just,
boolean repaint)
key - key to the row of the cellcol - column of the celljust - the justification to assign to cellrepaint - true if the table should be redrawn after changing celltableAttr
public final void setCellColor(java.lang.Object key,
int col,
java.awt.Color color,
boolean repaint)
key - key to the row of the cellcol - column of the cellcolor - the Color to assign to cellrepaint - true if the table should be redrawn after changing cell
public final void setCellBackColor(java.lang.Object key,
int col,
java.awt.Color color,
boolean repaint)
key - key to the row of the cellcol - column of the cellcolor - the Color to assign to cellrepaint - true if the table should be redrawn after changing cellpublic boolean containsKey(java.lang.Object key)
key - key to look for in the tablepublic java.util.Enumeration keys()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class baseTable
public void resort(int column,
boolean repaint)
public void resort(int column,
boolean forward,
boolean repaint)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||