JIDE 3.5.15

com.jidesoft.grid
Class PropertyTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by com.jidesoft.grid.JideTable
                      extended by com.jidesoft.grid.ContextSensitiveTable
                          extended by com.jidesoft.grid.NavigableTable
                              extended by com.jidesoft.grid.CellStyleTable
                                  extended by com.jidesoft.grid.CellSpanTable
                                      extended by com.jidesoft.grid.CategorizedTable
                                          extended by com.jidesoft.grid.SortableTable
                                              extended by com.jidesoft.grid.TreeTable
                                                  extended by com.jidesoft.grid.PropertyTable
All Implemented Interfaces:
IndexChangeListener, SortListener, TableAdapter, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class PropertyTable
extends TreeTable

PropertyTable is a two-column table which name/value pair can be shown. The first column is the name of the property and the second column is the value of the property. You can categorize different properties, as each category appears as gray bold text in example below. Each category is just like a group of properties. You can collapse category which you can not interested in so that only properties you are interested at will be shown.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.grid.TreeTable
TreeTable.DelegateExpandMouseInputListener, TreeTable.ExpandMouseListener, TreeTable.TreeTableAction
 
Nested classes/interfaces inherited from class com.jidesoft.grid.CellSpanTable
CellSpanTable.DelegateAction
 
Nested classes/interfaces inherited from class com.jidesoft.grid.JideTable
JideTable.NonContiguousTransferHandler
 
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int SHOW_NONEDITABLE_BOTH_NAME_VALUE
           
static int SHOW_NONEDITABLE_NAME_ONLY
           
static int SHOW_NONEDITABLE_NEITHER
           
static int SHOW_NONEDITABLE_VALUE_ONLY
           
 
Fields inherited from class com.jidesoft.grid.TreeTable
CLIENT_PROPERTY_DO_NOT_PAINT_CELL_CONTENT_BACKGROUND, PROPERTY_DOUBLE_CLICK_ENABLED, PROPERTY_EXPANDABLE_COLUMN, PROPERTY_SELECT_ROW_WHEN_TOGGLING, PROPERTY_SHOW_LEAF_NODE_TREE_LINES, PROPERTY_SHOW_TREE_LINES, PROPERTY_TREE_LINE_COLOR
 
Fields inherited from class com.jidesoft.grid.SortableTable
MULTICOLUMN_SORTABLE_PROPERTY, PROPERTY_SHOW_SORT_ORDER_NUMBER, SORTABLE_PROPERTY
 
Fields inherited from class com.jidesoft.grid.CategorizedTable
DEFAULT_ASCENDING_ICON, DEFAULT_DESCENDING_ICON, PROPERTY_EXPAND_ICON_VISIBLE
 
Fields inherited from class com.jidesoft.grid.CellSpanTable
AUTO_CELL_MERGE_COLUMNS, AUTO_CELL_MERGE_COLUMNS_LIMITED, AUTO_CELL_MERGE_OFF, AUTO_CELL_MERGE_ROWS, AUTO_CELL_MERGE_ROWS_LIMITED, PROPERTY_AUTO_CONVERT_CELL_SPAN, PROPERTY_PAINT_CELL_SPAN_AS_SELECTED
 
Fields inherited from class com.jidesoft.grid.CellStyleTable
_cellStyleList, PROPERTY_FILLS_SELECTION, PROPERTY_FILLS_VIEWPORT_WITH_STRIPE
 
Fields inherited from class com.jidesoft.grid.JideTable
_batchProcessing, _cellChangeEvent, _clickCountToStart, _columnAutoResizer, _columnResizer, _headerDraggingMouseMotionListener, _rolloverCellEditor, _rolloverCellEditorListener, _rolloverColumn, _rolloverEditorComp, _rolloverEditorRemover, _rolloverRow, _rowHeights, _rowResizer, ACTION_NAME_CANCEL_EDITING, AUTO_RESIZE_ALL_COLUMNS_FILL, AUTO_RESIZE_FILL, AUTO_RESIZE_LAST_COLUMN_FILL, AUTO_RESIZE_NEXT_COLUMN_FILL, AUTO_RESIZE_SUBSEQUENT_COLUMNS_FILL, CLIENT_PROPERTY_LAZY_CALCULATE_ROW_HEIGHT, EDITOR_AUTO_COMPLETION_MODE_COLUMN, EDITOR_AUTO_COMPLETION_MODE_NONE, EDITOR_AUTO_COMPLETION_MODE_ROW, EDITOR_AUTO_COMPLETION_MODE_TABLE, PROPERTY_CLEAR_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_EDITOR_AUTO_COMPLETION_MODE, PROPERTY_FILLS_BOTTOM, PROPERTY_FILLS_GRIDS, PROPERTY_FILLS_RIGHT, PROPERTY_LOAD_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_NON_CONTIGUOUS_CELL_SELECTION, PROPERTY_ROW_AUTO_RESIZES, PROPERTY_SCROLL_ROW_WHEN_ROW_HEIGHT_CHANGES, PROPERTY_TABLE_SELECTION_MODEL, ROW_AUTO_RESIZES_PROPERTY
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
 
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
PropertyTable()
          Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
PropertyTable(TableModel tableModel)
          Constructs a JTable that is initialized with tableModel as the data model, a default column model, and a default selection model.
 
Method Summary
protected  String convertElementToString(Object value, int row, int column)
          Get the displayed string of the specified value in designated row and column.
protected  TableCellRenderer createPropertyCellRenderer()
           
 JToolTip createToolTip()
          Returns the instance of JToolTip that should be used to display the tooltip.
 TableCellEditor getCellEditor(int row, int column)
          Returns the cell editor.
 TableCellRenderer getCellRenderer(int row, int column)
          Returns an appropriate renderer for the cell specified by this row and column.
 Rectangle getEditorCellRect(int rowIndex, int columnIndex)
          In TreeTable and HierarchicalTable case, the cell rect for cell editor should consider the +/- icon size so the cell editor doesn't cover the +/- icon.
 TableCellRenderer getMarginRenderer()
          Gets the margin renderer.
 PropertyTableModel getPropertyTableModel()
          Get the wrapped PropertyTableModel instance.
 Property getSelectedProperty()
          Gets the selected property.
 int getShowNonEditable()
          Checks if non-editable property is shown as gray.
 Point getToolTipLocation(MouseEvent event)
          Returns the tooltip location in this component's coordinate system.
 String getToolTipText(MouseEvent event)
           
 boolean isHideMargin()
          Get the flag indicating if the left margin area should be hidden to save space.
protected  void muteDefaultKeyStroke()
           
protected  boolean needToolTip(int row, int column, MouseEvent event)
          Checks if tooltip is need for the cell at the specified row and column.
 Component prepareEditor(TableCellEditor editor, int row, int column)
          Override this method to get the style from CellStyle defined by StyleModel and set it to component return from super.prepareEditor().
 Component prepareRenderer(TableCellRenderer renderer, int row, int column)
          Override this method to get the style from CellStyle defined by StyleModel and set it to component return from super.prepareRenderer().
protected  void resizeColumn(int newWidth)
           
 void setHideMargin(boolean hideMargin)
          Set the flag indicating if the left margin area should be hidden to save space.
 void setMarginRenderer(TableCellRenderer marginRenderer)
          Sets the margin renderer.
 void setModel(TableModel tableModel)
          Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
 void setSelectedProperty(Property property)
          Selects the specified property.
 void setShowNonEditable(int showNonEditable)
          Sets if non-editable property is shown as gray.
 
Methods inherited from class com.jidesoft.grid.TreeTable
addSelectedRow, addSelectedRows, addTreeExpansionListener, addTreeWillExpandListener, alwaysCalculateCellRect, collapseAll, collapseFirstLevel, collapseLastLevel, createCellRenderer, createDelegateAction, createExpandMouseInputListener, createExpandMouseListener, createSortableTableModel, expandableRowAtPoint, expandAll, expandFirstLevel, expandNextLevel, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, getActualCellRenderer, getActualUIClassID, getCellAt, getCellRect, getDragExpandDelay, getExpandableColumn, getExpandableColumnViewIndex, getHorizontalLegPosition, getIndent, getIndent, getLeftMargin, getRowAt, getRowIndex, getShowsRootHandles, getTreeExpansionListeners, getTreeLineColor, getTreeTableModel, getTreeWillExpandListeners, getVerticalLineStartPosition, handleMouseEvent, isCompareCurrentSelection, isDoubleClickEnabled, isExpandable, isExpandAllAllowed, isExportCollapsedRowsToExcel, isRespectRenderPreferredHeight, isSelectParentRowWhenCollapsing, isSelectRowWhenToggling, isShowLeafNodeTreeLines, isShowTreeLines, removeNotify, removeSelectedRow, removeSelectedRows, removeTreeExpansionListener, removeTreeWillExpandListener, setCompareCurrentSelection, setDoubleClickEnabled, setDragExpandDelay, setExpandable, setExpandableColumn, setExpandAllAllowed, setExportCollapsedRowsToExcel, setIndent, setLeftMargin, setRespectRenderPreferredHeight, setSelectedRow, setSelectedRows, setSelectParentRowWhenCollapsing, setSelectRowWhenToggling, setShowLeafNodeTreeLines, setShowsRootHandles, setShowTreeLines, setTreeLineColor, shouldDisplayExpandIcon, shouldPaintHorizontalLeg, tableChanged, toggleRow, updateUI
 
Methods inherited from class com.jidesoft.grid.SortableTable
createDefaultTableHeader, createSortableTableHeaderMouseListener, createSortIcon, getActualRowAt, getSortableHeaderMouseListener, getSortableTableModel, getSortArrowForeground, getSortedRowAt, getSortOrderForeground, isAutoResort, isEnsureSelectedRowVisibleOnTogglingSort, isMultiColumnSortable, isOptimized, isPreserveSelectionsAfterSorting, isReusable, isShowSortOrderNumber, isSortable, isSortingEnabled, resort, setAutoResort, setEnsureSelectedRowVisibleOnTogglingSort, setMultiColumnSortable, setOptimized, setPreserveSelectionsAfterSorting, setShowSortOrderNumber, setSortable, setSortArrowForeground, setSortingEnabled, setSortOrderForeground, sortChanged, sortChanging, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, unsort
 
Methods inherited from class com.jidesoft.grid.CategorizedTable
getAscendingIcon, getCategoryCollapsedIcon, getCategoryExpandedIcon, getCollapsedIcon, getCollapsedIcon, getDescendingIcon, getDisabledBackground, getDisabledForeground, getExpandedIcon, getExpandedIcon, getMarginBackground, isExpandIconVisible, isPaintMarginBackground, isUseLnfDefaultSortIcon, isUseTableRendererForCategoryRow, setAscendingIcon, setCategoryCollapsedIcon, setCategoryExpandedIcon, setCollapsedIcon, setDescendingIcon, setDisabledBackground, setDisabledForeground, setExpandedIcon, setExpandIconVisible, setMarginBackground, setPaintMarginBackground, setUseLnfDefaultSortIcon, setUseTableRendererForCategoryRow
 
Methods inherited from class com.jidesoft.grid.CellSpanTable
binarySearch, calculateRowHeight, calculateRowHeight, calculateRowHeights, columnAdded, columnAtPoint, columnMoved, columnRemoved, convertModelCellSpanToView, convertViewCellSpanToModel, createCellSpanCache, editCellAt, getActualRowHeight, getAutoCellMerge, getCache, getCacheEmpty, getCellRect, getCellSpanAt, getCellSpanAt, getCellSpanFromAutoCellMerge, getCellSpanFromSpanModel, getDirtyRegion, getScrollableUnitIncrement, getSpanModel, getValueAt, invalidateCellSpanCache, isAutoConvertCellSpan, isCellFocused, isCellSelected, isCellSpanCacheEnabled, isCellSpanOn, isKeepColumnAtPoint, isKeepRowAtPoint, isPaintCellSpanAsSelected, originalColumnAtPoint, originalGetCellRect, originalRowAtPoint, replaceAction, replaceAction, restoreAction, restoreAction, rolloverCellAt, rowAtPoint, setAutoCellMerge, setAutoConvertCellSpan, setCellSpanCacheEnabled, setKeepColumnAtPoint, setKeepRowAtPoint, setPaintCellSpanAsSelected, shouldCellBePaintedAsFocused, shouldCellBePaintedAsSelected, valueChanged, verifyCellSpan, verifyCellSpan
 
Methods inherited from class com.jidesoft.grid.CellStyleTable
addCellStyleCustomizer, clearCellStyleCustomizers, collectCellStyles, configureEditorComponent, configureRendererComponent, customizeEditorComponent, customizeRendererComponent, getCellStyleAt, getCellStyleCustomizers, getCellStyleProvider, getCellStyles, getFocusCellStyle, getNextStyleModel, getStyleModel, getTableStyleProvider, isFillsSelection, isFillsViewportWithStripe, mergeCellStyle, mergeCellStyles, needPaintStripedBackground, paintCellOverlay, paintCellUnderlay, paintComponent, releaseRendererComponent, removeCellStyleCustomizer, setCellStyleProvider, setFillsSelection, setFillsViewportWithStripe, setFocusCellStyle, setTableStyleProvider
 
Methods inherited from class com.jidesoft.grid.NavigableTable
changeSelection, findNearestNavigableCellInColumn, findNearestNavigableCellInRow, findNextNavigableCell, findNextNavigableCellInColumn, findNextNavigableCellInRow, findNextNavigableCellVertically, findPreviousNavigableCell, findPreviousNavigableCellInColumn, findPreviousNavigableCellInRow, findPreviousNavigableCellVertically, getNavigableModel, getNextNavigableModel, isCellNavigable, isNavigationKey, processKeyBinding
 
Methods inherited from class com.jidesoft.grid.ContextSensitiveTable
createDefaultTransferHandler, getCellClassAt, getCellEditorFromManager, getCellRendererFromManager, getConverterContextAt, getDefaultCellRenderer, getEditorContextAt, invalidateCellRendererCache, isCellEditorManagerEnabled, isCellRendererManagerEnabled, setCellEditorManagerEnabled, setCellRendererManagerEnabled, setDefaultCellRenderer
 
Methods inherited from class com.jidesoft.grid.JideTable
addCellEditorListener, addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, addRowValidator, addUndo, addUndoableEditListener, addValidator, adjustSelectionWhenColumnMoved, calculateAutoResizedRowHeights, calculateAutoResizedRowHeights, clearSelection, clearSelectionPermanently, columnSelectionChanged, configureEnclosingScrollPaneExplicitly, convertRowIndexToModel, convertRowIndexToView, createCellAutoCompletion, createDefaultColumnsFromModel, createDefaultSelectionModel, createDefaultTableSelectionModel, createRowAutoScrollingListener, createRowHeights, createSortHeaderRenderer, editingCanceled, editingStopped, fireEditingCanceled, fireEditingStarted, fireEditingStarting, fireEditingStopped, fireEditingStopping, getCellEditorListeners, getClickCountToStart, getDefaultRenderer, getEditorAutoCompletionMode, getEditorAutoCompletionMode, getGridColor, getGridColorProvider, getRolloverCellEditor, getRolloverColumn, getRolloverRow, getRowHeight, getRowHeights, getRowValidator, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getTableColumnWidthKeeper, getTableHeaderToolTipText, getTableHeaderToolTipText, getTableSelectionModel, getTextComponentForEditorComponent, getUndoManager, getValidator, getVerticalGridColor, indexChanged, initTable, isAdjustEditorLocationOnModelChanged, isAlwaysRequestFocusForEditor, isAutoResizeFillMode, isAutoSelectTextWhenStartsEditing, isAutoStartCellEditing, isAutoStartCellEditingKey, isBatchProcessing, isCalculateRowHeightsOnWidthChange, isCellContentVisible, isClearPropertyAtStructureChange, isClearSelectionOnTableDataChanges, isColumnAutoResizable, isColumnResizable, isColumnSelected, isEnableIgnored, isFillBottom, isFillGrids, isFillRight, isFillsBottom, isFillsGrids, isFillsGridsBottom, isFillsGridsRight, isFillsRight, isKeepRowHeights, isLoadSelectionOnTableDataChanged, isNestedTableHeader, isNonContiguousCellSelection, isRollover, isRowAutoResizes, isRowHeightChanged, isRowResizable, isRowSelected, isScrollRowWhenRowHeightChanges, isSelectInsertedRows, isTablePrinting, isValidCellEditingKey, isVariousRowHeights, loadTableRowSettings, paintFillHeader, removeCellEditorListener, removeColumn, removeColumnSelectionInterval, removeEditor, removeRolloverEditor, removeRowSelectionInterval, removeRowValidator, removeUndoableEditListener, removeValidator, resetTransferHandler, saveTableRowSettings, scrollRowToVisible, selectAll, setAdjustEditorLocationOnModelChanged, setAlwaysRequestFocusForEditor, setAutoResizeMode, setAutoSelectTextWhenStartsEditing, setAutoStartCellEditing, setBatchProcessing, setCalculateRowHeightsOnWidthChange, setCellContentVisible, setClearPropertyAtStructureChange, setClearSelectionOnTableDataChanges, setClickCountToStart, setColumnAutoResizable, setColumnResizable, setColumnSelectionAllowed, setColumnSelectionInterval, setEditorAutoCompletionMode, setEnabled, setEnableIgnored, setFillBottom, setFillGrids, setFillRight, setFillsBottom, setFillsGrids, setFillsRight, setGridColorProvider, setKeepRowHeights, setLoadSelectionOnTableDataChanged, setNestedTableHeader, setNonContiguousCellSelection, setPreferredSize, setRowAutoResizes, setRowHeight, setRowHeight, setRowHeights, setRowResizable, setRowSelectionAllowed, setRowSelectionInterval, setScrollRowWhenRowHeightChanges, setSelectInsertedRows, setSortTableHeaderRenderer, setTableColumnWidthKeeper, setTableHeader, setTablePrinting, setTableSelectionModel, setVariousRowHeights, startCellEditing, validate, validateRow
 
Methods inherited from class javax.swing.JTable
columnMarginChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createScrollPaneForTable, doLayout, editCellAt, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, initializeLocalVars, isCellEditable, isEditing, moveColumn, paramString, print, print, print, print, print, resizeAndRepaint, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setCellEditor, setCellSelectionEnabled, setColumnModel, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowMargin, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jidesoft.grid.TableAdapter
getCellSelectionEnabled, getColumnClass, getColumnCount, getColumnName, getColumnSelectionAllowed, getRowCount, getRowSelectionAllowed, isCellEditable, setCellSelectionEnabled, setValueAt
 

Field Detail

SHOW_NONEDITABLE_BOTH_NAME_VALUE

public static final int SHOW_NONEDITABLE_BOTH_NAME_VALUE
See Also:
Constant Field Values

SHOW_NONEDITABLE_VALUE_ONLY

public static final int SHOW_NONEDITABLE_VALUE_ONLY
See Also:
Constant Field Values

SHOW_NONEDITABLE_NAME_ONLY

public static final int SHOW_NONEDITABLE_NAME_ONLY
See Also:
Constant Field Values

SHOW_NONEDITABLE_NEITHER

public static final int SHOW_NONEDITABLE_NEITHER
See Also:
Constant Field Values
Constructor Detail

PropertyTable

public PropertyTable(TableModel tableModel)
Constructs a JTable that is initialized with tableModel as the data model, a default column model, and a default selection model.

Parameters:
tableModel - the data model for the table. It must be an instance of PropertyTableModel or wrapped an instance of PropertyTableModel
See Also:
JTable.createDefaultColumnModel(), JideTable.createDefaultSelectionModel()

