|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
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 | +--com.klg.jclass.table.JCTable
The core JClass LiveTable class; JCTable
is the base
class for all the Beans, and contains the majority
of the programmatic API for JClass LiveTable.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected Vector |
actions
|
protected com.klg.jclass.table.AdjustmentHandler |
adjustmentHandler
|
protected int |
allow_cell_resize
|
protected int |
allow_resize_by
|
protected boolean |
auto_edit
|
protected int |
auto_scroll
|
protected int |
cell_border_width
|
protected com.klg.jclass.table.CellAreaHandler |
cellAreaHandler
|
protected com.klg.jclass.util.JCListenerList |
cellDisplayListeners
|
protected com.klg.jclass.table.CellLayoutModel |
cellLayout
|
protected CellRendererPane |
cellRendererPane
|
protected com.klg.jclass.table.SeriesModel |
cellStyles
|
protected boolean |
column_label_display
|
protected int |
column_label_offset
|
protected int |
column_label_placement
|
protected com.klg.jclass.table.RowColumnSeriesModel |
columnWidths
|
protected int |
component_border_width
|
protected int |
current_column
|
protected int |
current_row
|
protected com.klg.jclass.table.DataViewModel |
dataView
|
protected com.klg.jclass.table.CellStyleModel |
default_cell_style
|
protected com.klg.jclass.table.CellStyleModel |
default_label_style
|
protected int |
edit_height_policy
|
protected int |
edit_width_policy
|
protected com.klg.jclass.util.JCListenerList |
editCellListeners
|
protected Color |
focus_color
|
protected int |
focus_indicator
|
protected com.klg.jclass.table.FocusModel |
focusManager
|
protected com.klg.jclass.table.CellBorderModel |
frame_border
|
protected int |
frame_border_width
|
protected int |
frozen_column_placement
|
protected int |
frozen_columns
|
protected int |
frozen_row_placement
|
protected int |
frozen_rows
|
protected JScrollBar |
hsb
|
protected int |
hsb_attach
|
protected int |
hsb_display
|
protected int |
hsb_offset
|
protected int |
hsb_position
|
protected int |
hsb_track
|
protected int |
hsb_track_row
|
protected boolean |
ignore_container_size
|
protected int |
jump_mode
|
protected com.klg.jclass.table.KeyInputHandler |
keyHandler
|
protected int |
left_column
|
protected int |
margin_height
|
protected int |
margin_width
|
protected int |
min_cell_visibility
|
protected com.klg.jclass.table.MouseInputHandler |
mouseHandler
|
protected Object |
mouseWheelListener
|
protected Vector |
moveables
|
protected boolean |
needs_initial_set_left_check
|
protected boolean |
needs_initial_set_top_check
|
protected boolean |
needs_initial_traverse
|
protected Component |
oldFocusOwner
|
protected com.klg.jclass.util.JCListenerList |
paintListeners
|
protected boolean |
pointer_traverse_forces_edit
|
protected com.klg.jclass.table.TablePopupMenu |
popupMenu
|
protected boolean |
popupMenuEnabled
|
protected boolean |
repaint_enabled
|
protected boolean |
resize_even
|
protected boolean |
resize_interactive
|
protected com.klg.jclass.util.JCListenerList |
resizeListeners
|
protected com.klg.jclass.util.JCListenerList |
resizeMotionListeners
|
protected boolean |
row_label_display
|
protected int |
row_label_offset
|
protected int |
row_label_placement
|
protected com.klg.jclass.table.RowColumnSeriesModel |
rowHeights
|
protected boolean |
scrolling
|
protected com.klg.jclass.util.JCListenerList |
scrollListeners
|
protected boolean |
select_include_labels
|
protected Color |
selected_background
|
protected int |
selected_background_mode
|
protected Color |
selected_foreground
|
protected int |
selected_foreground_mode
|
protected com.klg.jclass.table.SelectionModel |
selectionHandler
|
protected com.klg.jclass.util.JCListenerList |
selectListeners
|
protected boolean |
set_initial_left
|
protected boolean |
set_initial_top
|
protected boolean |
set_left_column
|
protected boolean |
set_top_row
|
protected int |
sort_column
|
protected int |
sort_direction
|
protected boolean |
sort_series
|
protected com.klg.jclass.util.JCListenerList |
sortListeners
|
protected com.klg.jclass.table.SpanHandler |
spanHandler
|
protected Image |
store_image
|
protected boolean |
store_image_enabled
|
protected Point |
store_origin
|
protected com.klg.jclass.table.TableChangeHandler |
tableChangeHandler
|
protected com.klg.jclass.table.TableLayout |
tableLayout
|
protected int |
top_row
|
protected Color |
track_background
|
protected boolean |
track_cursor
|
protected Color |
track_foreground
|
protected Dimension |
track_size
|
protected boolean |
traverse_cycle
|
protected com.klg.jclass.util.JCListenerList |
traverseListeners
|
protected com.klg.jclass.table.SeriesModel |
userData
|
protected int |
variable_estimate_count
|
protected int |
visible_columns
|
protected int |
visible_rows
|
protected JScrollBar |
vsb
|
protected int |
vsb_attach
|
protected int |
vsb_display
|
protected int |
vsb_offset
|
protected int |
vsb_position
|
protected int |
vsb_track
|
protected int |
vsb_track_column
|
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 | |
JCTable()
|
Method Summary | |
void |
actionPerformed(ActionEvent event)
Processes table popup menu actions. |
void |
addAction(com.klg.jclass.table.ActionInitiator initiator,
int action)
Adds an ActionInitiator /action pair to table (stored in a
TableAction ). |
void |
addAction(com.klg.jclass.table.TableAction tableAction)
Adds a TableAction to table. |
void |
addCellDisplayListener(com.klg.jclass.table.JCCellDisplayListener l)
Adds the specified listener to receive instances of JCCellDisplayEvent objects. |
boolean |
addColumnSelection(int start_column,
int end_column)
Adds a range of columns to the current selection. |
void |
addEditCellListener(com.klg.jclass.table.JCEditCellListener l)
Adds the specified listener to receive instances of JCEditCellEvent objects. |
void |
addNotify()
|
void |
addPaintListener(com.klg.jclass.table.JCPaintListener l)
Adds the specified listener to receive instances of JCPaintEvent objects. |
void |
addResizeCellListener(com.klg.jclass.table.JCResizeCellListener l)
Adds the specified listener to receive instances of JCResizeCellEvent objects. |
void |
addResizeCellMotionListener(com.klg.jclass.table.JCResizeCellMotionListener l)
Adds the specified listener to receive instances of JCResizeCellEvent objects during the resize drag
process. |
boolean |
addRowSelection(int start_row,
int end_row)
Adds a range of rows to the current selection. |
void |
addScrollListener(com.klg.jclass.table.JCScrollListener l)
Adds the specified listener to receive instances of JCScrollEvent objects. |
boolean |
addSelection(int start_row,
int start_column,
int end_row,
int end_column)
Adds a range of cells to the current selection. |
void |
addSelectListener(com.klg.jclass.table.JCSelectListener l)
Adds the specified listener to receive instances of JCSelectEvent objects. |
void |
addSortListener(com.klg.jclass.table.JCSortListener l)
Adds the specified listener to receive instances of JCSortEvent objects. |
void |
addSpannedRange(com.klg.jclass.table.JCCellRange cr)
Adds a JCCellRange as a new spanned region. |
void |
addTableMouseWheelListener(Object listener)
Adds the given MouseWheelListener to the table. |
protected void |
addToMoveables(Object newMoveable,
Object oldMoveable)
Adds to the moveables collection. |
void |
addTraverseCellListener(com.klg.jclass.table.JCTraverseCellListener l)
Adds the specified listener to receive instances of JCTraverseCellEvent objects. |
boolean |
beginEdit(int row,
int column)
Initiates edit for the given cell, if the cell is editable. |
boolean |
cancelEdit(boolean hide)
Cancels interactive editing of a cell and, as an option, hides the cell editor. |
void |
clearSelectedCells()
Deselects all selected cells. |
void |
clearSelection()
Clears all selections. |
void |
clearSpannedRanges()
Removes all spanned cell ranges. |
com.klg.jclass.table.SeriesModel |
cloneCellStyles()
If possible, creates a clone of the cell style container stored in this table object and returns them to the caller. |
boolean |
commitEdit(boolean hide)
Commits interactive cell editing internally, saving any changes made by the user. |
protected com.klg.jclass.table.CellStyleModel |
createCellStyle()
Creates a new cell style object. |
protected void |
createDefaultCellLayout()
Creates the default CellLayoutModel manager. |
protected void |
createDefaultCellStyleSeries()
Creates the default CellStyleModel series object. |
protected void |
createDefaultColumnWidthSeries()
Creates the default column width series. |
protected void |
createDefaultDataSource()
Creates the default data source with 10 rows and 5 columns. |
protected void |
createDefaultDataView()
Creates the default data view manager. |
protected void |
createDefaultRowHeightSeries()
Creates the default row height series. |
protected void |
createDefaultSelectionModel()
Creates the default SelectionModel manager. |
protected void |
createDefaultSpanHandler()
Creates the default span manager. |
protected void |
createDefaultUserDataSeries()
Creates the default UserData series object. |
protected com.klg.jclass.table.TablePopupMenu |
createPopupMenu()
Creates a new popup menu. |
void |
dispose()
Ensures that JCTable can be disposed. |
void |
doLayout()
|
protected com.klg.jclass.table.JCResizeCellEvent |
doResizeEvents(int row,
int column,
int oldWidth,
int oldHeight,
int newWidth,
int newHeight)
Convenience method for firing BEFORE_RESIZE and
AFTER_RESIZE events. |
boolean |
dragColumn(int column1,
int column2)
Allows users to drag a column and drop it into a new location by remapping the internal order of columns. |
boolean |
dragRow(int row1,
int row2)
Allows users to drag a row and drop it into a new location by remapping the internal order of rows. |
protected Method |
findMethod(Class c,
String methodString)
Does passed in class have the given method name? If so, returns it. |
protected void |
fireJCCellDisplayEvent(com.klg.jclass.table.JCCellDisplayEvent event)
Convenience method for firing JCCellDisplayEvents . |
protected void |
fireJCEditCellEvent(com.klg.jclass.table.JCEditCellEvent event)
Convenience method for firing JCEditCellEvents . |
protected void |
fireJCPaintEvent(com.klg.jclass.table.JCPaintEvent event)
Convenience method for firing JCPaintEvents . |
protected void |
fireJCResizeCellEvent(com.klg.jclass.table.JCResizeCellEvent event)
Convenience method for firing JCResizeCellEvents . |
protected void |
fireJCResizeCellMotionEvent(com.klg.jclass.table.JCResizeCellEvent event)
Convenience method for firing JCResizeCellEvents to
JCResizeCellMotionListeners . |
protected void |
fireJCScrollEvent(com.klg.jclass.table.JCScrollEvent event)
Convenience method for firing JCScrollEvents . |
protected void |
fireJCSelectEvent(com.klg.jclass.table.JCSelectEvent event)
Convenience method for firing JCSelectEvents . |
protected void |
fireJCSortEvent(com.klg.jclass.table.JCSortEvent event)
Convenience method for firing JCSortEvents . |
protected void |
fireJCTraverseCellEvent(com.klg.jclass.table.JCTraverseCellEvent event)
Convenience method for firing JCTraverseCellEvents . |
void |
focusGained(FocusEvent event)
This method gets called when table gains focus. |
void |
focusLost(FocusEvent event)
This method gets called when table loses focus. |
int |
getAction(AWTEvent event,
int row,
int column)
Returns the action mapped to the given event. |
int |
getAllowCellResize()
Gets the table's AllowCellResize value. |
int |
getAllowResizeBy()
Gets the table's AllowResizeBy value to determine whether
row height and column width can be resized by labels, cells, or both. |
int |
getAutoScroll()
Gets the table's AutoScroll value. |
com.klg.jclass.table.CellAreaHandler |
getCellAreaHandler()
Returns the CellArea handler, which manages the creation and removal of
CellAreas within the table. |
int |
getCellBorderWidth()
Gets the table's CellBorderWidth value. |
Rectangle |
getCellBounds(int row,
int column)
Returns the bounds of a cell. |
com.klg.jclass.table.CellLayoutModel |
getCellLayout()
Returns the CellLayout manager. |
Point |
getCellPosition(int row,
int column)
Returns the position of the top-left corner of a cell. |
com.klg.jclass.table.CellStyleModel |
getCellStyle(int row,
int column)
Gets the cell's CellStyleModel value. |
Collection |
getCellStyleRanges(com.klg.jclass.table.CellStyleModel style)
Returns a Collection of JCCellRanges that use the given
CellStyleModel . |
Collection |
getCellStyles()
Returns a unique Collection of CellStyleModel instances used in table. |
List |
getCellStyleValues()
Returns a list of CellStyle series values. |
int |
getCharHeight(int row)
Returns the CharHeight value for a row. |
int |
getCharWidth(int column)
Returns the CharWidth value for a column. |
protected com.klg.jclass.table.CellSize |
getColumnCellSize(int column)
Returns the CellSize object for a column. |
protected Class |
getColumnClass(int column)
Databound subclasses of table can override this method to return the correct datatype for the column. |
int |
getColumnLabelOffset()
Gets the table's ColumnLabelOffset value. |
int |
getColumnLabelPlacement()
Gets the table's ColumnLabelPlacement value. |
int |
getColumnPixelWidth(int column)
Returns the actual pixel width for a column. |
List |
getColumnWidthValues()
Returns a list of column width series values. |
Component |
getComponent(int row,
int column)
Gets the Component located at the given cell. |
int |
getComponentBorderWidth()
Returns the spacing between the border of a cell and a cell component. |
protected com.klg.jclass.table.ComponentModel |
getComponentModel()
Returns the component handler which manages components in cells. |
com.klg.jclass.table.JCCellPosition |
getCurrentCell()
Gets the current cell in the table. |
int |
getCurrentColumn()
Gets the current column in the table. |
int |
getCurrentRow()
Gets the current row in the table. |
com.klg.jclass.table.TableDataModel |
getDataSource()
Returns the table data source. |
com.klg.jclass.table.DataViewModel |
getDataView()
Returns the data view which controls access to data and table notification when data changes. |
com.klg.jclass.table.CellStyleModel |
getDefaultCellStyle()
Returns the default cell style, if set. |
com.klg.jclass.table.CellStyleModel |
getDefaultLabelStyle()
Returns the default label style, if set. |
int |
getEditHeightPolicy()
Returns the vertical sizing policy for cell editors. |
Component |
getEditingComponent()
Gets the component associated with the currently displayed editor. |
com.klg.jclass.table.EditTraverseHandler |
getEditTraverseHandler()
Returns the edit handler for the table, which manages editors within cells. |
int |
getEditWidthPolicy()
Returns the horizontal sizing policy for cell editors. |
Color |
getFocusColor()
Returns the focus color. |
int |
getFocusIndicator()
Returns the focus indicator type. |
com.klg.jclass.table.FocusModel |
getFocusManager()
Returns the current FocusManager . |
com.klg.jclass.table.CellBorderModel |
getFrameBorder()
Gets the table's FrameBorderWidth value as a
CellBorderModel . |
int |
getFrameBorderWidth()
Gets the table's FrameBorderWidth value. |
int |
getFrozenColumnPlacement()
Gets the table's FrozenColumnPlacement value. |
int |
getFrozenColumns()
Gets the table's FrozenColumns value. |
int |
getFrozenRowPlacement()
Gets the table's FrozenRowPlacement value. |
int |
getFrozenRows()
Gets the table's FrozenRows value. |
JScrollBar |
getHorizSB()
Gets the horizontal scrollbar. |
int |
getHorizSBAttachment()
Gets the tables HorizSBAttachment value. |
int |
getHorizSBDisplay()
Gets the table's HorizSBDisplay value to determine when to
display scrollbars. |
int |
getHorizSBOffset()
Gets the table's HorizSBOffset value. |
int |
getHorizSBPosition()
Gets the table's HorizSBPosition value. |
int |
getHorizSBTrack()
Gets the table's HorizSBTrack value. |
int |
getHorizSBTrackRow()
Gets the row number that determines the text to display when the track indicator is displayed. |
int |
getJumpScroll()
Gets the table's JumpScroll value. |
com.klg.jclass.table.KeyInputHandler |
getKeyInputHandler()
Returns the key input manager for the table. |
int |
getLeftColumn()
Gets the table's LeftColumn value. |
String |
getLicense()
|
int |
getMarginHeight()
Gets the table's MarginHeight value. |
int |
getMarginWidth()
Gets the table's MarginWidth value. |
int |
getMaxHeight(int row)
Returns the MaxHeight value for a row. |
int |
getMaxWidth(int column)
Returns the MaxWidth value for a column. |
int |
getMinCellVisibility()
Gets the table's MinCellVisibility value. |
int |
getMinHeight(int row)
Returns the MinHeight value for a row. |
Dimension |
getMinimumSize()
|
int |
getMinWidth(int column)
Returns the MinWidth value for a column. |
com.klg.jclass.table.MouseInputHandler |
getMouseInputHandler()
Returns the mouse input manager for the table. |
int |
getNumColumns()
Gets the number of columns in the table from the data source. |
int |
getNumRows()
Gets the number of rows in the table from the data source. |
int |
getNumVisibleColumns()
Gets the number of visible columns. |
int |
getNumVisibleRows()
Gets the number of visible rows. |
int |
getPixelHeight(int row)
Returns the PixelHeight value for a row, previous set using
setPixelHeight . |
int |
getPixelWidth(int column)
Returns the PixelWidth value for a column, previously set using
setPixelWidth . |
boolean |
getPointerTraverseForcesEdit()
Gets the value of the PointerTraverseForcesEdit property. |
com.klg.jclass.table.JCCellPosition |
getPosition(Component c)
Returns the JCCellPosition of the given component in table. |
Dimension |
getPreferredSize()
|
protected com.klg.jclass.table.CellSize |
getRowCellSize(int row)
Returns copy of the CellSize object for a row. |
List |
getRowHeightValues()
Returns a list of row height series values. |
int |
getRowLabelOffset()
Gets the table's RowLabelOffset value. |
int |
getRowLabelPlacement()
Gets the table's RowLabelPlacement value. |
int |
getRowPixelHeight(int row)
Returns the actual pixel height for a row. |
Color |
getSelectedBackground()
Gets the table's SelectedBackground value. |
int |
getSelectedBackgroundMode()
Gets the table's SelectedBackgroundMode value. |
Collection |
getSelectedCells()
Gets the table's SelectedCells value. |
Color |
getSelectedForeground()
Gets the table's SelectedForeground value. |
int |
getSelectedForegroundMode()
Gets the table's SelectedForegroundMode value. |
boolean |
getSelectIncludeLabels()
Gets the table's SelectIncludeLabels value. |
com.klg.jclass.table.SelectionModel |
getSelectionModel()
Returns the SelectionModel manager. |
int |
getSelectionPolicy()
Gets the table's SelectionPolicy value. |
com.klg.jclass.table.SpanHandler |
getSpanHandler()
Returns the span manager. |
com.klg.jclass.table.JCCellRange |
getSpannedRange(int row,
int column)
Returns a JCCellRange that represents that the spanned region
contains the given row and column. |
Collection |
getSpannedRanges()
Returns a Collection containing all of the spanned cell ranges. |
com.klg.jclass.table.TableLayout |
getTableLayout()
Returns the TableLayout manager. |
protected int |
getTextHeightOffset()
Returns the vertical offset of cell text based on the margin and border. |
protected int |
getTextWidthOffset()
Returns the horizontal offset of cell text based on the margin and border. |
int |
getTopRow()
Gets the table's TopRow value. |
Color |
getTrackBackground()
Returns the background color of the track component. |
Color |
getTrackForeground()
Returns the foreground color of the track component. |
Dimension |
getTrackSize()
Returns the dimensions of the component that tracks horizontal or vertical scrollbar info. |
com.klg.jclass.table.JCTableUI |
getUI()
Returns the UI for JCTable . |
String |
getUIClassID()
Returns the UIClass ID for JCTable . |
com.klg.jclass.table.CellStyleModel |
getUniqueCellStyle(int row,
int column)
Gets a unique instance of the cell's CellStyleModel value. |
Object |
getUserData(int row,
int column)
Gets the cell's UserData value. |
int |
getVariableEstimateCount()
Returns the number of cells to use in estimating variable pixel calculations. |
JScrollBar |
getVertSB()
Gets the vertical scrollbar. |
int |
getVertSBAttachment()
Gets the tables VertSBAttachment value. |
int |
getVertSBDisplay()
Gets the table's VertSBDisplay value to determine when to
display scrollbars. |
int |
getVertSBOffset()
Gets the table's VertSBOffset value. |
int |
getVertSBPosition()
Gets the table's VertSBPosition value. |
int |
getVertSBTrack()
Gets the table's VertSBTrack value. |
int |
getVertSBTrackColumn()
Gets the column number that determines the text to display when the track indicator is displayed. |
com.klg.jclass.table.JCCellRange |
getVisibleCells()
Returns the range of scrollable cells that are currently visible. |
int |
getVisibleColumns()
Gets the number of non-frozen columns visible in the table. |
int |
getVisibleRows()
Gets the number of non-frozen rows visible in the table. |
protected void |
goToRow()
Displays a dialog box to select a row to traverse to. |
boolean |
hasComponent(int row,
int column)
Returns true if the cell contains a component. |
boolean |
hasComponents()
Returns true if there are components in table. |
protected void |
hideShowColumns(boolean hide)
Displays a dialog box to select columns to show or hide. |
boolean |
isAutoEdit()
Gets the table's AutoEdit value. |
static boolean |
isCell(int row,
int column)
Returns true if the row and column consititute a valid cell. |
boolean |
isCellVisible(int row,
int column)
Returns true if the given cell is visible. |
boolean |
isColumnHidden(int column)
Returns true if the column is hidden. |
static boolean |
isColumnLabel(int row,
int column)
Returns true if the row and column consititute a valid column
label. |
boolean |
isColumnLabelDisplay()
Gets the table's ColumnLabelDisplay value. |
boolean |
isColumnVisible(int column)
Returns true if the given column is visible. |
boolean |
isContentClipped(int row,
int column)
Returns true if the full content of the cell is not displayed
because of the size of the cell. |
boolean |
isCurrentCell(int row,
int column)
Returns true if the given row and column is the current cell. |
boolean |
isEditable(int row,
int column)
Returns true if the given cell is editable. |
boolean |
isFocusTraversable()
Overrides JComponent.isFocusTraversable and returns
true , indicating that the table is a focusable component. |
boolean |
isIgnoreContainerSize()
Gets the table's IgnoreContainerSize value. |
static boolean |
isLabel(int row,
int column)
Returns true if the row and column constitute a valid label. |
boolean |
isPopupMenuEnabled()
Gets the table's PopupMenuEnabled value. |
protected boolean |
isRecalcRequired()
Returns true if a recalc is required. |
protected boolean |
isRelayoutRequired()
Returns true if a relayout is required. |
boolean |
isRepaintEnabled()
Gets the table's RepaintEnabled value. |
protected boolean |
isRepaintRequired()
Returns true if repaint is required. |
boolean |
isResizable(int row,
int column)
|
boolean |
isResizeEven()
Gets the table's ResizeEven value to determine whether all
column widths or row heights are resized to the same value. |
boolean |
isResizeInteractive()
Gets the table's ResizeInteractive value to determine
whether table repaints during the resize of a column or row. |
boolean |
isRowHidden(int row)
Returns true if the row is hidden. |
static boolean |
isRowLabel(int row,
int column)
Returns true if the row and column constitute a valid row label. |
boolean |
isRowLabelDisplay()
Gets the table's RowLabelDisplay value. |
boolean |
isRowVisible(int row)
Returns true if the given row is visible. |
boolean |
isSelected(int row,
int column)
Determines whether the cell is selected. |
boolean |
isSeriesDataSorted()
Returns true if series data (styles, cell dimensions, and so on)
are maintained in sync with data when it is sorted. |
boolean |
isStoreImageEnabled()
Returns true if an image of table is maintained offscreen. |
boolean |
isTrackCursor()
Gets the table's TrackCursor value to determine whether the
mouse pointer is being tracked as the user moves the mouse. |
boolean |
isTracking()
Returns the scrollbar tracking state. |
boolean |
isTraversable(int row,
int column)
Returns true if the given cell is traversable. |
boolean |
isTraverseCycle()
Returns the TraverseCycle value for the table. |
protected boolean |
isValidCell(int row,
int column)
Returns true if the given cell is valid. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
void |
layoutAreas()
|
boolean |
makeColumnVisible(int column)
Scrolls a column so it is visible on the screen. |
boolean |
makeRowVisible(int row)
Scrolls a row so it is visible on the screen. |
boolean |
makeVisible(int row,
int column)
Scrolls a frozen or non-frozen cell or label so it is visible on the screen. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
paintComponent(Graphics gc)
|
protected void |
processKeyEvent(KeyEvent e)
|
protected void |
processMouseEvent(MouseEvent e)
|
protected void |
processMouseMotionEvent(MouseEvent e)
|
void |
removeAction(com.klg.jclass.table.ActionInitiator initiator,
int action)
Removes an ActionInitiator /action pair from table. |
void |
removeAction(int action)
Removes any ActionInitiator set for the given action type. |
void |
removeAction(com.klg.jclass.table.TableAction tableAction)
Removes an action from table. |
void |
removeAllActions()
Removes all actions from table. |
void |
removeCellDisplayListener(com.klg.jclass.table.JCCellDisplayListener l)
Removes the specified listener so it no longer receives JCCellDisplayEvent objects. |
void |
removeEditCellListener(com.klg.jclass.table.JCEditCellListener l)
Removes the specified listener so it no longer receives JCEditCellEvent objects. |
void |
removePaintListener(com.klg.jclass.table.JCPaintListener l)
Removes the specified listener so it no longer receives JCPaintEvent objects. |
void |
removeResizeCellListener(com.klg.jclass.table.JCResizeCellListener l)
Removes the specified listener so it no longer receives JCResizeCellListener objects. |
void |
removeResizeCellMotionListener(com.klg.jclass.table.JCResizeCellMotionListener l)
Removes the specified listener so it no longer receives JCResizeCellMotionListener objects. |
void |
removeScrollListener(com.klg.jclass.table.JCScrollListener l)
Removes the specified listener so it no longer receives JCScrollListener objects. |
void |
removeSelectListener(com.klg.jclass.table.JCSelectListener l)
Removes the specified listener so it no longer receives JCSelectEvent objects. |
void |
removeSortListener(com.klg.jclass.table.JCSortListener l)
Removes the specified listener so it no longer receives JCSortListener objects. |
void |
removeSpannedRange(com.klg.jclass.table.JCCellRange cr)
Removes a cell range for the list of spanned ranges. |
void |
removeTableMouseWheelListener()
Removes the current mouse wheel listener. |
void |
removeTraverseCellListener(com.klg.jclass.table.JCTraverseCellListener l)
Removes the specified listener so it no longer receives JCTraverseCellListener objects. |
void |
repaintSelected()
|
protected void |
requestChange(int flags)
Sends a request to process a change. |
protected void |
requestChange(int flags,
int row,
int column)
Sends a request to process a change for the given row and column. |
protected void |
requestChange(int flags,
com.klg.jclass.table.JCCellRange cr)
Sends a request to process a change for a range of cells. |
void |
requestFocus()
Overridden to record the old focus owner when table requests focus. |
void |
resetSortedRows()
Resets the internal row mapping array used for sorted rows. |
void |
resetSwappedColumns()
Resets the internal column mapping array. |
void |
resetSwappedRows()
Resets the internal row mapping array. |
void |
reshape(int x,
int y,
int width,
int height)
|
boolean |
selectAll()
Selects all cells. |
void |
setAllowCellResize(int value)
Sets how an end-user can interactively resize rows/columns. |
void |
setAllowResizeBy(int value)
If set to JCTableEnum.RESIZE_BY_LABELS , a user can only
resize the column widths and row heights by resizing the respective
row or column's label. |
void |
setAutoEdit(boolean value)
If true , the table automatically displays an editor when a cell
is entered. |
void |
setAutoScroll(int value)
Sets how the table scrolls when the user selects cells or drags the mouse past the bounds of the table. |
void |
setCellBorderWidth(int value)
Sets the width of the borders surrounding each cell and label (default is 1 ). |
void |
setCellEditor(Class cellType,
Class editor)
Creates a mapping between a cell type (for example, class) and an editing object. |
void |
setCellEditor(Class cellType,
com.klg.jclass.cell.JCCellEditor editor)
Creates a mapping between a cell type and an instance of an editing object. |
protected void |
setCellEditorMapping(Class cellType,
Object editor)
Creates a mapping between a cell type and an editor object or instance of an editing object. |
void |
setCellLayout(com.klg.jclass.table.CellLayoutModel cellLayout)
Sets the CellLayout manager. |
void |
setCellRenderer(Class cellType,
Class renderer)
Creates a mapping between a cell type and an renderering object. |
void |
setCellRenderer(Class cellType,
com.klg.jclass.cell.JCCellRenderer renderer)
Creates a mapping between a cell type and an instance of a renderering object. |
protected void |
setCellRendererMapping(Class cellType,
Object renderer)
Creates a mapping between a cell type and an renderer object or instance of an renderering object. |
void |
setCellStyle(int row,
int column,
com.klg.jclass.table.CellStyleModel style)
Sets the style for a cell (or list of cells). |
void |
setCellStyle(com.klg.jclass.table.JCCellRange cr,
com.klg.jclass.table.CellStyleModel style)
Sets the style for a range of cells. |
void |
setCellStyles(com.klg.jclass.table.SeriesModel sm)
Replaces the cell style container with the one provided. |
void |
setCharHeight(int row,
int value)
Sets the number of lines of text that a row can display (default is 1 ). |
void |
setCharWidth(int column,
int value)
Sets the number of characters of text that a column can display (default is 10). |
protected void |
setColumnCellSize(int column,
com.klg.jclass.table.CellSize value)
Sets the CellSize object for a column. |
void |
setColumnHidden(int column,
boolean value)
Hides or shows a given column. |
void |
setColumnLabelDisplay(boolean value)
Determines whether column labels are displayed. |
void |
setColumnLabelOffset(int value)
Sets the spacing between the column labels and the cell area in pixels (default is 0). |
void |
setColumnLabelPlacement(int value)
Sets the position of the column labels relative to the cells. |
boolean |
setColumnSelection(int start_column,
int end_column)
Selects a range of columns. |
protected void |
setColumnWidthChanged(int column)
Forces required calculations based on a change in the width for a column. |
void |
setComponent(int row,
int column,
Component component)
Sets a Component for the contents of the given cell. |
void |
setComponent(com.klg.jclass.table.JCCellRange cr,
Component component)
Sets a JComponent to span a range of cells. |
void |
setComponentBorderWidth(int value)
Sets the spacing between the border of a cell and a cell component. |
void |
setCurrentCell(int row,
int column)
Sets the current cell in the table given a row and column. |
protected void |
setCurrentCell(int row,
int column,
int direction)
Sets the current cell in the table given a row and column. |
void |
setCurrentCell(com.klg.jclass.table.JCCellPosition cell)
Sets the current cell in the table. |
void |
setCursor(int type)
Sets the global cursor when cursor tracking is off. |
void |
setDataSource(com.klg.jclass.table.TableDataModel tableData)
Sets the table data source. |
void |
setDataView(com.klg.jclass.table.DataViewModel dataView)
Sets a new data view manager. |
void |
setEditHeightPolicy(int value)
Specified how high the editing component of a cell should be when the user clicks on it. |
void |
setEditWidthPolicy(int value)
Specifies how wide the editing component of a cell should be when the user clicks on it. |
void |
setFocusColor(Color value)
Sets the focus color. |
void |
setFocusIndicator(int value)
Sets the focus indicator. |
void |
setFocusManager(com.klg.jclass.table.FocusModel focusManager)
Sets a new FocusManager . |
void |
setFrameBorder(com.klg.jclass.table.CellBorderModel value)
Sets the CellBorder model of the borders surrounding cell and
label areas (default is null). |
void |
setFrameBorderWidth(int value)
Sets the width of the borders surrounding cell and label areas (default is 0). |
void |
setFrozenColumnPlacement(int value)
Sets the location of all frozen columns within the component display. |
void |
setFrozenColumns(int value)
Sets the number of columns from the start of the table that are not horizontally scrollable (default is 0). |
void |
setFrozenRowPlacement(int value)
Sets the location of all frozen rows. |
void |
setFrozenRows(int value)
Sets the number of rows from the start of the table that are not vertically scrollable (default is 0). |
void |
setHorizSB(JScrollBar value)
Sets the horizontal scrollbar. |
void |
setHorizSBAttachment(int value)
Sets how the end of the horizontal scrollbar is attached to the table. |
void |
setHorizSBDisplay(int value)
Sets when to display the horizontal scrollbar. |
void |
setHorizSBOffset(int value)
Sets the distance (in pixels) between the horizontal scrollbar and the table (default is 0). |
void |
setHorizSBPosition(int value)
Sets how the horizontal scrollbar is attached to the table. |
void |
setHorizSBTrack(int value)
Sets how the horizontal scrollbar works during tracking. |
void |
setHorizSBTrackRow(int value)
Sets the row number that determines the text to display when the track indicator is displayed. |
void |
setIgnoreContainerSize(boolean value)
Determines whether the size of the table is determined by its container. |
void |
setJumpScroll(int value)
Sets the scrolling behavior of each scrollbar. |
void |
setLeftColumn(int value)
Sets the non-frozen column at least partially visible at the left side of the window. |
void |
setLicense(String s)
|
void |
setMarginHeight(int value)
Sets the distance (in pixels) between the inside edge of the cell border and the top and bottom edge of the cell's contents (default it 2). |
void |
setMarginWidth(int value)
Sets the distance (in pixels) between the inside edge of the cell border and the left/right edge of the cell's contents (default is 3). |
void |
setMaxHeight(int row,
int value)
Sets the maximmum number of pixels for a row. |
void |
setMaxWidth(int column,
int value)
Sets the maximmum number of pixels for a column. |
void |
setMinCellVisibility(int value)
Sets the minimum amount of a cell that is made visible when edited. |
void |
setMinHeight(int row,
int value)
Sets the minimum number of pixels for a row. |
void |
setMinWidth(int column,
int value)
Sets the minimum number of pixels for a column. |
void |
setPixelHeight(int row,
int value)
Sets the height of a row in pixels. |
void |
setPixelWidth(int column,
int value)
Sets the width of a column in pixels. |
void |
setPointerTraverseForcesEdit(boolean nval)
Sets the value of the PointerTraverseForcesEdit property. |
void |
setPopupMenuEnabled(boolean b)
Sets the table's PopupMenuEnabled value. |
protected void |
setRecalcRequired(boolean value)
If set to true , this method forces JClass LiveTable
to recalculate all internal dimensions when
setRepaintEnabled() is set back to true . |
protected void |
setRelayoutRequired(boolean value)
If set to true , this method forces JClass LiveTable to relayout
its contents when setRepaintEnabled() is set back to
true . |
void |
setRepaintEnabled(boolean value)
Sets whether the table should be redrawn and recomputed whenever one of its properties is set (default is true ). |
protected void |
setRepaintRequired(boolean value)
If set to true , this method forces JClass LiveTable
to repaint the entire contents when setRepaintEnabled()
is set back to true . |
void |
setResizeEven(boolean value)
If set to true , when a column width or row height is changed
interactively, all columns or rows are resized to the same value. |
void |
setResizeInteractive(boolean value)
If set to true , when a column width or row height is changed
interactively, table is repainted to reflect the new value during
the drag event. |
protected void |
setRowCellSize(int row,
com.klg.jclass.table.CellSize value)
Sets the CellSize object for a row. |
protected void |
setRowHeightChanged(int row)
Forces required calculations based on a change in the height of a row. |
void |
setRowHidden(int row,
boolean value)
Hides or shows a given row. |
void |
setRowLabelDisplay(boolean value)
Determines whether row labels are displayed. |
void |
setRowLabelOffset(int value)
Sets the spacing between the row labels and the cell area in pixels (default is 0). |
void |
setRowLabelPlacement(int value)
Sets the position of the row labels relative to the cells. |
boolean |
setRowSelection(int start_row,
int end_row)
Selects a range of rows. |
void |
setSelectedBackground(Color value)
Sets the background color of user-selected cells (default is the cell's foreground color). |
void |
setSelectedBackgroundMode(int value)
Sets the table's SelectedBackgroundMode . |
boolean |
setSelectedCells(Collection v)
Sets the currently-selected ranges of cells. |
boolean |
setSelectedCells(com.klg.jclass.table.JCCellRange r)
Sets a range of selected cells. |
void |
setSelectedForeground(Color value)
Sets the foreground color of user-selected cells (default is the cell's background color). |
void |
setSelectedForegroundMode(int value)
Sets the table's SelectedForegroundMode . |
void |
setSelectIncludeLabels(boolean value)
Sets the selection behavior for row and column labels. |
boolean |
setSelection(int start_row,
int start_column,
int end_row,
int end_column)
Selects a range of cells. |
void |
setSelectionModel(com.klg.jclass.table.SelectionModel selectionHandler)
Sets the SelectionModel manager. |
void |
setSelectionPolicy(int value)
Sets the selection behavior allowed on the table, both by end-users and by the application. |
void |
setSeriesDataSorted(boolean value)
Sets whether series data (styles, cell dimensions, and so on) are maintained in sync with data when it is sorted. |
void |
setSpanHandler(com.klg.jclass.table.SpanHandler spanHandler)
Sets the span manager. |
void |
setSpannedRanges(Collection ranges)
Sets the spanned cell ranges to a Collection of JCCellRanges . |
void |
setStoreImageEnabled(boolean value)
Determines whether an image of table is maintained offscreen. |
void |
setTopRow(int value)
Sets the non-frozen row at least partially visible at the top of the window. |
void |
setTrackBackground(Color value)
Sets the background color of the component that displays horizontal or vertical scrollbar tracking info. |
void |
setTrackCursor(boolean value)
Sets whether the mouse pointer should be tracked as a user moves the mouse across the table. |
void |
setTrackForeground(Color value)
Sets the foreground color of the component that display horizontal or vertical scrollbar tracking info. |
void |
setTrackSize(Dimension value)
Sets the dimensions of the component that tracks horizontal or vertical scrollbar info. |
void |
setTraverseCycle(boolean value)
Determines whether table traverses to the opposite side when the left, top, right, or bottom cell is reached. |
void |
setUI(ComponentUI newUI)
Sets the UI for JCTable . |
void |
setUserData(int row,
int column,
Object value)
Sets the user data for a cell. |
void |
setUserData(com.klg.jclass.table.JCCellRange cr,
Object value)
Sets the user data for a range of cells. |
void |
setVariableEstimateCount(int value)
Sets the number of cells to use in estimating variable pixel calculations. |
void |
setVertSB(JScrollBar value)
Sets the vertical scrollbar. |
void |
setVertSBAttachment(int value)
Sets how the end of the vertical scrollbar is attached to the table. |
void |
setVertSBDisplay(int value)
Sets when to display the vertical scrollbar. |
void |
setVertSBOffset(int value)
Sets the distance (in pixels) between the vertical scrollbar and the table (default is 0). |
void |
setVertSBPosition(int value)
Sets how the vertical scrollbar is attached to the table. |
void |
setVertSBTrack(int value)
Sets how the vertical scrollbar works during tracking. |
void |
setVertSBTrackColumn(int value)
Sets the column number that determines the text to display when the track indicator is displayed. |
void |
setVisibleColumns(int value)
Sets the number of non-frozen columns used to determine the preferred size of the table. |
void |
setVisibleRows(int value)
Sets the number of non-frozen rows used to determine the preferred size of the table. |
protected boolean |
showPopupMenu(int x,
int y)
Displays the popup menu at the given coordinates. |
boolean |
sortByColumn(int[] column,
int[] direction)
Sorts the rows in a table based on multiple columns and direction. |
boolean |
sortByColumn(int[] column,
int[] direction,
int start_row,
int end_row)
Sorts a range of rows in the table based on multiple columns and directions. |
boolean |
sortByColumn(int column,
int direction)
Sorts the rows in the table based on a specified column and direction. |
boolean |
sortByColumn(int column,
int direction,
int start_row,
int end_row)
Sorts a range of rows in the table based on a specified column and direction. |
boolean |
swapColumns(int column1,
int column2)
Swaps two columns in the table without modifying the data source. |
boolean |
swapRows(int row1,
int row2)
Swaps two rows in the table without modifying the data source. |
boolean |
traverse(int direction)
Attempts to move the current cell focus to a new location given a direction. |
boolean |
traverse(int row,
int column,
boolean show_editor,
boolean select)
Attempts to move the current cell focus to a new location. |
void |
updateUI()
Updates the UI for JCTable . |
protected int |
XtoColumn(int x)
Determines the column that contains the pixel position. |
com.klg.jclass.table.JCCellPosition |
XYToCell(int x,
int y)
Returns the cell located at the x, y position. |
protected int |
YtoRow(int y)
Determines the row that contains the pixel position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.klg.jclass.table.AdjustmentHandler adjustmentHandler
protected com.klg.jclass.table.CellAreaHandler cellAreaHandler
protected com.klg.jclass.table.CellLayoutModel cellLayout
protected CellRendererPane cellRendererPane
protected com.klg.jclass.table.SeriesModel cellStyles
protected com.klg.jclass.table.RowColumnSeriesModel columnWidths
protected com.klg.jclass.table.DataViewModel dataView
protected com.klg.jclass.table.KeyInputHandler keyHandler
protected com.klg.jclass.table.MouseInputHandler mouseHandler
protected com.klg.jclass.table.RowColumnSeriesModel rowHeights
protected com.klg.jclass.table.SelectionModel selectionHandler
protected com.klg.jclass.table.SpanHandler spanHandler
protected com.klg.jclass.table.TableChangeHandler tableChangeHandler
protected com.klg.jclass.table.TableLayout tableLayout
protected com.klg.jclass.table.SeriesModel userData
protected Vector moveables
protected JScrollBar hsb
protected JScrollBar vsb
protected int allow_cell_resize
protected int allow_resize_by
protected boolean auto_edit
protected int auto_scroll
protected int cell_border_width
protected boolean column_label_display
protected int column_label_placement
protected int column_label_offset
protected int component_border_width
protected com.klg.jclass.table.CellStyleModel default_label_style
protected com.klg.jclass.table.CellStyleModel default_cell_style
protected int edit_height_policy
protected int edit_width_policy
protected Color focus_color
protected com.klg.jclass.table.FocusModel focusManager
protected int focus_indicator
protected com.klg.jclass.table.CellBorderModel frame_border
protected int frame_border_width
protected int frozen_columns
protected int frozen_column_placement
protected int frozen_rows
protected int frozen_row_placement
protected int hsb_attach
protected int hsb_display
protected int hsb_offset
protected int hsb_position
protected int hsb_track
protected int hsb_track_row
protected boolean ignore_container_size
protected int jump_mode
protected int left_column
protected int margin_height
protected int margin_width
protected int min_cell_visibility
protected Object mouseWheelListener
protected boolean popupMenuEnabled
protected boolean repaint_enabled
protected boolean resize_even
protected boolean resize_interactive
protected boolean row_label_display
protected int row_label_placement
protected int row_label_offset
protected boolean select_include_labels
protected Color selected_background
protected int selected_background_mode
protected Color selected_foreground
protected int selected_foreground_mode
protected boolean sort_series
protected boolean store_image_enabled
protected int top_row
protected Color track_background
protected Color track_foreground
protected Dimension track_size
protected boolean track_cursor
protected boolean traverse_cycle
protected int variable_estimate_count
protected int visible_columns
protected int visible_rows
protected int vsb_attach
protected int vsb_display
protected int vsb_offset
protected int vsb_position
protected int vsb_track
protected int vsb_track_column
protected int current_row
protected int current_column
protected com.klg.jclass.util.JCListenerList cellDisplayListeners
protected com.klg.jclass.util.JCListenerList editCellListeners
protected com.klg.jclass.util.JCListenerList paintListeners
protected com.klg.jclass.util.JCListenerList resizeListeners
protected com.klg.jclass.util.JCListenerList resizeMotionListeners
protected com.klg.jclass.util.JCListenerList scrollListeners
protected com.klg.jclass.util.JCListenerList selectListeners
protected com.klg.jclass.util.JCListenerList sortListeners
protected com.klg.jclass.util.JCListenerList traverseListeners
protected Vector actions
protected Component oldFocusOwner
protected boolean scrolling
protected boolean set_initial_left
protected boolean set_initial_top
protected boolean set_left_column
protected boolean set_top_row
protected int sort_column
protected int sort_direction
protected transient Image store_image
protected transient Point store_origin
protected boolean needs_initial_traverse
protected boolean needs_initial_set_left_check
protected boolean needs_initial_set_top_check
protected com.klg.jclass.table.TablePopupMenu popupMenu
protected boolean pointer_traverse_forces_edit
Constructor Detail |
public JCTable()
Method Detail |
public void addNotify()
addNotify
in class JComponent
protected Method findMethod(Class c, String methodString)
c
- the class in which the method is to be foundmethodString
- the name of the method
Method
object from JCTable
, based on
the input String; if there is no such method, return nullpublic void addTableMouseWheelListener(Object listener)
MouseWheelListener
to the table.
MouseWheelListener
. This method will do nothing if the
underlying JDK is pre 1.4.
listener
- The new listener; this must be of type
MouseWheelListener
. If the value passed in is null, this
method will add a new TableMouseWheelListener
(which is the
default listener).public void removeTableMouseWheelListener()
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void layoutAreas()
public void doLayout()
doLayout
in class Container
public com.klg.jclass.table.JCTableUI getUI()
JCTable
.
JCTable
public void setUI(ComponentUI newUI)
JCTable
.
setUI
in class JComponent
newUI
- the new UI for JCTable
public void updateUI()
JCTable
.
updateUI
in class JComponent
public String getUIClassID()
JCTable
.
getUIClassID
in class JComponent
JCTable
public com.klg.jclass.table.CellAreaHandler getCellAreaHandler()
CellArea
handler, which manages the creation and removal of
CellAreas
within the table.
CellArea
handlerpublic void setCellEditor(Class cellType, Class editor)
cellType
- the class type of the object in a celleditor
- an editor (specified by class) specifically suited to edit
objects of the given classpublic void setCellEditor(Class cellType, com.klg.jclass.cell.JCCellEditor editor)
cellType
- the class type of the object in a celleditor
- an editor (specified by an object which implements the
JCCellEditor
interface) specifically suited to edit objects
of the given classprotected void setCellEditorMapping(Class cellType, Object editor)
cellType
- the class type of the object in a celleditor
- an editor object specifically suited to edit objects
of the given classpublic com.klg.jclass.table.CellLayoutModel getCellLayout()
CellLayout
manager.
CellLayout
managerprotected void createDefaultCellLayout()
CellLayoutModel
manager.
public void setCellLayout(com.klg.jclass.table.CellLayoutModel cellLayout)
CellLayout
manager.
cellLayout
- the new CellLayout
managerpublic void setCellRenderer(Class cellType, Class renderer)
cellType
- the class type of the object in a cellrenderer
- a renderer (specified by class) specifically suited to render
objects of the given classpublic void setCellRenderer(Class cellType, com.klg.jclass.cell.JCCellRenderer renderer)
cellType
- the class type of the object in a cellrenderer
- a renderer (specified by an object which implements the
JCCellRenderer
interface) specifically suited to render
objects of the given classprotected void setCellRendererMapping(Class cellType, Object renderer)
cellType
- the class type of the object in a cellrenderer
- a renderer specifically suited to render objects of the
given classprotected void addToMoveables(Object newMoveable, Object oldMoveable)
newMoveable
- the new moveable to be addedoldMoveable
- the old moveable to be replacedpublic com.klg.jclass.table.CellStyleModel getCellStyle(int row, int column)
CellStyleModel
value. The
CellStyleModel
object returned here may not be unique to the
given row and column.
row
- the row of the cell whose cellStyleModel
is requiredcolumn
- the column of the cell whose cellStyleModel
is
required
CellStyleModel
object for the given row and columnsetCellStyle(int, int, com.klg.jclass.table.CellStyleModel)
public com.klg.jclass.table.CellStyleModel getUniqueCellStyle(int row, int column)
CellStyleModel
value.
Because style instances can be applied to a range of cells,
getCellStyle
may not return an CellStyleModel
object that is only used by the given cell. As a result, changing a
property in the style may affect more than one cell when table display
is updated.
Calling getUniqueCellStyle
returns a clone of the cell
style instance used for the cell. This instance is detached from the
cell and must be set back using setCellStyle
to change
the cell.
JCTableEnum.ALL
is an invalid value for the row and column
parameters. Any call with the JCTableEnum.ALL
parameter value
causes it to be converted into JCTableEnum.ALLCELLS
value.
row
- the row of the cell for which a unique cell style is requiredcolumn
- the column of the cell for which a unique cell style is
required
CellStyleModel
object for the given row and
columnpublic Collection getCellStyles()
CellStyleModel
instances used in table.
CellStyleModel
objectspublic Collection getCellStyleRanges(com.klg.jclass.table.CellStyleModel style)
JCCellRanges
that use the given
CellStyleModel
.
style
- the CellStyleModel
whose ranges are required
JCCellRanges
objects that use
the given CellStyleModel
public List getCellStyleValues()
CellStyle
series values.
CellStyle
series valuesprotected com.klg.jclass.table.CellStyleModel createCellStyle()
CellStyleModel
objectpublic com.klg.jclass.table.CellStyleModel getDefaultLabelStyle()
public com.klg.jclass.table.CellStyleModel getDefaultCellStyle()
protected void createDefaultCellStyleSeries()
CellStyleModel
series object.
public void setCellStyle(int row, int column, com.klg.jclass.table.CellStyleModel style)
row
- the row index of the cellcolumn
- the column index of the cellstyle
- the new style for the given cellpublic void setCellStyle(com.klg.jclass.table.JCCellRange cr, com.klg.jclass.table.CellStyleModel style)
cr
- the cell rangestyle
- the new style for the given cell rangepublic com.klg.jclass.table.SeriesModel cloneCellStyles() throws CloneNotSupportedException
setCellStyles()
if you want
to save the current state of the styles, make a temporary
change, then reverse the temporary change.
CloneNotSupportedException
public void setCellStyles(com.klg.jclass.table.SeriesModel sm)
cloneCellStyles()
for
making and reversing temporary style changes in a
convenient way.
Calling this method with null essentially resets the cell styles to initial state. The default cell and label styles are used.
It is recommended that the default cell and label styles
not be changed. For most uses, this is fine. However,
subclasses of JCTable may be tempted to set default_label_style
and default_cell_style
to new values. Unfortunately, we
cannot detect these new defaults EXCEPT when this call
is given a null.
Note: This method will force a table repaint, but not a relayout. In cases in which a relayout is required, the caller should force it by calling
table.setRepaintEnabled(false); // disable repaint table.setCellStyles(oldStyles); // restore table.setRelayoutRequired(true); // force relayout table.setRepaintEnabled(true); // will force relayout and repaint.
sm
- the new cell style container; if null, the cell styles are
set to their default valuesprotected void createDefaultColumnWidthSeries()
public List getColumnWidthValues()
protected com.klg.jclass.table.ComponentModel getComponentModel()
public com.klg.jclass.table.TableDataModel getDataSource()
setDataSource(com.klg.jclass.table.TableDataModel)
protected void createDefaultDataSource()
public void setDataSource(com.klg.jclass.table.TableDataModel tableData)
tableData
- the new data source for this tablepublic com.klg.jclass.table.DataViewModel getDataView()
protected void createDefaultDataView()
public void setDataView(com.klg.jclass.table.DataViewModel dataView)
dataView
- the new data viewpublic com.klg.jclass.table.EditTraverseHandler getEditTraverseHandler()
public com.klg.jclass.table.KeyInputHandler getKeyInputHandler()
public com.klg.jclass.table.MouseInputHandler getMouseInputHandler()
protected void createDefaultRowHeightSeries()
public List getRowHeightValues()
public com.klg.jclass.table.TableLayout getTableLayout()
TableLayout
manager.
public Object getUserData(int row, int column)
UserData
value.
row
- the row index of the cellcolumn
- the column index of the cell
setUserData(int, int, java.lang.Object)
protected void createDefaultUserDataSeries()
UserData
series object.
public void setUserData(int row, int column, Object value)
row
- the row index of the cellcolumn
- the column index of the cellvalue
- the user data object for the cellpublic void setUserData(com.klg.jclass.table.JCCellRange cr, Object value)
cr
- the cell rangevalue
- the user data object for the cell rangepublic int getAllowCellResize()
AllowCellResize
value. This determines how
an end-user can interactively resize rows/columns.
AllowCellResize
value; one of
JCTableEnum.RESIZE_ALL
(default),
JCTableEnum.RESIZE_NONE
, JCTableEnum.RESIZE_COLUMN
,
or JCTableEnum.RESIZE_ROW
setAllowCellResize(int)
public void setAllowCellResize(int value)
JCTableEnum.RESIZE_ALL
(default)
JCTableEnum.RESIZE_NONE
JCTableEnum.RESIZE_COLUMN
JCTableEnum.RESIZE_ROW
value
- the new AllowCellResize
value; must be one of
JCTableEnum.RESIZE_ALL
(default),
JCTableEnum.RESIZE_NONE
, JCTableEnum.RESIZE_COLUMN
,
or JCTableEnum.RESIZE_ROW
public int getAllowResizeBy()
AllowResizeBy
value to determine whether
row height and column width can be resized by labels, cells, or both.
AllowResizeBy
value; one of
JCTableEnum.RESIZE_BY_LABELS
,
JCTableEnum.RESIZE_BY_CELLS
, or
JCTableEnum.RESIZE_BY_ALL
setAllowResizeBy(int)
public void setAllowResizeBy(int value)
JCTableEnum.RESIZE_BY_LABELS
, a user can only
resize the column widths and row heights by resizing the respective
row or column's label. Use JCTableEnum.RESIZE_BY_CELLS
to allow cell resize but not label resize, and
JCTableEnum.RESIZE_BY_ALL
to allow label or cell
resize.
value
- the new AllowResizeBy
value; one of
JCTableEnum.RESIZE_BY_LABELS
,
JCTableEnum.RESIZE_BY_CELLS
, or
JCTableEnum.RESIZE_BY_ALL
public boolean isAutoEdit()
AutoEdit
value.
AutoEdit
valuesetAutoEdit(boolean)
public void setAutoEdit(boolean value)
true
, the table automatically displays an editor when a cell
is entered.
value
- the new AutoEdit
valuepublic int getAutoScroll()
AutoScroll
value. This controls how the table
scrolls when the user selects cells or drags the mouse past the bounds of
the table.
AutoScroll
value; one of
JCTblEnum.AUTO_SCROLL_NONE
(default),
JCTblEnum.AUTO_SCROLL_ROW
,
JCTblEnum.AUTO_SCROLL_COLUMN
, or
JCTblEnum.AUTO_SCROLL_BOTH
setAutoScroll(int)
public void setAutoScroll(int value)
JCTblEnum.AUTO_SCROLL_NONE
(default)
JCTblEnum.AUTO_SCROLL_ROW
JCTblEnum.AUTO_SCROLL_COLUMN
JCTblEnum.AUTO_SCROLL_BOTH
value
- the new AutoScroll
value; one of
JCTblEnum.AUTO_SCROLL_NONE
(default),
JCTblEnum.AUTO_SCROLL_ROW
,
JCTblEnum.AUTO_SCROLL_COLUMN
, or
JCTblEnum.AUTO_SCROLL_BOTH
public int getCellBorderWidth()
CellBorderWidth
value.
CellBorderWidth
valuesetCellBorderWidth(int)
public void setCellBorderWidth(int value)
1
).
value
- the new cell border width valuepublic int getCharHeight(int row)
CharHeight
value for a row.
row
- the row whose height is to be returned
CharHeight
value for the specified rowsetCharHeight(int, int)
public void setCharHeight(int row, int value)
1
). Multiline cell values that do not fit in a cell or label
are clipped. This property controls the height only if
PixelHeight
is JCTableEnum.NOVALUE
. This property works best with lists that use fixed-width fonts.
When a user interactively resizes a row, this property is overriden by the pixel heights.
row
- row whose height is to be set; this may be a specified row,
JCTableEnum.LABEL
(for column labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all rows).value
- the new CharHeight
value for the specified rowpublic int getCharWidth(int column)
CharWidth
value for a column.
column
- the column whose width is to be returned
CharWidth
value for the specified columnsetCharWidth(int, int)
public void setCharWidth(int column, int value)
PixelWidth
is
JCTableEnum.NOVALUE
. This property works best with lists that use fixed-width fonts.
When a user interactively resizes a column, this property is overriden by the pixel widths.
column
- column whose width is to be set; this may be a specified column,
JCTableEnum.LABEL
(for row labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all columns)value
- the new CharWidth
value for the specified columnpublic boolean isColumnHidden(int column)
true
if the column is hidden.
column
- the column index
setColumnHidden(int, boolean)
public void setColumnHidden(int column, boolean value)
column
- the column indexvalue
- if true
, hide the specified column; if
false
, it is not hiddenpublic boolean isPopupMenuEnabled()
PopupMenuEnabled
value.
setPopupMenuEnabled(boolean)
public void setPopupMenuEnabled(boolean b)
PopupMenuEnabled
value.
b
- if true
, the popup menu is now enabled; if
false
, it is disabledisPopupMenuEnabled()
public boolean isColumnLabelDisplay()
ColumnLabelDisplay
value.
setColumnLabelDisplay(boolean)
public void setColumnLabelDisplay(boolean value)
true
.
value
- if true
, column labels are displayedpublic int getColumnLabelOffset()
ColumnLabelOffset
value.
setColumnLabelOffset(int)
public void setColumnLabelOffset(int value)
value
- the new column label offsetpublic int getColumnLabelPlacement()
ColumnLabelPlacement
value.
JCTableEnum.PLACE_TOP
(default) or
JCTableEnum.PLACE_BOTTOM
setColumnLabelPlacement(int)
public void setColumnLabelPlacement(int value)
JCTableEnum.PLACE_TOP
(default)JCTableEnum.PLACE_BOTTOM
value
- the new column label placement value; one of
JCTableEnum.PLACE_TOP
(default) or
JCTableEnum.PLACE_BOTTOM
public Component getComponent(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
public boolean hasComponent(int row, int column)
true
if the cell contains a component.
row
- the row index of the cellcolumn
- the column index of the cell
public void setComponent(int row, int column, Component component)
row
- the row index of the cellcolumn
- the column index of the cellcomponent
- the new component for a cellpublic int getComponentBorderWidth()
setComponentBorderWidth(int)
public void setComponentBorderWidth(int value)
value
- the new component border widthpublic void setComponent(com.klg.jclass.table.JCCellRange cr, Component component)
JComponent
to span a range of cells. This is a
convenience method which creates a span and then adds the component to it.
cr
- the cell range which this component will spancomponent
- the component which will span the rangepublic void setCursor(int type)
type
- the java.awt.Cursor type (for example,
Cursor.WAIT_CURSOR
)setTrackCursor(boolean)
public int getEditHeightPolicy()
JCTableEnum.EDIT_SIZE_TO_CELL
,
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
, or
JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
setEditHeightPolicy(int)
public void setEditHeightPolicy(int value)
JCTableEnum.EDIT_SIZE_TO_CELL
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
value
- the new vertical sizing policy for cell editors; one of
JCTableEnum.EDIT_SIZE_TO_CELL
,
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
, or
JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
public int getEditWidthPolicy()
JCTableEnum.EDIT_SIZE_TO_CELL
,
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
,
or JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
setEditWidthPolicy(int)
public void setEditWidthPolicy(int value)
JCTableEnum.EDIT_SIZE_TO_CELL
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
value
- the new horizontal sizing policy for cell editors; one of
JCTableEnum.EDIT_SIZE_TO_CELL
,
JCTableEnum.EDIT_ENSURE_MINIMUM_SIZE
,
or JCTableEnum.EDIT_ENSURE_PREFERRED_SIZE
public Color getFocusColor()
setFocusColor(java.awt.Color)
public void setFocusColor(Color value)
value
- the new focus colorpublic com.klg.jclass.table.FocusModel getFocusManager()
FocusManager
.
FocusManager
setFocusManager(com.klg.jclass.table.FocusModel)
public void setFocusManager(com.klg.jclass.table.FocusModel focusManager)
FocusManager
.
focusManager
- the new focus manager; null values are ignoredpublic int getFocusIndicator()
JCTableEnum.FOCUS_NONE
,
JCTableEnum.FOCUS_HIGHLIGHT
,
JCTableEnum.FOCUS_RECTANGLE
,
JCTableEnum.FOCUS_THIN_RECTANGLE
, or
JCTableEnum.FOCUS_DASHED_RECTANGLE
setFocusIndicator(int)
public void setFocusIndicator(int value)
JCTableEnum.FOCUS_NONE
,
JCTableEnum.FOCUS_HIGHLIGHT
,
JCTableEnum.FOCUS_RECTANGLE
,
JCTableEnum.FOCUS_THIN_RECTANGLE
, and
JCTableEnum.FOCUS_DASHED_RECTANGLE
.
value
- the new focus indicator type; one of
JCTableEnum.FOCUS_NONE
,
JCTableEnum.FOCUS_HIGHLIGHT
,
JCTableEnum.FOCUS_RECTANGLE
,
JCTableEnum.FOCUS_THIN_RECTANGLE
, or
JCTableEnum.FOCUS_DASHED_RECTANGLE
public com.klg.jclass.table.CellBorderModel getFrameBorder()
FrameBorderWidth
value as a
CellBorderModel
.
FrameBorderWidth
CellBorderModel
valuesetFrameBorderWidth(int)
public void setFrameBorder(com.klg.jclass.table.CellBorderModel value)
CellBorder
model of the borders surrounding cell and
label areas (default is null).
value
- the new FrameBorderWidth
value specified by
CellBorderModel
public int getFrameBorderWidth()
FrameBorderWidth
value.
FrameBorderWidth
valuesetFrameBorderWidth(int)
public void setFrameBorderWidth(int value)
value
- the new FrameBorderWidth
valuepublic int getFrozenColumnPlacement()
FrozenColumnPlacement
value.
FrozenColumnPlacement
value; one of
JCTableEnum.PLACE_LEFT
or JCTableEnum.PLACE_RIGHT
setFrozenColumnPlacement(int)
public void setFrozenColumnPlacement(int value)
CellValue
s. One of
JCTableEnum.PLACE_LEFT
or
JCTableEnum.PLACE_RIGHT
.
value
- the new FrozenColumnPlacement
value; one of
JCTableEnum.PLACE_LEFT
or JCTableEnum.PLACE_RIGHT
public int getFrozenColumns()
FrozenColumns
value.
FrozenColumns
valuesetFrozenColumns(int)
public void setFrozenColumns(int value)
FrozenColumnPlacement
.
value
- the new FrozenColumns
valuepublic int getFrozenRowPlacement()
FrozenRowPlacement
value.
JCTableEnum.PLACE_TOP
or JCTableEnum.PLACE_BOTTOM
setFrozenRowPlacement(int)
public void setFrozenRowPlacement(int value)
JCTableEnum.PLACE_TOP
JCTableEnum.PLACE_BOTTOM
value
- the new frozen row placement value; one of
JCTableEnum.PLACE_TOP
or JCTableEnum.PLACE_BOTTOM
public int getFrozenRows()
FrozenRows
value.
FrozenRows
valuesetFrozenRows(int)
public void setFrozenRows(int value)
FrozenRowPlacement
.
value
- the new FrozenRows
valuepublic JScrollBar getHorizSB()
public void setHorizSB(JScrollBar value)
value
- the new horizontal scrollbar componentpublic int getHorizSBAttachment()
HorizSBAttachment
value.
HorizSBAttachment
value; one of
JCTableEnum.SIZE_TO_CELLS
or
JCTableEnum.SIZE_TO_TABLE
setHorizSBAttachment(int)
public void setHorizSBAttachment(int value)
JCTableEnum.SIZE_TO_CELLS
(default), the
scrollbar ends at the edge of the visible cells.
When set to JCTableEnum.SIZE_TO_TABLE
, the scrollbar ends
at the edge of the table. This setting should be used in conjunction
with HorizSBPosition
.
value
- the new HorizSBAttachment
value; one of
JCTableEnum.SIZE_TO_CELLS
or JCTableEnum.SIZE_TO_TABLE
public int getHorizSBDisplay()
HorizSBDisplay
value to determine when to
display scrollbars.
HorizSBDisplay
value; one of
JCTableEnum.SCROLLBAR_ALWAYS
,
JCTableEnum.SCROLLBAR_NEVER
, or
JCTableEnum.SCROLLBAR_AS_NEEDED
setHorizSBDisplay(int)
public void setHorizSBDisplay(int value)
JCTableEnum.SCROLLBAR_ALWAYS Always displayed JCTableEnum.SCROLLBAR_NEVER Never displayed JCTableEnum.SCROLLBAR_AS_NEEDED Displayed only when table area is larger than frame
value
- The new HorizSBDisplay
value; one of
JCTableEnum.SCROLLBAR_ALWAYS
,
JCTableEnum.SCROLLBAR_NEVER
, or
JCTableEnum.SCROLLBAR_AS_NEEDED
public int getHorizSBOffset()
HorizSBOffset
value.
HorizSBOffset
valuesetHorizSBOffset(int)
public void setHorizSBOffset(int value)
value
- the new HorizSBOffset
valuepublic int getHorizSBPosition()
HorizSBPosition
value.
HorizSBPosition
value; one of
JCTableEnum.POSITION_BY_CELLS
or
JCTableEnum.POSITION_AT_SIDE
setHorizSBPosition(int)
public void setHorizSBPosition(int value)
JCTableEnum.POSITION_BY_CELLS
(default), the scrollbar
is attached to the cell/labels. When set to
JCTableEnum.POSITION_AT_SIDE
, the scrollbar is attached to the
edge of the table within its container.
value
- the new HorizSBPosition
value; one of
JCTableEnum.POSITION_BY_CELLS
or
JCTableEnum.POSITION_AT_SIDE
setHorizSBPosition(int)
public int getHorizSBTrack()
HorizSBTrack
value.
HorizSBTrack
value; one of
JCTableEnum.TRACK_LIVE
,
JCTableEnum.TRACK_COLUMN_NUMBER
, or
JCTableEnum.TRACK_ROW
setHorizSBTrack(int)
public void setHorizSBTrack(int value)
JCTableEnum.TRACK_LIVE
, table redisplays during scrollbar
tracking. When set to JCTableEnum.TRACK_COLUMN_NUMBER
, table
redisplays after tracking completes and displays the number of the left
column during the track.
Use JCTableEnum.TRACK_ROW
and setHorizSBTrackRow
to specify a row number in order to use data from the column to indicate
the left-most column.
value
- the new HorizSBTrack
value; one of
JCTableEnum.TRACK_LIVE
,
JCTableEnum.TRACK_COLUMN_NUMBER
, or
JCTableEnum.TRACK_ROW
public int getHorizSBTrackRow()
setHorizSBTrackRow(int)
public void setHorizSBTrackRow(int value)
JCTableEnum.LABEL
to display the data from the column label or a valid row number
to display cell data.
value
- the new row number to do the trackingpublic boolean isIgnoreContainerSize()
IgnoreContainerSize
value.
Note: JScrollPane
contains table correctly without
using this logic -- so this is not implemented anywhere.
IgnoreContainerSize
valuesetIgnoreContainerSize(boolean)
public void setIgnoreContainerSize(boolean value)
true
when the table
is placed in a scrollpane so that table will take the
maximum amount of space required to display all cells.
value
- the new IgnoreContainerSize
valuepublic int getJumpScroll()
JumpScroll
value.
JumpScroll
value; one of
JCTableEnum.JUMP_NONE
, JCTableEnum.JUMP_HORIZONTAL
,
JCTableEnum.JUMP_VERTICAL
, or JCTableEnum.JUMP_ALL
setJumpScroll(int)
public void setJumpScroll(int value)
JCTableEnum.JUMP_NONE
(default), both scrollbars will scroll
smoothly. To enable jump scroll for the horizontal, vertical or both
scrollbars, use JCTableEnum.JUMP_HORIZONTAL
,
JCTableEnum.JUMP_VERTICAL
, or JCTableEnum.JUMP_ALL
respectively.
value
- the new JumpScroll
value; one of
JCTableEnum.JUMP_NONE
, JCTableEnum.JUMP_HORIZONTAL
,
JCTableEnum.JUMP_VERTICAL
, or JCTableEnum.JUMP_ALL
public int getLeftColumn()
LeftColumn
value.
LeftColumn
valuesetLeftColumn(int)
public void setLeftColumn(int value)
When set, the table scrolls to display the column at the left side of the window. This value is always larger or equal to the number of frozen columns.
value
- the new LeftColumn
valuepublic int getMarginHeight()
MarginHeight
value.
MarginHeight
valuesetMarginHeight(int)
public void setMarginHeight(int value)
value
- the new MarginHeight
valuepublic int getMarginWidth()
MarginWidth
value.
MarginWidth
valuesetMarginWidth(int)
public void setMarginWidth(int value)
value
- the new MarginWidth
valuepublic int getMaxHeight(int row)
MaxHeight
value for a row.
row
- the row whose maximum height is to be returned
MaxHeight
value for a rowsetMaxHeight(int, int)
public void setMaxHeight(int row, int value)
row
- row whose maximum height is to be set; this may be a specified
row, JCTableEnum.LABEL
(for column labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all rows)value
- the new MaxHeight
value for a rowpublic int getMaxWidth(int column)
MaxWidth
value for a column.
column
- the column whose maximum width is to be returned
MaxWidth
value for a columnsetMaxWidth(int, int)
public void setMaxWidth(int column, int value)
column
- column whose maximum width is to be set; this may be a
specified column, JCTableEnum.LABEL
(for row labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all columns)value
- the new MaxWidth
value for a columnpublic int getMinCellVisibility()
MinCellVisibility
value.
MinCellVisibility
valuesetMinCellVisibility(int)
public void setMinCellVisibility(int value)
When set to 100, the cell is made completely visible.
When set to 10, only 10% of the cell is made visible.
value
- the new MinCellVisibility
valuepublic int getMinHeight(int row)
MinHeight
value for a row.
row
- the row whose minimum height is to be returned
MinHeight
value for a rowsetMinHeight(int, int)
public void setMinHeight(int row, int value)
row
- row whose minimum height is to be set; this may be a specified
row, JCTableEnum.LABEL
(for column labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all rows)value
- the new MinHeight
value for a rowpublic int getMinWidth(int column)
MinWidth
value for a column.
column
- the column whose minimum width is to be returned
MinWidth
value for a columnsetMinWidth(int, int)
public void setMinWidth(int column, int value)
column
- column whose minimum width is to be set; this may be a
specified column, JCTableEnum.LABEL
(for row labels),
JCTableEnum.ALLCELLS
(for all cells), or
JCTableEnum.ALL
(for all columns)value
- the new MinWidth
value for a columnpublic int getPixelHeight(int row)
PixelHeight
value for a row, previous set using
setPixelHeight
.
row
- the row whose height is to be returned
PixelHeight
value for a rowsetPixelHeight(int, int)
public void setPixelHeight(int row, int value)
JCTableEnum.NOVALUE
to
control height by character value.The following special values are valid:
JCTableEnum.NOVALUE Use character setting to control
the size of a row
JCTableEnum.AS_IS Do not change. Use to convert from
VARIABLE to fixed size
JCTableEnum.VARIABLE Set to the highest value in the row
JCTableEnum.VARIABLE_ESTIMATE Set to the highest value in the
first VariableCount
cells
No pixel setting can violate the minimum and maximum values for a row.
row
- the row whose height is being setvalue
- the new PixelHeight
value for a rowpublic int getPixelWidth(int column)
PixelWidth
value for a column, previously set using
setPixelWidth
.
column
- the column whose width is to be returned
PixelWidth
value for a columnsetPixelWidth(int, int)
public void setPixelWidth(int column, int value)
JCTableEnum.NOVALUE
to control width by character value.The following special values are valid:
JCTableEnum.NOVALUE Use character setting to control
the size of a column
JCTableEnum.AS_IS Do not change. Use to convert from
VARIABLE to fixed size
JCTableEnum.VARIABLE Set to the highest value in the column
JCTableEnum.VARIABLE_ESTIMATE Set to the highest value in the
first VariableCount
cells
No pixel setting can violate the minimum and maximum values for a column.
column
- the column whose width is being setvalue
- the new PixelWidth
value for a columnpublic boolean isRepaintEnabled()
RepaintEnabled
value.
RepaintEnabled
valuesetRepaintEnabled(boolean)
public void setRepaintEnabled(boolean value)
true
). If false
,
setting a property will have no effect until RepaintEnabled
is
switched to true
.
value
- the new RepaintEnabled
valuepublic boolean isResizeEven()
ResizeEven
value to determine whether all
column widths or row heights are resized to the same value.
ResizeEven
valuesetResizeEven(boolean)
public void setResizeEven(boolean value)
true
, when a column width or row height is changed
interactively, all columns or rows are resized to the same value. Labels
are not affected.
value
- the new ResizeEven
valuepublic boolean isResizeInteractive()
ResizeInteractive
value to determine
whether table repaints during the resize of a column or row.
ResizeInteractive
valuesetResizeInteractive(boolean)
public void setResizeInteractive(boolean value)
true
, when a column width or row height is changed
interactively, table is repainted to reflect the new value during
the drag event.
value
- the new ResizeInteractive
valuepublic boolean isRowHidden(int row)
true
if the row is hidden.
row
- the row index
setRowHidden(int, boolean)
public void setRowHidden(int row, boolean value)
row
- the row indexvalue
- if true
, hide the specified row; if
false
, it is not hiddenpublic boolean isRowLabelDisplay()
RowLabelDisplay
value.
RowLabelDisplay
valuesetRowLabelDisplay(boolean)
public void setRowLabelDisplay(boolean value)
true
.
value
- the new RowLabelDisplay
valuepublic int getRowLabelOffset()
RowLabelOffset
value.
RowLabelOffset
value which specifies
the spacing between the row labels and the cell area in pixelssetRowLabelOffset(int)
public void setRowLabelOffset(int value)
value
- the new RowLabelOffset
valuepublic int getRowLabelPlacement()
RowLabelPlacement
value.
RowLabelPlacement
value; one of
JCTableEnum.PLACE_LEFT
or JCTableEnum.PLACE_RIGHT
setRowLabelPlacement(int)
public void setRowLabelPlacement(int value)
JCTableEnum.PLACE_LEFT
(default)JCTableEnum.PLACE_RIGHT
value
- the current RowLabelPlacement
value; one of
JCTableEnum.PLACE_LEFT
or JCTableEnum.PLACE_RIGHT
public Color getSelectedBackground()
SelectedBackground
value.
SelectedBackground
valuesetSelectedBackground(java.awt.Color)
public void setSelectedBackground(Color value)
SelectedBackgroundMode
to determine how
the selected background is determined.
value
- the new SelectedBackground
valuesetSelectedBackgroundMode(int)
public int getSelectedBackgroundMode()
SelectedBackgroundMode
value.
SelectedBackgroundMode
value; one of
JCTableEnum.USE_SELECTED_BACKGROUND
,
JCTableEnum.USE_CELL_BACKGROUND
, or
JCTableEnum.USE_CELL_FOREGROUND
setSelectedBackgroundMode(int)
public void setSelectedBackgroundMode(int value)
SelectedBackgroundMode
.
If the mode is JCTableEnum.USE_SELECTED_BACKGROUND
,
the selected background color is determined by the
SelectedBackground
property. In order to keep the
selected background identical to the cell background, use
JCTableEnum.USE_CELL_BACKGROUND
. To inverse
the background/foreground colors, use
JCTableEnum.USE_CELL_FOREGROUND
.
value
- the new SelectedBackgroundMode
value; one of
JCTableEnum.USE_SELECTED_BACKGROUND
,
JCTableEnum.USE_CELL_BACKGROUND
, or
JCTableEnum.USE_CELL_FOREGROUND
public Color getSelectedForeground()
SelectedForeground
value.
SelectedForeground
valuesetSelectedForeground(java.awt.Color)
public void setSelectedForeground(Color value)
SelectedForegroundMode
to determine
how the selected foreground is determined.
value
- the new SelectedForeground
valuesetSelectedForegroundMode(int)
public int getSelectedForegroundMode()
SelectedForegroundMode
value.
SelectedForegroundMode
value; one of
JCTableEnum.USE_SELECTED_FOREGROUND
,
JCTableEnum.USE_CELL_BACKGROUND
, or
JCTableEnum.USE_CELL_FOREGROUND
setSelectedForegroundMode(int)
public void setSelectedForegroundMode(int value)
SelectedForegroundMode
.
If the mode is JCTableEnum.USE_SELECTED_FOREGROUND
,
the selected foreground color is determined by the
SelectedForeground
property. In order to keep the
selected foreground identical to the cell foreground, use
JCTableEnum.USE_CELL_FOREGROUND
. To inverse
the background/foreground colors, use
JCTableEnum.USE_CELL_BACKGROUND
.
value
- the new SelectedForegroundMode
value; one of
JCTableEnum.USE_SELECTED_FOREGROUND
,
JCTableEnum.USE_CELL_BACKGROUND
, or
JCTableEnum.USE_CELL_FOREGROUND
public boolean getSelectIncludeLabels()
SelectIncludeLabels
value.
SelectIncludeLabels
valuesetSelectIncludeLabels(boolean)
public void setSelectIncludeLabels(boolean value)
SelectIncludeLabels
is set, full row or column selection
does not display labels as selected.
value
- the new SelectIncludeLabels
valuepublic int getSelectionPolicy()
SelectionPolicy
value.
SelectionPolicy
value; one of
JCTableEnum.SELECT_NONE
, JCTableEnum.SELECT_SINGLE
,
JCTableEnum.SELECT_RANGE
, or
JCTableEnum.SELECT_MULTIRANGE
setSelectionPolicy(int)
public void setSelectionPolicy(int value)
JCTableEnum.SELECT_NONE No selection is allowed JCTableEnum.SELECT_SINGLE Selection of only one cell allowed JCTableEnum.SELECT_RANGE Selection of only one range of cells allowed JCTableEnum.SELECT_MULTIRANGE Selection of multiple ranges of cells allowedWhen
SelectionPolicy
is set to
JCTableEnum.SELECT_NONE
, SELECT
events are not
posted as a user edits or attempts to select cells. Setting this property
clears the selected cell list.
value
- the new SelectionPolicy
value; one of
JCTableEnum.SELECT_NONE
, JCTableEnum.SELECT_SINGLE
,
JCTableEnum.SELECT_RANGE
, or
JCTableEnum.SELECT_MULTIRANGE
public boolean isSeriesDataSorted()
true
if series data (styles, cell dimensions, and so on)
are maintained in sync with data when it is sorted.
setSeriesDataSorted(boolean)
public void setSeriesDataSorted(boolean value)
value
- if true
, series data is kept in sync with the datapublic boolean isStoreImageEnabled()
true
if an image of table is maintained offscreen.
Disabling StoreImage
will affect scroll
performance.
public void setStoreImageEnabled(boolean value)
JComponent
's double buffering and
is used to optimize scroll performance.
value
- if true
, an image of the table is maintained
offscreenpublic int getTopRow()
TopRow
value.
TopRow
valuesetTopRow(int)
public void setTopRow(int value)
value
- the new TopRow
valuepublic Color getTrackBackground()
setTrackBackground(java.awt.Color)
public void setTrackBackground(Color value)
value
- the new background color of the track componentpublic Color getTrackForeground()
setTrackForeground(java.awt.Color)
public void setTrackForeground(Color value)
value
- the new foreground color of the track componentpublic Dimension getTrackSize()
setTrackSize(java.awt.Dimension)
public void setTrackSize(Dimension value)
value
- the new dimensions of the component that tracks horizontal
or vertical scrollbar infopublic boolean isTrackCursor()
TrackCursor
value to determine whether the
mouse pointer is being tracked as the user moves the mouse.
setTrackCursor(boolean)
public void setTrackCursor(boolean value)
true
, the JCTable
tracks
the mouse pointer and changes its shape to reflect the interactions available
to the user at the location. When false
, the table uses the
application-defined pointer. Default is true
.
value
- if true
, the mouse pointer will be tracked as the
user moves the mousepublic boolean isTraverseCycle()
TraverseCycle
value for the table.
setTraverseCycle(boolean)
public void setTraverseCycle(boolean value)
true
.
value
- the new traverse cycle valuepublic int getVariableEstimateCount()
The VariableEstimateCount
variable is used when the
setPixel[Height | Width](VARIABLE_ESTIMATE)
method has been
called. When that method is called with VARIABLE_ESTIMATE
, it
iterates over the variableEstimateCount
number of rows in the
table to determine the highest/widest cell contents in those rows. The method
then uses this local maxima to set all row heights/widths for the table; that
is, a given subset of table rows are sampled to estimate the height/width.
The default is to sample all rows, which is functionally equivalent to
calling setPixel[Height | Width](VARIABLE)
.
Use JCTableEnum.ALL
for all cells and labels (default),
JCTableEnum.ALLCELLS
for all cells,
JCTableEnum.LABEL
for labels only, or any other number to
indicate the last row/column number to use (including the label).
setVariableEstimateCount(int)
public void setVariableEstimateCount(int value)
The VariableEstimateCount variable is used when the setPixel[Height
| Width](VARIABLE_ESTIMATE)
method has been called. When that method
is called with VARIABLE_ESTIMATE
, it iterates over the
variableEstimateCount
number of rows in the table to determine
the highest/widest cell contents in those rows. The method then uses this
local maxima to set all row heights/widths for the table, that is, a given
subset of table rows are sampled to estimate the height/width.
The default is to sample all rows, which is functionally equivalent to
calling setPixel[Height | Width](VARIABLE)
.
Use JCTableEnum.ALL
for all cells and labels (default),
JCTableEnum.ALLCELLS
for all cells,
JCTableEnum.LABEL
for labels only, or any other number to
indicate the last row/column number to use (including the label).
value
- the new variable estimate countpublic JScrollBar getVertSB()
public void setVertSB(JScrollBar value)
value
- the new vertical scrollbar componentpublic int getVertSBAttachment()
VertSBAttachment
value.
VertSBAttachment
value; one of
JCTableEnum.SIZE_TO_CELLS
or
JCTableEnum.SIZE_TO_TABLE
setVertSBAttachment(int)
public void setVertSBAttachment(int value)
JCTableEnum.SIZE_TO_CELLS
(default), the
scrollbar ends at the edge of the visible cells.
When set to JCTableEnum.SIZE_TO_TABLE
, the scrollbar ends
at the edge of the table. This setting should be used in conjunction
with HorizSBPosition
.
value
- the new VertSBAttachment
value; one of
JCTableEnum.SIZE_TO_CELLS
or
JCTableEnum.SIZE_TO_TABLE
public int getVertSBDisplay()
VertSBDisplay
value to determine when to
display scrollbars.
VertSBDisplay
value; one of
JCTableEnum.SCROLLBAR_ALWAYS
,
JCTableEnum.SCROLLBAR_NEVER
, or
JCTableEnum.SCROLLBAR_AS_NEEDED
setVertSBDisplay(int)
public void setVertSBDisplay(int value)
JCTableEnum.SCROLLBAR_ALWAYS always displayed JCTableEnum.SCROLLBAR_NEVER never displayed JCTableEnum.SCROLLBAR_AS_NEEDED displayed when the rows or columns are not visible
value
- the new VertSBDisplay
value; one of
JCTableEnum.SCROLLBAR_ALWAYS
,
JCTableEnum.SCROLLBAR_NEVER
, or
JCTableEnum.SCROLLBAR_AS_NEEDED
public int getVertSBOffset()
VertSBOffset
value.
VertSBOffset
valuesetVertSBOffset(int)
public void setVertSBOffset(int value)
value
- the new VertSBOffset
valuepublic int getVertSBPosition()
VertSBPosition
value.
VertSBPosition
value; one of
JCTableEnum.POSITION_BY_CELLS
or
JCTableEnum.POSITION_AT_SIDE
setVertSBPosition(int)
public void setVertSBPosition(int value)
JCTableEnum.POSITION_BY_CELLS
(default), the scrollbar
is attached to the cell/labels. When set to
JCTableEnum.POSITION_AT_SIDE
, the scrollbar is attached to the
edge of the table within its container.
value
- the new VertSBPosition
value; one of
JCTableEnum.POSITION_BY_CELLS
or
JCTableEnum.POSITION_AT_SIDE
public int getVertSBTrack()
VertSBTrack
value.
VertSBTrack
value; one of
JCTableEnum.TRACK_LIVE
, JCTableEnum.TRACK_ROW_NUMBER
, or
JCTableEnum.TRACK_COLUMN
setVertSBTrack(int)
public void setVertSBTrack(int value)
JCTableEnum.TRACK_LIVE
, THE table redisplays during scrollbar
tracking. When set to JCTableEnum.TRACK_ROW_NUMBER
, the table
redisplays after tracking completes and displays the number of the top row
during the track. Use JCTableEnum.TRACK_COLUMN
and
setVertSBTrackColumn
to specify a column number in order to use
data from the row to indicate the top-most row.
value
- the new VertSBTrack
value; one of
JCTableEnum.TRACK_LIVE
,
JCTableEnum.TRACK_ROW_NUMBER
, or
JCTableEnum.TRACK_COLUMN
public int getVertSBTrackColumn()
setVertSBTrackColumn(int)
public void setVertSBTrackColumn(int value)
JCTableEnum.LABEL
to display the data from the row label or a valid column number
to display cell data.
value
- the new column number that determines the text to display when
the track indicator is displayedpublic int getVisibleColumns()
setVisibleColumns(int)
public void setVisibleColumns(int value)
getNumVisibleColumns
to obtain the actual number currently visible. Setting this property to
JCTableEnum.NOVALUE
causes the table to attempt to resize to
make all columns visible.
value
- the new number of non-frozen columns visible in the tablepublic int getVisibleRows()
setVisibleRows(int)
public void setVisibleRows(int value)
getNumVisibleRows
to obtain the actual number currently visible. Setting this property to
JCTableEnum.NOVALUE
causes the table to attempt to resize
to make all rows visible.
value
- the new number of non-frozen rows visible in the tablepublic boolean beginEdit(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
false
if edit is not possible because the cell is
non-existant or not editable/traversablepublic boolean cancelEdit(boolean hide)
hide
- determines whether or not to hide the cell editor
false
if no edit is in progresspublic Rectangle getCellBounds(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
public Point getCellPosition(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
Point
object which contains the position of the
top-left corner of a cellpublic boolean isCellVisible(int row, int column)
true
if the given cell is visible.
row
- the row index of the cellcolumn
- the column index of the cell
true
if the cell is visiblepublic boolean commitEdit(boolean hide)
hide
- determines whether to hide the editor
false
if no edit is in progress or the commit is
rejectedpublic int getColumnPixelWidth(int column)
column
- the index of the column
public boolean isColumnVisible(int column)
true
if the given column is visible.
column
- the index of the column
true
if the given column is visiblepublic boolean isContentClipped(int row, int column)
true
if the full content of the cell is not displayed
because of the size of the cell.
row
- the row index of the cellcolumn
- the column index of the cell
true
if the content of the cell is clippedpublic com.klg.jclass.table.JCCellPosition getCurrentCell()
getCurrentRow
and
getCurrentColumn
for the definition of current.
getCurrentRow()
,
getCurrentColumn()
public boolean isCurrentCell(int row, int column)
true
if the given row and column is the current cell.
row
- the row index of the cellcolumn
- the column index of the cell
true
if the cell at (row, column) is the current cellpublic void setCurrentCell(com.klg.jclass.table.JCCellPosition cell)
cell
- the position of the cell to make currentpublic void setCurrentCell(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cellprotected void setCurrentCell(int row, int column, int direction)
row
- the row index of the cellcolumn
- the column index of the celldirection
- the direction to go if the indicated cell is not traversablepublic int getCurrentRow()
public int getCurrentColumn()
public Component getEditingComponent()
getEditingComponent
returns null.
public boolean hasComponents()
true
if there are components in table.
public static final boolean isCell(int row, int column)
true
if the row and column consititute a valid cell.
row
- the row index of the cellcolumn
- the column index of the cell
true
if the row/column combination consititutes a valid
cellpublic static final boolean isColumnLabel(int row, int column)
true
if the row and column consititute a valid column
label.
row
- the row index of the cellcolumn
- the column index of the cell
true
if the row/column combination consititutes a valid
column labelpublic boolean dragColumn(int column1, int column2)
JCTableEnum.MAXINT
as the end point in order to move the column to the end.
column1
- the original location of the columncolumn2
- the new location of the column
public boolean dragRow(int row1, int row2)
JCTableEnum.MAXINT
as the end point in order to move the row to the end.
row1
- the original location of the rowrow2
- the new location of the row
public boolean isEditable(int row, int column)
true
if the given cell is editable.
row
- the row index of the cellcolumn
- the column index of the cell
public boolean isFocusTraversable()
JComponent.isFocusTraversable
and returns
true
, indicating that the table is a focusable component.
isFocusTraversable
in class Component
true
public static final boolean isLabel(int row, int column)
true
if the row and column constitute a valid label.
row
- the row index of the possible labelcolumn
- the column index of the possible label
public static final boolean isRowLabel(int row, int column)
true
if the row and column constitute a valid row label.
row
- the row index of the possible labelcolumn
- the column index of the possible label
public boolean makeVisible(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
false
if the position is invalidpublic boolean makeColumnVisible(int column)
column
- the column index of the cell
false
if the column is invalidpublic boolean makeRowVisible(int row)
row
- the row index of the cell
false
if the row is invalidpublic boolean isRowVisible(int row)
true
if the given row is visible.
row
- the row index of row whose visibility is required
public int getNumColumns()
public int getNumRows()
public int getNumVisibleColumns()
public int getNumVisibleRows()
public com.klg.jclass.table.JCCellPosition getPosition(Component c)
JCCellPosition
of the given component in table.
Returns null if the component is not found.
c
- the component whose position is required
public void resetSwappedColumns()
public void resetSwappedRows()
public void resetSortedRows()
resetSwappedRows
and resetSortedRows
perform the same function.
public boolean isResizable(int row, int column)
public int getRowPixelHeight(int row)
row
- the index of the row whose pixel height is required
public boolean sortByColumn(int column, int direction)
SortableDataViewModel
.
column
- the column on which to base the sortdirection
- either Sort.ASCENDING
or
Sort.DESCENDING
public boolean sortByColumn(int column, int direction, int start_row, int end_row)
SortableDataViewModel
.
column
- the column on which to base the sortdirection
- either Sort.ASCENDING
or Sort.DESCENDING
start_row
- the start row of the sortend_row
- the end row of the sort
public boolean sortByColumn(int[] column, int[] direction)
SortableDataViewModel
.
column
- a list of columns by which to sortdirection
- a corresponding list of directions to sort
public boolean sortByColumn(int[] column, int[] direction, int start_row, int end_row)
SortableDataViewModel
.
column
- a list of columns by which to sortdirection
- a corresponding list of directions to sortstart_row
- the start row of the sortend_row
- the end row of the sort
public boolean swapColumns(int column1, int column2)
column1
- the first column to swapcolumn2
- the second column to swap
public boolean swapRows(int row1, int row2)
JCTblEnum.SELECT_MULTIRANGE
,
the selected cells follow the new row order.
row1
- the first row to swaprow2
- the second row to swap
setSelectionPolicy(int)
public boolean traverse(int row, int column, boolean show_editor, boolean select)
commitEdit
is first called to commit the edit in the current
cell. If commitEdit
returns false
,
traverse
returns false
and does not move the focus.
If the cell is not traversable, the method returns false
.
row
- the row to traverse tocolumn
- the column to traverse toshow_editor
- if true
, the editing component is displayed
in the cellselect
- if true
and the SelectionPolicy
allows it, the cell is selected
public boolean traverse(int direction)
direction
- the direction to traverse; one of
JCTableEnum.TRAVERSE_DOWN
,
JCTableEnum.TRAVERSE_UP
,
JCTableEnum.TRAVERSE_LEFT
,
JCTableEnum.TRAVERSE_RIGHT
,
JCTableEnum.TRAVERSE_PAGEUP
,
JCTableEnum.TRAVERSE_PAGEDOWN
,
JCTableEnum.TRAVERSE_HOME
,
JCTableEnum.TRAVERSE_END
,
JCTableEnum.TRAVERSE_TOP
, or
JCTableEnum.TRAVERSE_BOTTOM
public boolean isTraversable(int row, int column)
true
if the given cell is traversable.
row
- the row index of the cellcolumn
- the column index of the cell
protected boolean isValidCell(int row, int column)
true
if the given cell is valid.
row
- the row index of the cellcolumn
- the column index of the cell
public com.klg.jclass.table.JCCellRange getVisibleCells()
public com.klg.jclass.table.JCCellPosition XYToCell(int x, int y)
x
- the x positiony
- the y position
public boolean isTracking()
public void addAction(com.klg.jclass.table.ActionInitiator initiator, int action)
ActionInitiator
/action pair to table (stored in a
TableAction
).
initiator
- the key or mouse event initiating the actionaction
- the action to addaddAction(TableAction)
public void addAction(com.klg.jclass.table.TableAction tableAction)
TableAction
to table. A TableAction
maps an event to a particular action on table. Valid
actions include:
tableAction
- defines a mapping from a user event to an action
performed on the tablepublic int getAction(AWTEvent event, int row, int column)
JCTableEnum.NOVALUE
is returned.
event
- the event to which an action is to be mappedrow
- the row on which the action is to be takencolumn
- the column on which the action is to be taken
public void removeAction(com.klg.jclass.table.TableAction tableAction)
tableAction
- the action to be removedpublic void removeAction(com.klg.jclass.table.ActionInitiator initiator, int action)
ActionInitiator
/action pair from table.
initiator
- the key or mouse event initiating the actionaction
- the action to removepublic void removeAction(int action)
ActionInitiator
set for the given action type.
action
- the action to be removedpublic void removeAllActions()
protected void processMouseEvent(MouseEvent e)
processMouseEvent
in class Component
protected void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent
in class JComponent
protected void processKeyEvent(KeyEvent e)
processKeyEvent
in class JComponent
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvent e)
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseClicked(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e)
public void keyTyped(KeyEvent e)
public com.klg.jclass.table.SelectionModel getSelectionModel()
SelectionModel
manager.
SelectionModel
managerprotected void createDefaultSelectionModel()
SelectionModel
manager.
public void setSelectionModel(com.klg.jclass.table.SelectionModel selectionHandler)
SelectionModel
manager.
selectionHandler
- the new selection handlerpublic boolean setRowSelection(int start_row, int end_row)
start_row
- the start row of the selectionend_row
- the end row of the selection
public boolean setColumnSelection(int start_column, int end_column)
start_column
- the start column of the selectionend_column
- the end column of the selection
public boolean setSelection(int start_row, int start_column, int end_row, int end_column)
start_row
- the start row of the selectionend_row
- the end row of the selectionstart_column
- the start column of the selectionend_column
- the end column of the selection
public boolean addRowSelection(int start_row, int end_row)
start_row
- the start row of the selection to addend_row
- the end row of the selection to add
public boolean addColumnSelection(int start_column, int end_column)
start_column
- the start column of the selection to addend_column
- the end column of the selection to add
public boolean addSelection(int start_row, int start_column, int end_row, int end_column)
start_row
- the start row of the selection to addend_row
- the end row of the selection to addstart_column
- the start column of the selection to addend_column
- the end column of the selection to add
public void clearSelection()
public boolean selectAll()
public Collection getSelectedCells()
SelectedCells
value.
JCCellRange
objectssetSelectedCells(java.util.Collection)
public void clearSelectedCells()
setSelectedCells(java.util.Collection)
public boolean setSelectedCells(Collection v)
JCCellRange
.
v
- the collection which contains a list of ranges to select
public boolean setSelectedCells(com.klg.jclass.table.JCCellRange r)
clearSelectedCells()
.
r
- the range to select
clearSelectedCells()
public boolean isSelected(int row, int column)
row
- the row index of the cellcolumn
- the column index of the cell
public void repaintSelected()
public com.klg.jclass.table.SpanHandler getSpanHandler()
protected void createDefaultSpanHandler()
public void setSpanHandler(com.klg.jclass.table.SpanHandler spanHandler)
spanHandler
- the new span managerpublic void addSpannedRange(com.klg.jclass.table.JCCellRange cr) throws IllegalArgumentException
JCCellRange
as a new spanned region. An
IllegalArgumentException
is thrown if the
JCCellRange
is invalid or overlaps an existing spanned cell
range.
cr
- the range defining the new spanned region to add
IllegalArgumentException
- Thrown if a cell range
overlaps an existing spanned cell range.public void clearSpannedRanges()
public Collection getSpannedRanges()
public void removeSpannedRange(com.klg.jclass.table.JCCellRange cr)
cr
- the range to removepublic void setSpannedRanges(Collection ranges) throws IllegalArgumentException
JCCellRanges
.
Ranges are validated in order of iteration in the Collection.
ranges
- the collection of ranges to which the spanned cell ranges are
to be set
IllegalArgumentException
- Thrown if a cell range
overlaps an existing spanned cell range.public com.klg.jclass.table.JCCellRange getSpannedRange(int row, int column)
JCCellRange
that represents that the spanned region
contains the given row and column. If the row and column aren't in a span,
null is returned.
row
- the row within the spanned rangecolumn
- the column within the spanned range
public boolean getPointerTraverseForcesEdit()
PointerTraverseForcesEdit
property.
PointerTraverseForcesEdit
is used to determine what happens
when a user selects a new editable cell when another edit
is active and the value in the editor cannot be committed.
In JClass 4.0.1 and earlier, the only possible behaviour was to
warn the user, cancel the edit and start editing in the
new cell. This corresponds to a value of true
for this
property. If PointerTraverseForcesEdit
is set to
false
, the current editor remains active, and traversal doesn't
occur.
public void setPointerTraverseForcesEdit(boolean nval)
PointerTraverseForcesEdit
property.
PointerTraverseForcesEdit
is used to determine what happens
when a user selects a new editable cell when another edit
is active and the value in the editor cannot be committed.
In JClass 4.0.1 and earlier, the only possible behaviour was to
warn the user, cancel the edit and start editing in the
new cell. This corresponds to a value of true
for this
property. If PointerTraverseForcesEdit
is set to
false
, the current editor remains active, and traversal doesn't
occur.
nval
- the new value of PointerTraverseForcesEdit
public void paintComponent(Graphics gc)
paintComponent
in class JComponent
public void reshape(int x, int y, int width, int height)
reshape
in class JComponent
protected com.klg.jclass.table.CellSize getRowCellSize(int row)
CellSize
object for a row.
row
- the index of the row
CellSize
object for the given rowsetRowCellSize(int, com.klg.jclass.table.CellSize)
protected void setRowCellSize(int row, com.klg.jclass.table.CellSize value)
CellSize
object for a row.
row
- the index of the rowvalue
- the new CellSize
value for the given rowprotected com.klg.jclass.table.CellSize getColumnCellSize(int column)
CellSize
object for a column.
column
- the index of the column
CellSize
object for the given columnsetColumnCellSize(int, com.klg.jclass.table.CellSize)
protected void setColumnCellSize(int column, com.klg.jclass.table.CellSize value)
CellSize
object for a column.
column
- the index of the columnvalue
- the new CellSize
value for the given columnprotected void setColumnWidthChanged(int column)
column
- the column to base changes onprotected boolean isRelayoutRequired()
true
if a relayout is required.
setRelayoutRequired(boolean)
protected void setRelayoutRequired(boolean value)
true
, this method forces JClass LiveTable to relayout
its contents when setRepaintEnabled()
is set back to
true
.
value
- if true
, a relayout will be donesetRepaintEnabled(boolean)
,
isRelayoutRequired()
,
setRecalcRequired(boolean)
protected boolean isRecalcRequired()
true
if a recalc is required.
setRecalcRequired(boolean)
protected void setRecalcRequired(boolean value)
true
, this method forces JClass LiveTable
to recalculate all internal dimensions when
setRepaintEnabled()
is set back to true
.
value
- if true
, a recalc will be donesetRepaintEnabled(boolean)
protected boolean isRepaintRequired()
true
if repaint is required.
setRepaintRequired(boolean)
protected void setRepaintRequired(boolean value)
true
, this method forces JClass LiveTable
to repaint the entire contents when setRepaintEnabled()
is set back to true
.
value
- if true
, a repaint will be donesetRepaintEnabled(boolean)
protected void setRowHeightChanged(int row)
row
- the row to base the changes onprotected final int getTextHeightOffset()
protected final int getTextWidthOffset()
protected void requestChange(int flags)
TableChangeHandler.TABLE_RESET
TableChangeHandler.TABLE_REPAINT
TableChangeHandler.TABLE_LAYOUT
TableChangeHandler.TABLE_RECALC_ROW_HEIGHTS
TableChangeHandler.TABLE_RECALC_COLUMN_WIDTHS
flags
- indicates the type of change(s)requestChange(int, int, int)
protected void requestChange(int flags, int row, int column)
TableChangeHandler.TABLE_RESET
TableChangeHandler.TABLE_REPAINT
TableChangeHandler.TABLE_LAYOUT
TableChangeHandler.TABLE_RECALC_ROW_HEIGHTS
TableChangeHandler.TABLE_RECALC_COLUMN_WIDTHS
TableChangeHandler.CELL_RECALC_HEIGHT
TableChangeHandler.CELL_RECALC_WIDTH
TableChangeHandler.CELL_REPAINT
flags
- indicates the type of change(s)row
- the row index of the cell to be changedcolumn
- the column index of the cell to be changedprotected void requestChange(int flags, com.klg.jclass.table.JCCellRange cr)
flags
- indicates the type of change(s)cr
- the range for which to process the change requestsrequestChange(int, int, int)
protected int XtoColumn(int x)
x
- the x pixel position
protected int YtoRow(int y)
y
- the y pixel position
protected Class getColumnClass(int column)
column
- the column index of the column whose class is required
protected void fireJCCellDisplayEvent(com.klg.jclass.table.JCCellDisplayEvent event)
JCCellDisplayEvents
.
event
- the event to be firedpublic void addCellDisplayListener(com.klg.jclass.table.JCCellDisplayListener l)
JCCellDisplayEvent
objects.
l
- the listener to be addedJCCellDisplayEvent
public void removeCellDisplayListener(com.klg.jclass.table.JCCellDisplayListener l)
JCCellDisplayEvent
objects.
l
- the listener to be removedaddCellDisplayListener(com.klg.jclass.table.JCCellDisplayListener)
protected void fireJCEditCellEvent(com.klg.jclass.table.JCEditCellEvent event)
JCEditCellEvents
.
event
- the event to be firedpublic void addEditCellListener(com.klg.jclass.table.JCEditCellListener l)
JCEditCellEvent
objects.
l
- the listener to be addedJCEditCellEvent
public void removeEditCellListener(com.klg.jclass.table.JCEditCellListener l)
JCEditCellEvent
objects.
l
- the listener to be removedaddEditCellListener(com.klg.jclass.table.JCEditCellListener)
protected void fireJCPaintEvent(com.klg.jclass.table.JCPaintEvent event)
JCPaintEvents
.
event
- the event to be firedpublic void addPaintListener(com.klg.jclass.table.JCPaintListener l)
JCPaintEvent
objects.
l
- the listener to be addedJCPaintEvent
public void removePaintListener(com.klg.jclass.table.JCPaintListener l)
JCPaintEvent
objects.
l
- the listener to be removedaddPaintListener(com.klg.jclass.table.JCPaintListener)
protected void fireJCResizeCellEvent(com.klg.jclass.table.JCResizeCellEvent event)
JCResizeCellEvents
.
event
- the event to be firedprotected com.klg.jclass.table.JCResizeCellEvent doResizeEvents(int row, int column, int oldWidth, int oldHeight, int newWidth, int newHeight)
BEFORE_RESIZE
and
AFTER_RESIZE
events. Called by
setChartWidth/Height
, setPixelWidth/Height
, and
setMarginWidth/Height
.
row
- the row being resizedcolumn
- the column being resizedoldWidth
- the original column widtholdHeight
- the original row heightnewWidth
- the new column widthnewHeight
- the new row height
public void addResizeCellListener(com.klg.jclass.table.JCResizeCellListener l)
JCResizeCellEvent
objects.
l
- the listener to be addedJCResizeCellEvent
public void removeResizeCellListener(com.klg.jclass.table.JCResizeCellListener l)
JCResizeCellListener
objects.
l
- the listener to be removedaddResizeCellListener(com.klg.jclass.table.JCResizeCellListener)
protected void fireJCResizeCellMotionEvent(com.klg.jclass.table.JCResizeCellEvent event)
JCResizeCellEvents
to
JCResizeCellMotionListeners
.
event
- the event to be firedpublic void addResizeCellMotionListener(com.klg.jclass.table.JCResizeCellMotionListener l)
JCResizeCellEvent
objects during the resize drag
process.
l
- the listener to be addedJCResizeCellEvent
public void removeResizeCellMotionListener(com.klg.jclass.table.JCResizeCellMotionListener l)
JCResizeCellMotionListener
objects.
l
- the listener to be removedaddResizeCellMotionListener(com.klg.jclass.table.JCResizeCellMotionListener)
protected void fireJCScrollEvent(com.klg.jclass.table.JCScrollEvent event)
JCScrollEvents
.
event
- the event to be firedpublic void addScrollListener(com.klg.jclass.table.JCScrollListener l)
JCScrollEvent
objects.
l
- the listener to be addedJCScrollEvent
public void removeScrollListener(com.klg.jclass.table.JCScrollListener l)
JCScrollListener
objects.
l
- the listener to be removedaddScrollListener(com.klg.jclass.table.JCScrollListener)
protected void fireJCSelectEvent(com.klg.jclass.table.JCSelectEvent event)
JCSelectEvents
.
event
- the event to be firedpublic void addSelectListener(com.klg.jclass.table.JCSelectListener l)
JCSelectEvent
objects.
l
- the listener to be addedJCSelectEvent
public void removeSelectListener(com.klg.jclass.table.JCSelectListener l)
JCSelectEvent
objects.
l
- the listener to be removedaddSelectListener(com.klg.jclass.table.JCSelectListener)
protected void fireJCSortEvent(com.klg.jclass.table.JCSortEvent event)
JCSortEvents
.
event
- the event to be firedpublic void addSortListener(com.klg.jclass.table.JCSortListener l)
JCSortEvent
objects.
l
- the listener to be addedJCSortEvent
public void removeSortListener(com.klg.jclass.table.JCSortListener l)
JCSortListener
objects.
l
- the listener to be removedaddSortListener(com.klg.jclass.table.JCSortListener)
protected void fireJCTraverseCellEvent(com.klg.jclass.table.JCTraverseCellEvent event)
JCTraverseCellEvents
.
event
- the event to be firedpublic void addTraverseCellListener(com.klg.jclass.table.JCTraverseCellListener l)
JCTraverseCellEvent
objects.
l
- the listener to addJCTraverseCellEvent
public void removeTraverseCellListener(com.klg.jclass.table.JCTraverseCellListener l)
JCTraverseCellListener
objects.
l
- the listener to removeaddTraverseCellListener(com.klg.jclass.table.JCTraverseCellListener)
public void dispose()
JCTable
can be disposed.
protected com.klg.jclass.table.TablePopupMenu createPopupMenu()
protected boolean showPopupMenu(int x, int y)
x
- the x position to place the popup menuy
- the y position to place the popup menu
public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
event
- the event generated by the actionprotected void hideShowColumns(boolean hide)
hide
- if true
, hide columns; if false
,
show columnsprotected void goToRow()
public void requestFocus()
requestFocus
in class JComponent
public void focusGained(FocusEvent event)
focusGained
in interface FocusListener
event
- the event generated when the table gains focuspublic void focusLost(FocusEvent event)
focusLost
in interface FocusListener
event
- the event generated when the table loses focuspublic String getLicense()
public void setLicense(String s)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |