public class TableDisplayTool extends JPanel implements QueryResultDisplay, Saveable, SaveableAsHTML, PrintableWithDialog
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TableDisplayTool(TableQueryResult table,
QueryResultDisplay queryResultDisplay,
TablePlotter plotter)
Create a TableDisplayTool for viewing the given table data.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPlotterConfigPanel()
Add a panel to the config window to configure the symbol plotting
|
void |
addRow()
Add an empty row to the table.
|
void |
addRow(Vector v)
Add a row to the table.
|
protected void |
addTableColumnConfigPanel()
Add a panel to the config window to configure the table columns
|
void |
configure()
Pop up a dialog to configure the plot symbols and table display.
|
void |
deleteSelectedRows()
Delete the selected rows.
|
JPanel |
getButtonPanel()
Return the button panel
|
JButton |
getConfigButton() |
TabbedPanel |
getConfigPanel()
Panel used to configure the table and plot symbol display
|
String |
getName()
Return the name of this component (based on the data being displayed)
|
JButton |
getPlotButton() |
TablePlotter |
getPlotter()
Return the object to use to plot the table data
|
Vector |
getRow(int rowIndex)
Return the vector for the given row.
|
int |
getRowCount()
Return the number of rows in the table.
|
protected SortedJTable |
getSortedJTable()
Return the table for displaying query results
|
TableQueryResult |
getTable()
Return the TableQueryResult corresponding to this object
|
TableDisplay |
getTableDisplay()
Return the table for displaying query results
|
JButton |
getUnplotAllButton() |
JButton |
getUnplotButton() |
void |
hidePopups()
Hide any popup windows associated with this window
|
protected JPanel |
makeButtonPanel()
make and return the button panel
|
protected void |
makeLayout(QueryResultDisplay queryResultDisplay)
Do the window layout
|
void |
plot()
Plot the contents of the table.
|
void |
print()
Display a print dialog to print the contents of this object.
|
void |
replot()
Replot any plot symbols for this table.
|
void |
saveAs(String filename)
Save the table to the given file.
|
void |
saveAsHTML(String filename)
Save the table to the given file in HTML format.
|
void |
setPlotter(TablePlotter plotter)
Set the object to use to plot the table data
|
void |
setQueryResult(QueryResult queryResult)
Display the given query results.
|
void |
setTableCellsEditable(boolean b)
Set the editable state of the cells in the displayed table.
|
void |
unplot()
Remove any plot symbols for this table.
|
void |
unplotAll()
Remove all plot symbols.
|
void |
updateRow(int rowIndex,
Vector v)
Update a row in the table with the new data.
|
protected void |
updateTitle()
Update the table and frame titles to show the table title and number of rows
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, 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, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, 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, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, getParent, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TableDisplayTool(TableQueryResult table, QueryResultDisplay queryResultDisplay, TablePlotter plotter)
table
- the table dataqueryResultDisplay
- object used to display any query results resulting from following linksplotter
- object used to plot the table dataprotected void makeLayout(QueryResultDisplay queryResultDisplay)
queryResultDisplay
- object used to display any query results resulting from following linkspublic TableDisplay getTableDisplay()
protected JPanel makeButtonPanel()
public JPanel getButtonPanel()
public JButton getPlotButton()
public JButton getUnplotButton()
public JButton getUnplotAllButton()
public JButton getConfigButton()
public void plot()
public void unplot()
public void unplotAll()
public void replot()
public TableQueryResult getTable()
protected SortedJTable getSortedJTable()
public TablePlotter getPlotter()
public void setPlotter(TablePlotter plotter)
public void configure()
protected void addPlotterConfigPanel()
protected void addTableColumnConfigPanel()
public TabbedPanel getConfigPanel()
public void hidePopups()
public String getName()
public void setQueryResult(QueryResult queryResult)
setQueryResult
in interface QueryResultDisplay
queryResult
- an object returned from the Catalog query method.public void saveAs(String filename)
public void saveAsHTML(String filename)
saveAsHTML
in interface SaveableAsHTML
public void print() throws PrinterException
print
in interface PrintableWithDialog
PrinterException
protected void updateTitle()
public void addRow()
public void addRow(Vector v)
public void updateRow(int rowIndex, Vector v)
public Vector getRow(int rowIndex)
public void deleteSelectedRows()
public void setTableCellsEditable(boolean b)
public int getRowCount()
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.