PropertyTable

public PropertyTable()
Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.

See Also:
JTable.createDefaultDataModel(), JTable.createDefaultColumnModel(), JideTable.createDefaultSelectionModel()
Method Detail

muteDefaultKeyStroke

protected void muteDefaultKeyStroke()
Overrides:
muteDefaultKeyStroke in class TreeTable

createPropertyCellRenderer

protected TableCellRenderer createPropertyCellRenderer()

convertElementToString

protected String convertElementToString(Object value,
                                        int row,
                                        int column)
Description copied from class: JideTable
Get the displayed string of the specified value in designated row and column.

Overrides:
convertElementToString in class ContextSensitiveTable
Parameters:
value - the cell value
row - the row of the cell
column - the column of the cell
Returns:
the string to be displayed in the cell on renderering.

setModel

public void setModel(TableModel tableModel)
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.

If the table is in editing mode, it will stop cell editing first.

Overrides:
setModel in class TreeTable
Parameters:
tableModel - the new data source for this table. It must be an instance of PropertyTableModel or wrapped an instance of PropertyTableModel
Throws:
IllegalArgumentException - if newModel is null or tableModel is not an instance of PropertyTableModel. ProperyTable only supports PropertyTableModel. description: The model that is the source of the data for this view.
See Also:
JTable.getModel()

getPropertyTableModel

public PropertyTableModel getPropertyTableModel()
Get the wrapped PropertyTableModel instance.

Returns:
the PropertyTableModel instance.

setSelectedProperty

public void setSelectedProperty(Property property)
Selects the specified property. In PropertyTable, a property could be at different row index, the old way to select a row using selection model won't work. This method will make it easier to select a row by passing in the property which you usually know.

Parameters:
property - the property to be selected

getSelectedProperty

public Property getSelectedProperty()
Gets the selected property.

Returns:
the selected property

createToolTip

public JToolTip createToolTip()
Returns the instance of JToolTip that should be used to display the tooltip. Components typically would not override this method, but it can be used to cause different tooltip to be displayed differently.

Overrides:
createToolTip in class JComponent
Returns:
the JToolTip used to display this toolTip

getToolTipLocation

public Point getToolTipLocation(MouseEvent event)
Returns the tooltip location in this component's coordinate system. If null is returned, Swing will choose a location. The default implementation returns null.

Overrides:
getToolTipLocation in class JComponent
Parameters:
event - the MouseEvent that caused the ToolTipManager to show the tooltip
Returns:
returns the tool tip location

needToolTip

protected boolean needToolTip(int row,
                              int column,
                              MouseEvent event)
Checks if tooltip is need for the cell at the specified row and column.

Parameters:
row - the row index.
column - the column index.
event - the mouse event.
Returns:
true if tooltip is needed.

getToolTipText

public String getToolTipText(MouseEvent event)
Overrides:
getToolTipText in class JideTable

resizeColumn

protected void resizeColumn(int newWidth)

prepareRenderer

public Component prepareRenderer(TableCellRenderer renderer,
                                 int row,
                                 int column)
Description copied from class: CellStyleTable
Override this method to get the style from CellStyle defined by StyleModel and set it to component return from super.prepareRenderer().

Overrides:
prepareRenderer in class CellStyleTable
Parameters:
renderer - the renderer at the specified cell.
row - the row index.
column - the column index.
Returns:
the component used by paint the cell at the specified row and column.

getCellRenderer

public TableCellRenderer getCellRenderer(int row,
                                         int column)
Returns an appropriate renderer for the cell specified by this row and column.

If the column index is 0 (the first column), the default cell renderer called PropertyTableCellRenderer will be used. This renderer will provide those +/- buttons which is needed in PropertyTable. However if you set your own cell renderer for this column, PropertyTableCellRenderer will use them to paint the area except +/- button.

