|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.jdesktop.swingx.JXTable
com.ehsbe.commons.gui.JxTable
public class JxTable
A Table, which calculates its preferred size by the sum of the max. preferred width of all items in a collumn and rows respectively. Furthermore it starts cell editing on editable cells as soon as it gets selected or clicked, and selects the whole text.
Nested Class Summary | |
---|---|
class |
JxTable.AutoSelectCellEditor
Same as the default cell editor, but clickcount set to 0 and focus surrendering enabled. |
Nested 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.TableAdapter |
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 |
---|
Fields inherited from class org.jdesktop.swingx.JXTable |
---|
compoundHighlighter, dataAdapter, editorRemover, FOCUS_NEXT_COMPONENT, FOCUS_PREVIOUS_COMPONENT, HORIZONTALSCROLL_ACTION_COMMAND, isXTableRowHeightSet, MATCH_HIGHLIGHTER, PACKALL_ACTION_COMMAND, PACKSELECTED_ACTION_COMMAND, resetDefaultTableCellRendererHighlighter, searchable, UIPREFIX, USE_DTCR_COLORMEMORY_HACK |
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 | |
---|---|
JxTable()
A wrapper around the offical JXTable constructor, which enables "start editing" on cell click by installing an appropriate default cell editor, which surrenders focus on keystroke and selects the complete contaent when editing starts. |
|
JxTable(TableModel model)
A wrapper around the offical JXTable constructor, which enables "start editing" on cell click by installing an appropriate default cell editor, which surrenders focus on keystroke and selects the complete contaent when editing starts. |
Method Summary | |
---|---|
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Same as JTable.changeSelection(int, int, boolean, boolean) , but
also automatically starts editing, if the selected cell is editable. |
protected JTableHeader |
createDefaultTableHeader()
Returns the default table header object, which is a JxTableHeader and makes it much easier to provide header
tooltips. |
void |
enableModelTooltips(boolean enable)
If true , the underlying table model will be queried for
tooltips first (if it implements the TooltipProvider ). |
Dimension |
getPreferredScrollableViewportSize()
Get the preferred size of the scroll port view. |
String |
getToolTipText(MouseEvent event)
|
void |
setToolTipText(String text)
|
void |
tableChanged(TableModelEvent e)
Overwritten since the default implementation does not stop cell editing before applying the change, and doesn't autopmatically start editing, after change. |
Methods inherited from class org.jdesktop.swingx.JXTable |
---|
addHighlighter, adjustComponentOrientation, adminSetRowHeight, columnAdded, columnMarginChanged, columnPropertyChange, columnSelectionChanged, configureColumnControl, configureEnclosingScrollPane, configureSorterProperties, createDefaultColumnControl, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultEditors, createDefaultRenderers, createDefaultRowSorter, createHighlighterChangeListener, createLinkController, createRolloverProducer, doFind, doLayout, editCellAt, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getCellRenderer, getColumn, getColumnControl, getColumnCount, getColumnExt, getColumnExt, getColumnFactory, getColumnMargin, getColumns, getColumns, getComponentAdapter, getComponentAdapter, getCompoundHighlighter, getHighlighterChangeListener, getHighlighters, getLinkController, getNewDefaultRenderer, getScrollableTracksViewportWidth, getSearchable, getSelectionMode, getSortController, getSortedColumn, getSortOrder, getSortOrder, getSortsOnUpdates, getStringAt, getUIString, getUIString, getVisibleColumnCount, getVisibleRowCount, initializeColumnPreferredWidth, initializeColumnWidths, isAutoStartEditOnKeyStroke, isCellEditable, isColumnControlVisible, isDataChanged, isEditable, isFocusCycleRoot, isHorizontalScrollEnabled, isRolloverEnabled, isRowHeightEnabled, isSortable, isSortable, isSortable, isStructureChanged, isTerminateEditOnFocusLost, isUpdate, packAll, packColumn, packColumn, packSelected, packTable, prepareEditor, prepareRenderer, removeEditor, removeHighlighter, removeNotify, resetDefaultTableCellRendererColors, resetSortOrder, rowAtPoint, scrollCellToVisible, scrollColumnToVisible, scrollRowToVisible, setAutoCreateRowSorter, setAutoResizeMode, setAutoStartEditOnKeyStroke, setColumnControl, setColumnControlVisible, setColumnFactory, setColumnMargin, setColumnModel, setColumnSequence, setComponentOrientation, setEditable, setFillsViewportHeight, setGridColor, setHighlighters, setHorizontalScrollEnabled, setLocale, setModel, setPreferredScrollableViewportSize, setRolloverEnabled, setRowHeight, setRowHeightEnabled, setRowSorter, setSearchable, setSelectionBackground, setSelectionForeground, setShowGrid, setShowGrid, setSortable, setSortOrder, setSortOrder, setSortsOnUpdates, setTerminateEditOnFocusLost, setValueAt, setVisibleColumnCount, setVisibleRowCount, toggleSortOrder, toggleSortOrder, transferFocus, transferFocusBackward, unconfigureColumnControl, unconfigureEnclosingScrollPane, updateColumnControlUI, updateColumnUI, updateHighlighterUI, updateHorizontalAction, updateLocaleActionState, updateLocaleState, updateRowHeightUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.swing.event.TableColumnModelListener |
---|
columnMoved, columnRemoved |
Constructor Detail |
---|
public JxTable()
public JxTable(TableModel model)
model
- data to addMethod Detail |
---|
public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
JTable.changeSelection(int, int, boolean, boolean)
, but
also automatically starts editing, if the selected cell is editable.
changeSelection
in class JTable
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
getPreferredScrollableViewportSize
in class org.jdesktop.swingx.JXTable
public void enableModelTooltips(boolean enable)
true
, the underlying table model will be queried for
tooltips first (if it implements the TooltipProvider
). If it
returns no tooltip, the normal procedure will be used. I.e. first the
component at the given position gets queried and if still no tooltip
could be obtained, the tables tooltip gets returned.
enable
- if true
try to obtain a tooltip from the
table's model firstpublic void setToolTipText(String text)
setToolTipText
in class JComponent
public String getToolTipText(MouseEvent event)
getToolTipText
in class JTable
protected JTableHeader createDefaultTableHeader()
JxTableHeader
and makes it much easier to provide header
tooltips.
createDefaultTableHeader
in class org.jdesktop.swingx.JXTable
JxTableHeader
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
tableChanged
in class org.jdesktop.swingx.JXTable
e
- model change event
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |