|
||||||||||
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 javax.swing.JScrollPane com.jstatcom.table.JSCDataTableScrollPane
public class JSCDataTableScrollPane
Special scrollpane to be used with data tables. It can listen to data objects to be displayed as column and/or row header.
The layout manager preserves space for scrollbars and row/column headers if there is a theoretical chance for them to appear. The appearance can be adjusted by setting min/max visible rows/cols.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 javax.swing.ScrollPaneConstants |
---|
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JSCDataTableScrollPane()
Creates a default scroll pane table with JSCDataTableScrollPaneLayout . |
|
JSCDataTableScrollPane(JSCAbstractDataTable dataTable)
Creates a scroll pane table with JSCDataTableScrollPaneLayout and gdt as
viewport. |
Method Summary | |
---|---|
int |
getColumnHeaderAlignment()
Gets the alignment of the column header. |
javax.swing.table.TableCellRenderer |
getColumnHeaderCellRenderer()
Gets the current column header cell renderer. |
JSCSArray |
getColumnHeaderData()
Gets the data object used for the column header. |
boolean |
getColumnHeaderShowing()
Gets whether the column header should be displayed. |
java.lang.String[] |
getColumnHeaderStringData()
Gets a reference to the string array used for the column header. |
java.lang.String |
getColumnHeaderSymbolName()
Gets the symbol name for the SARRAY column header data. |
int |
getMaximumVisibleColumns()
Gets the maximum number of cols that are displayed without scrolling. |
int |
getMaximumVisibleRows()
Gets the maximum number of rows that are displayed without scrolling. |
int |
getMinimumVisibleColumns()
Gets the minimum number of columns that are displayed without scrolling. |
int |
getMinimumVisibleRows()
Gets the minimum number of rows that are displayed without scrolling. |
int |
getRowHeaderAlignment()
Gets the alignment of the column header. |
javax.swing.table.TableCellRenderer |
getRowHeaderCellRenderer()
Gets the current row header cell renderer. |
JSCSArray |
getRowHeaderData()
Gets the data object used for the row header. |
boolean |
getRowHeaderShowing()
Gets whether the row header should be displayed. |
java.lang.String |
getRowHeaderSymbolName()
Gets the symbol name for the SARRAY row header data. |
Scope |
getSymbolScope()
Gets which symbol scope is used. |
SymbolTable |
getSymbolTable()
Gets the symbol table that has been set for row and column header. |
void |
setColumnHeaderAlignment(int newColumnHeaderAlignment)
Sets the column header alignment, the default is JLabel.RIGHT . |
void |
setColumnHeaderCellRenderer(javax.swing.table.TableCellRenderer newColumnHeaderCellRenderer)
Sets a new cell renderer for the column header. |
void |
setColumnHeaderData(JSCSArray newColumnHeaderData)
Sets the data object used for the column header. |
void |
setColumnHeaderShowing(boolean isShowing)
Sets whether the column header should be displayed. |
void |
setColumnHeaderStringData(java.lang.String[] colHeaderStringData)
Sets the column header data from a string array. |
void |
setColumnHeaderSymbolName(java.lang.String newColumnHeaderSymbolName)
Sets the symbol name for the SARRAY column header data. |
void |
setMaximumVisibleColumns(int newMaximumVisibleColumns)
Sets the maximum number of visible cols that this scrollpane shows. |
void |
setMaximumVisibleRows(int newMaximumVisibleRows)
Sets the maximum number of visible rows that this scrollpane shows. |
void |
setMinimumVisibleColumns(int newMinimumVisibleColumns)
Sets the minimum number of visible cols that this scrollpane shows without scrolling. |
void |
setMinimumVisibleRows(int newMinimumVisibleRows)
Sets the minimum number of visible rows that this scrollpane shows without scrolling. |
void |
setRowHeaderAlignment(int newRowHeaderAlignment)
Sets the row header alignment, the default is JLabel.RIGHT . |
void |
setRowHeaderCellRenderer(javax.swing.table.TableCellRenderer newRowHeaderCellRenderer)
Sets a new cell renderer for the row header. |
void |
setRowHeaderData(JSCSArray newRowHeaderData)
Sets the data object used for the row header. |
void |
setRowHeaderShowing(boolean isShowing)
Sets whether the row header should be displayed. |
void |
setRowHeaderSymbolName(java.lang.String newRowHeaderSymbolName)
Sets the symbol name for the SARRAY row header data. |
void |
setSymbolScope(Scope newSymbolScope)
Sets the scope for the symbols used for row and column header. |
void |
setSymbolTable(SymbolTable table)
Sets the symbol table used for row and column header data. |
void |
setViewportView(java.awt.Component view)
Overwrites supermethod to handle data table components specially. |
Methods inherited from class javax.swing.JScrollPane |
---|
createHorizontalScrollBar, createVerticalScrollBar, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setWheelScrollingEnabled, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSCDataTableScrollPane()
JSCDataTableScrollPaneLayout
.
public JSCDataTableScrollPane(JSCAbstractDataTable dataTable)
JSCDataTableScrollPaneLayout
and gdt
as
viewport.
dataTable
- the datatable to be used a viewportMethod Detail |
---|
public int getColumnHeaderAlignment()
public javax.swing.table.TableCellRenderer getColumnHeaderCellRenderer()
public JSCSArray getColumnHeaderData()
public java.lang.String[] getColumnHeaderStringData()
public java.lang.String getColumnHeaderSymbolName()
SARRAY
column header data.
public int getMaximumVisibleColumns()
public int getMaximumVisibleRows()
public int getMinimumVisibleColumns()
public int getMinimumVisibleRows()
public int getRowHeaderAlignment()
public javax.swing.table.TableCellRenderer getRowHeaderCellRenderer()
public JSCSArray getRowHeaderData()
public java.lang.String getRowHeaderSymbolName()
SARRAY
row header data.
public Scope getSymbolScope()
public void setColumnHeaderAlignment(int newColumnHeaderAlignment)
JLabel.RIGHT
.
newColumnHeaderAlignment
- JLabel.LEFT, JLabel.RIGHT or JLabel.CENTER
java.lang.IllegalArgumentException
- if argument is not validpublic void setColumnHeaderCellRenderer(javax.swing.table.TableCellRenderer newColumnHeaderCellRenderer)
newColumnHeaderCellRenderer
- public void setColumnHeaderData(JSCSArray newColumnHeaderData)
Please note:
The data is presented transposed. This is for convenience, because often
names are stored as column vectors in the symbol table. This behaviour
does not occur if the data is explicitely set.
newColumnHeaderData
- row datapublic void setColumnHeaderShowing(boolean isShowing)
isShowing
- true
if showingpublic boolean getColumnHeaderShowing()
true
if showingpublic void setRowHeaderShowing(boolean isShowing)
isShowing
- true
if showingpublic boolean getRowHeaderShowing()
true
if showingpublic void setColumnHeaderStringData(java.lang.String[] colHeaderStringData)
colHeaderStringData
- string array with column namespublic void setColumnHeaderSymbolName(java.lang.String newColumnHeaderSymbolName)
SARRAY
column header data.
Please note:
The data is presented transposed. This is for convenience, because often
names are stored as column vectors in the symbol table. This behaviour
does not occur if the data is explicitely set.
newColumnHeaderSymbolName
- the symbol identifier
java.lang.IllegalArgumentException
- if name is not validpublic void setSymbolScope(Scope newSymbolScope)
newSymbolScope
-
java.lang.IllegalArgumentException
- if (newSymbolScope == null)
public void setMaximumVisibleColumns(int newMaximumVisibleColumns)
newMaximumVisibleColumns
- intpublic void setMaximumVisibleRows(int newMaximumVisibleRows)
newMaximumVisibleRows
- intpublic void setMinimumVisibleColumns(int newMinimumVisibleColumns)
newMinimumVisibleColumns
- intpublic void setMinimumVisibleRows(int newMinimumVisibleRows)
newMinimumVisibleRows
- intpublic void setRowHeaderAlignment(int newRowHeaderAlignment)
JLabel.RIGHT
.
This method has no effect of the row header cell renderer is not of type
JSCCellRendererTypes
.
newRowHeaderAlignment
- JLabel.LEFT, JLabel.RIGHT or JLabel.CENTER
java.lang.IllegalArgumentException
- if argument is not validpublic void setRowHeaderCellRenderer(javax.swing.table.TableCellRenderer newRowHeaderCellRenderer)
newRowHeaderCellRenderer
- public void setRowHeaderData(JSCSArray newRowHeaderData)
newRowHeaderData
- row datapublic void setRowHeaderSymbolName(java.lang.String newRowHeaderSymbolName)
SARRAY
row header data.
newRowHeaderSymbolName
- symbol identifier
java.lang.IllegalArgumentException
- if name is not validpublic void setViewportView(java.awt.Component view)
setViewportView
in class javax.swing.JScrollPane
view
- the viewport componentpublic SymbolTable getSymbolTable()
public void setSymbolTable(SymbolTable table)
table
- the symbol table for the header data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |