| Contents | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV | NEXT | SHOW LISTS | HIDE LISTS | ||
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----COM.Subrahmanyam.table.Table
Each column has a title displayed in the header at the top. The vertical scrollbar is displayed on the right.
| Field Summary | |
| static int | DOUBLE_CLICK
|
| static int | HILITE_COLUMN
|
| static int | HILITE_ELEMENT
|
| static int | HILITE_ROW
|
| static int | OUT_OF_FOCUS
|
| static int | SINGLE_CLICK
|
| Fields inherited from class java.awt.Component |
| BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Constructor Summary | |
| Table()
|
|
| Table(boolean multipleSelection)
|
|
| Table(boolean multipleSelection,
int clickMode)
|
|
| Method Summary | |
| void | addActionListener(java.awt.event.ActionListener actionListener)
|
| void | addColumn(java.lang.String title,
java.lang.String[] data)
|
| void | addColumn(int column,
java.lang.String title,
java.lang.String[] data)
|
| void | addItemListener(java.awt.event.ItemListener itemListener)
|
| void | addMouseListener(java.awt.event.MouseListener mouseListener)
|
| void | addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
|
| void | addRow(java.lang.String[] s)
|
| void | addRow(int r,
java.lang.String[] s)
|
| void | allowDrag(boolean allowDrag)
|
| void | allowMultipleSelections(boolean allowMultipleSelections)
|
| void | clear()
|
| void | clearAll()
|
| java.lang.String[] | deleteColumn(int c)
|
| java.lang.String[] | deleteRow(int r)
|
| int | getBottomRowIndex()
|
| int | getClickMode()
|
| java.lang.String | getElement(int row,
int column)
|
| java.awt.Font[] | getFonts()
|
| int | getHiliteMode()
|
| int | getNoColumns()
|
| int | getNoRows()
|
| int | getPageHeight()
|
| int[] | getScale()
|
| int | getSelColumnIndex()
|
| java.lang.Object[] | getSelectedObjects()
|
| TElement[] | getSelection()
|
| int | getSelRowIndex()
|
| int | getTopRowIndex()
|
| boolean | isElementSelected(int row,
int col)
|
| boolean | isEnabled()
|
| void | processComponentEvent(java.awt.event.ComponentEvent ce)
|
| void | removeActionListener(java.awt.event.ActionListener actionListener)
|
| void | removeItemListener(java.awt.event.ItemListener itemListener)
|
| void | removeMouseListener(java.awt.event.MouseListener ml)
|
| void | removeMouseMotionListener(java.awt.event.MouseMotionListener ml)
|
| void | repaint()
|
| void | selectColumn(int col)
|
| void | selectRow(int row)
|
| void | setClickMode(int m)
|
| void | setColors(java.awt.Color headFG,
java.awt.Color headBG,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
|
| void | setColors(int row,
int col,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
|
| void | setColumnColors(int col,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
|
| void | setElement(int row,
int column,
java.lang.String s)
|
| void | setElement(TElement element)
|
| void | setEnabled(boolean b)
|
| void | setFonts(java.awt.Font fh,
java.awt.Font fd)
|
| void | setHiliteMode(int m)
|
| void | setLineSpacing(double lineSpacing)
|
| void | setRowColors(int row,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
|
| void | setScale(int[] scaleArr)
|
| void | setSize(int width,
int height)
|
| void | showHorizontalSeparator(boolean s)
|
| void | showVerticalSeparator(boolean s)
|
| Methods inherited from class java.awt.Panel |
| addNotify |
| Methods inherited from class java.awt.Container |
| add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
| action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int HILITE_ROW
public static final int HILITE_COLUMN
public static final int HILITE_ELEMENT
public static final int SINGLE_CLICK
public static final int DOUBLE_CLICK
public static final int OUT_OF_FOCUS
| Constructor Detail |
public Table()
public Table(boolean multipleSelection)
multipleSelection
- If true, allows multiple selections in DOUBLE_CLICK mode.
public Table(boolean multipleSelection,
int clickMode)
multipleSelection
- If true allows multiple selections in DOUBLE_CLICK mode.
clickMode
- Should be one of SINGLE_CLICK,
DOUBLE_CLICK.
| Method Detail |
public void addActionListener(java.awt.event.ActionListener actionListener)
actionListener
- An action listener object.
public void addColumn(java.lang.String title,
java.lang.String[] data)
title
- Title of the column.
data
- String data.
public void addColumn(int column,
java.lang.String title,
java.lang.String[] data)
column
- Column index at which the new column is inserted.
title
- Title of the column.
data
- String data.
public void addItemListener(java.awt.event.ItemListener itemListener)
itemListener
- An item listener object.
public void addMouseListener(java.awt.event.MouseListener mouseListener)
mouseListener
- A mouse listener object.
public void addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
mouseMotionListener
- A mouse motion listener object.
public void addRow(java.lang.String[] s)
s
- String data.
public void addRow(int r,
java.lang.String[] s)
r
- Row index at which the new column is inserted.
s
- String data.
public void allowDrag(boolean allowDrag)
allowDrag
- If true allows column resize. Default is true.
public void allowMultipleSelections(boolean allowMultipleSelections)
allowMultipleSelections
- If true, in
DOUBLE_CLICK mode
multiple selections are allowed.
public void clear()
public void clearAll()
public java.lang.String[] deleteColumn(int c)
c
- Index of the column to delete.
public java.lang.String[] deleteRow(int r)
r
- index of the row to delete.
public int getClickMode()
public java.lang.String getElement(int row,
int column)
row
- Row index.
column
- Column index.
public java.awt.Font[] getFonts()
public int getHiliteMode()
public int getNoColumns()
public int getNoRows()
public int[] getScale()
public int getSelColumnIndex()
public java.lang.Object[] getSelectedObjects()
public int getSelRowIndex()
public TElement[] getSelection()
public int getBottomRowIndex()
public int getPageHeight()
public int getTopRowIndex()
public boolean isElementSelected(int row,
int col)
row
- Row index.
col
- Column index.
public boolean isEnabled()
public final void processComponentEvent(java.awt.event.ComponentEvent ce)
public void removeActionListener(java.awt.event.ActionListener actionListener)
public void removeItemListener(java.awt.event.ItemListener itemListener)
public void removeMouseListener(java.awt.event.MouseListener ml)
public void removeMouseMotionListener(java.awt.event.MouseMotionListener ml)
public final void repaint()
public final void setSize(int width,
int height)
width
- Width of the table.
height
- Height of the table.
public void selectColumn(int col)
col
- Column to be selected.
public void selectRow(int row)
row
- Row to be selected.
public void setClickMode(int m)
m
- Should be one of SINGLE_CLICK and DOUBLE_CLICK.
public void setColors(java.awt.Color headFG,
java.awt.Color headBG,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
headFG
- Foreground color for the header.
headBG
- Background color for the header.
dataFG
- Foreground color for the data.
dataBG
- Background color for the data.
revDataFG
- Reverse foreground color for the data.
revDataBG
- Reverse background color for the data.
public void setColors(int row,
int col,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
row
- Row.
col
- Column.
dataFG
- Foreground color for the data.
dataBG
- Background color for the data.
revDataFG
- Reverse foreground color for the data.
revDataBG
- Reverse background color for the data.
public void setColumnColors(int col,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
col
- Column.
dataFG
- Foreground color for the data.
dataBG
- Background color for the data.
revDataFG
- Reverse foreground color for the data.
revDataBG
- Reverse background color for the data.
public void setElement(int row,
int column,
java.lang.String s)
row
- Row index.
column
- Column index.
s
- String data.
public void setElement(TElement element)
element
- COM.Subrahmanyam.table.TElement object containing the row,
column and string data.
public void setEnabled(boolean b)
public void setFonts(java.awt.Font fh,
java.awt.Font fd)
fh
- Font for the header.
fd
- Font for the data area.
public void setHiliteMode(int m)
public void setLineSpacing(double lineSpacing)
lineSpacing
- A double value. A value of 1.0 means single-spaced
rows.
public void setRowColors(int row,
java.awt.Color dataFG,
java.awt.Color dataBG,
java.awt.Color revDataFG,
java.awt.Color revDataBG)
row
- Row.
dataFG
- Foreground color for the data.
dataBG
- Background color for the data.
revDataFG
- Reverse foreground color for the data.
revDataBG
- Reverse background color for the data.
public void setScale(int[] scaleArr) throws java.lang.IllegalArgumentException
scaleArr
- An array of integers. Length must be equal to the number
of columns. Otherwise throws the run-time exception
java.lang.IllegalArgumentException.
public void showHorizontalSeparator(boolean s)
s
- true shows horizontal separator between columns. false hides
horizontal separators.
public void showVerticalSeparator(boolean s)
s
- true shows vertical separator between columns. false hides
vertical separators.
| Contents | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV | NEXT | SHOW LISTS | HIDE LISTS | ||