Package rma.swing
Class RmaJXTreeTable
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.jdesktop.swingx.JXTable
org.jdesktop.swingx.JXTreeTable
rma.swing.RmaJXTreeTable
- All Implemented Interfaces:
ItemListener,MouseListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,CellEditorListener,ListSelectionListener,RowSorterListener,TableColumnModelListener,TableModelListener,Scrollable,org.jdesktop.swingx.event.TableColumnModelExtListener,Modifiable,FormManagementListener
public class RmaJXTreeTable
extends org.jdesktop.swingx.JXTreeTable
implements MouseListener, ItemListener, FormManagementListener, Modifiable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdesktop.swingx.JXTreeTable
org.jdesktop.swingx.JXTreeTable.TreeTableDataAdapter, org.jdesktop.swingx.JXTreeTable.TreeTableHacker, org.jdesktop.swingx.JXTreeTable.TreeTableHackerExt, org.jdesktop.swingx.JXTreeTable.TreeTableHackerExt2, org.jdesktop.swingx.JXTreeTable.TreeTableHackerExt3, org.jdesktop.swingx.JXTreeTable.TreeTableHackerExt4, org.jdesktop.swingx.JXTreeTable.TreeTableHackerExt5, org.jdesktop.swingx.JXTreeTable.TreeTableModelAdapterNested classes/interfaces inherited from class org.jdesktop.swingx.JXTable
org.jdesktop.swingx.JXTable.BooleanEditor, org.jdesktop.swingx.JXTable.GenericEditor, org.jdesktop.swingx.JXTable.NumberEditor, org.jdesktop.swingx.JXTable.TableAdapterNested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintModeNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsFields inherited from class org.jdesktop.swingx.JXTreeTable
DRAG_HACK_FLAG_KEY, DROP_HACK_FLAG_KEYFields inherited from class org.jdesktop.swingx.JXTable
compoundHighlighter, dataAdapter, editorRemover, filteredRowCountChanged, FOCUS_NEXT_COMPONENT, FOCUS_PREVIOUS_COMPONENT, forceRevalidate, HORIZONTALSCROLL_ACTION_COMMAND, isXTableRowHeightSet, MATCH_HIGHLIGHTER, PACKALL_ACTION_COMMAND, PACKSELECTED_ACTION_COMMAND, resetDefaultTableCellRendererHighlighter, searchable, UIPREFIX, USE_DTCR_COLORMEMORY_HACKFields 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, tableHeaderFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear all the cells, leaving cells visible on screenvoidbooleancommitEdit(boolean commit) if editing is occurring, either commit or cancel itprotected JScrollPanebooleanprotected ObjectgetClearedCellValue(int col) get the default value to be used when a cell is cleared.getRowForeground(int rowNum) get the foreground color for the row at rowNumreturn the scroll pane that this table is residing in this is the component that needs added to the screengetToolTipText(MouseEvent event) protected voidinit()booleanreturns whether this table has been modifiedvoideditor listener methodsvoidmouseClicked(MouseEvent arg0) voidmouseEntered(MouseEvent arg0) voidmouseExited(MouseEvent arg0) voidmousePressed(MouseEvent arg0) voidmouseReleased(MouseEvent arg0) voidsetAlternatingReportBackground(boolean b) voidvoidsetColumnWidth(int colNum, int width) set the column width for a given columnvoidsetColumnWidths(int... widths) set the column widths to the array of widths.setComboBoxEditor(int col, Object[] data) setComboBoxEditor(int col, Vector<Object> data) set the column col to have a combo box editor with the dropdown filled with datasetComboBoxRowEditor(TreeNode node, int col, Vector data) sets table up to display multi line headersvoidsetModified(boolean modified) sets whether this table has been modifiedvoidsetRowForeground(int rowNum, Color rfColor) set the foreground color for the row at rowNumMethods inherited from class org.jdesktop.swingx.JXTreeTable
addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, adjustTableRowHeight, adjustTreeRowHeight, applyRenderer, clearSelection, collapseAll, collapsePath, collapseRow, columnMarginChanged, createTreeTableHacker, editCellAt, expandAll, expandPath, expandRow, getCellEditor, getCellRenderer, getComponentAdapter, getEditingRow, getExpandedDescendants, getExpandsSelectedPaths, getHierarchicalColumn, getPathForLocation, getPathForRow, getRowForPath, getScrollsOnExpand, getShowsRootHandles, getStringAt, getToggleClickCount, getTreeCellRenderer, getTreeSelectionModel, getTreeTableHacker, getTreeTableModel, hackAroundDragEnabled, isCollapsed, isCollapsed, isExpanded, isExpanded, isHierarchical, isLargeModel, isOverwriteRendererIcons, isRootVisible, isVisible, prepareRenderer, processMouseEvent, processMouseMotionEvent, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, setAutoCreateRowSorter, setClosedIcon, setCollapsedIcon, setEnabled, setExpandedIcon, setExpandsSelectedPaths, setLargeModel, setLeafIcon, setModel, setOpenIcon, setOverwriteRendererIcons, setRootVisible, setRowHeight, setRowHeight, setRowSorter, setScrollsOnExpand, setSelectionBackground, setSelectionForeground, setSelectionMode, setShowsRootHandles, setSortable, setToggleClickCount, setToolTipText, setTreeCellRenderer, setTreeTableModel, sizeColumnsToFit, superSetAutoCreateRowSorter, superSetRowSorter, superSetSortable, tableChanged, updateHierarchicalRendererEditor, updateUIMethods inherited from class org.jdesktop.swingx.JXTable
addHighlighter, adjustComponentOrientation, adminSetRowHeight, columnAdded, columnPropertyChange, columnSelectionChanged, configureColumnControl, configureEnclosingScrollPane, configureSorterProperties, createDefaultColumnControl, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultEditors, createDefaultRenderers, createDefaultRowSorter, createDefaultStringValueRegistry, createDefaultTableHeader, createHighlighterChangeListener, createLinkController, createRolloverProducer, doFind, doLayout, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getColumn, getColumn, getColumnControl, getColumnCount, getColumnExt, getColumnExt, getColumnExt, getColumnFactory, getColumnMargin, getColumns, getColumns, getComponentAdapter, getCompoundHighlighter, getControlsSorterProperties, getEnclosingScrollPane, getHighlighterChangeListener, getHighlighters, getLinkController, getPopupLocation, getPopupTriggerLocation, getPreferredScrollableViewportSize, getRowFilter, getScrollableTracksViewportWidth, getSearchable, getSelectionMode, getSortController, getSortedColumn, getSortedColumnIndex, getSortOrder, getSortOrder, getSortOrderCycle, getSortsOnUpdates, getStringValueRegistry, getUIString, getUIString, getVisibleColumnCount, getVisibleRowCount, hasSortController, initializeColumnPreferredWidth, initializeColumnWidths, isAutoStartEditOnKeyStroke, isCellEditable, isColumnControlVisible, isDataChanged, isEditable, isFocusCycleRoot, isHorizontalScrollEnabled, isRolloverEnabled, isSortable, isStructureChanged, isTerminateEditOnFocusLost, isUpdate, packAll, packColumn, packColumn, packSelected, packTable, postprocessModelChange, postprocessSorterChanged, prepareEditor, prepareRenderer, preprocessModelChange, removeColumnControlFromCorners, removeEditor, removeHighlighter, removeNotify, resetDefaultTableCellRendererColors, resetSortOrder, rowAtPoint, scrollCellToVisible, scrollColumnToVisible, scrollRowToVisible, setAutoResizeMode, setAutoStartEditOnKeyStroke, setColumnControl, setColumnControlVisible, setColumnFactory, setColumnMargin, setColumnModel, setColumnSequence, setComponentOrientation, setDefaultRenderer, setEditable, setFillsViewportHeight, setGridColor, setHighlighters, setHorizontalScrollEnabled, setLocale, setPreferredScrollableViewportSize, setRolloverEnabled, setRowFilter, setSearchable, setShowGrid, setShowGrid, setSortOrder, setSortOrder, setSortOrderCycle, setSortsOnUpdates, setTerminateEditOnFocusLost, setValueAt, setVisibleColumnCount, setVisibleRowCount, sorterChanged, toggleSortOrder, toggleSortOrder, transferFocus, transferFocusBackward, unconfigureColumnControl, unconfigureEnclosingScrollPane, updateColumnControlUI, updateColumnUI, updateHighlighterUI, updateHorizontalAction, updateLocaleActionState, updateLocaleState, updatePopupTrigger, updateRowHeightUIMethods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, columnAtPoint, columnMoved, columnRemoved, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultDataModel, createDefaultSelectionModel, createScrollPaneForTable, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeRowSelectionInterval, resizeAndRepaint, selectAll, setAutoCreateColumnsFromModel, setCellEditor, setCellSelectionEnabled, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setIntercellSpacing, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionModel, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, sizeColumnsToFit, valueChangedMethods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, 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, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods 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, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.swing.event.TableColumnModelListener
columnMoved, columnRemoved
-
Field Details
-
_rowForeground
-
-
Constructor Details
-
RmaJXTreeTable
public RmaJXTreeTable() -
RmaJXTreeTable
public RmaJXTreeTable(org.jdesktop.swingx.treetable.TreeTableModel model)
-
-
Method Details
-
init
protected void init() -
createScrollPane
-
getToolTipText
- Overrides:
getToolTipTextin classorg.jdesktop.swingx.JXTreeTable
-
getScrollPane
return the scroll pane that this table is residing in this is the component that needs added to the screen- Returns:
- The ScrollPane value
-
setComboBoxEditor
set the column col to have a combo box editor with the dropdown filled with data- Parameters:
col- The new ComboBoxEditor valuedata- The new ComboBoxEditor value- Returns:
- Description
-
setComboBoxEditor
- Parameters:
col-data-- Returns:
-
setComboBoxRowEditor
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
itemStateChanged
editor listener methods- Specified by:
itemStateChangedin interfaceItemListener- Parameters:
e- Description
-
isModified
public boolean isModified()returns whether this table has been modified- Specified by:
isModifiedin interfaceModifiable- Returns:
- The Modified value
-
setModified
public void setModified(boolean modified) sets whether this table has been modified- Specified by:
setModifiedin interfaceModifiable- Parameters:
modified- The new Modified value
-
clearPerformed
public void clearPerformed()- Specified by:
clearPerformedin interfaceFormManagementListener
-
clearCells
public void clearCells()clear all the cells, leaving cells visible on screen -
commitEdit
public boolean commitEdit(boolean commit) if editing is occurring, either commit or cancel it- Parameters:
commit- Description- Returns:
- Description
-
getClearedCellValue
get the default value to be used when a cell is cleared.- Returns:
-
setMlHeaderRenderer
sets table up to display multi line headers -
setColumnWidths
public void setColumnWidths(int... widths) set the column widths to the array of widths.- Parameters:
widths- The new ColumnWidths value
-
setColumnWidth
public void setColumnWidth(int colNum, int width) set the column width for a given column- Parameters:
colNum- The new ColumnWidth valuewidth- The new ColumnWidth value
-
setAlternatingReportBackground
public void setAlternatingReportBackground(boolean b) -
getAlternatingReportBackground
public boolean getAlternatingReportBackground() -
setAlternatingReportBackgroundColor
-
getAlternatingReportBackgroundColor
-
setRowForeground
set the foreground color for the row at rowNum- Parameters:
rowNum- The new RowForeground valuerfColor- The new RowForeground value
-
getRowForeground
get the foreground color for the row at rowNum- Parameters:
rowNum- Description- Returns:
- The RowForeground value
-