If column index is 1, we use the following way to find the correct cell renderer. 1. If this is a category row, the default cell renderer PropertyTableCellRenderer is used. It paints nothing but a background to match with the first column of category row.
2. Each property can override getTableCellRenderer(int column) method. If this return a non-null cell renderer, it will be used. By default, getTableCellRenderer(int column) will return the cell renderer registered in CellRendererManager if column passed in is 1. Or else, it will return null.
3. If 2 returns null cell renderer, the cell renderer you set to this column using TableColumn.setCellRenderer() will be used.

Note: Throughout the table package, the internal implementations always use this method to provide renderers so that this default behavior can be safely overridden by a subclass.

Overrides:
getCellRenderer in class TreeTable
Parameters:
row - the row of the cell to render, where 0 is the first row
column - the column of the cell to render, where 0 is the first column
Returns:
the assigned renderer; if null returns the default renderer for this type of object
See Also:
DefaultTableCellRenderer

getCellEditor

public TableCellEditor getCellEditor(int row,
                                     int column)
Returns the cell editor. If column index is 0, the cell editor registered in CellRendorManager for String is used. However in most case, column 0 is not editable which means this cell editor will never be used.

If column index is 1, we use the following way to find the correct cell editor.
1. Each property can override getCellEditor(int column) method. If this return a non-null cell editor, it will be used. By default, getCellEditor(int column) will return the cell renderer registered in CellEditorManager if column passed in is 1. Or else, it will return null.
2. If 1 returns null cell editor, we will use JTable.getDefaultEditor(Class) method to find out the cell editor.

Overrides:
getCellEditor in class CellSpanTable
Parameters:
row - the row index.
column - the column index.
Returns:
the TableCellEditor that does the editing
See Also:
JTable.cellEditor

prepareEditor

public Component prepareEditor(TableCellEditor editor,
                               int row,
                               int column)
Description copied from class: CellStyleTable
Override this method to get the style from CellStyle defined by StyleModel and set it to component return from super.prepareEditor().

Overrides:
prepareEditor in class CellSpanTable
Parameters:
editor - the cell editor.
row - the row index.
column - the column index.
Returns:
the component used to edit the cell at the specified row and column.

getShowNonEditable

public int getShowNonEditable()
Checks if non-editable property is shown as gray.

Returns:
true if non-editable property is shown as gray. Otherwise false.

setShowNonEditable

public void setShowNonEditable(int showNonEditable)
Sets if non-editable property is shown as gray.

Parameters:
showNonEditable - true or false.

getMarginRenderer

public TableCellRenderer getMarginRenderer()
Gets the margin renderer.

Returns:
the margin renderer.

setMarginRenderer

public void setMarginRenderer(TableCellRenderer marginRenderer)
Sets the margin renderer. The margin renderer will be used to paint the margin area of the property table on each row. It will be called with the Property of that row. Both row index and column index are -1 in getTableCellRendererComponent method so do not use them but use the value to find out what property it is for.

Parameters:
marginRenderer - the new margin renderer.

isHideMargin

public boolean isHideMargin()
Get the flag indicating if the left margin area should be hidden to save space.

Returns:
true if the left margin area should be hidden. Otherwise false.
See Also:
setHideMargin(boolean)

setHideMargin

public void setHideMargin(boolean hideMargin)
Set the flag indicating if the left margin area should be hidden to save space.

By default, the flag is false to keep the original behavior. You could set this flag to true to save 16 pixels.

Parameters:
hideMargin - the flag

getEditorCellRect

public Rectangle getEditorCellRect(int rowIndex,
                                   int columnIndex)
Description copied from class: JideTable
In TreeTable and HierarchicalTable case, the cell rect for cell editor should consider the +/- icon size so the cell editor doesn't cover the +/- icon. In order to do it, we introduce EditorCellRect concept. By default, it is same as getCellRect(rowIndex, columnIndex, false). TreeTable and HierarchicalTable will override it to provide a different rect for cell editor.

Overrides:
getEditorCellRect in class TreeTable
Parameters:
rowIndex - the row index.
columnIndex - the column index
Returns:
the cell rect for the cell editor.

JIDE 3.5.15