class DatabaseEditor.Table extends javax.swing.JFrame
Modifier and Type | Class and Description |
---|---|
(package private) class |
DatabaseEditor.Table.DBTable
This is the JPanel displaying the database table, view, or
result set.
|
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<java.util.ArrayList<java.lang.String>> |
data |
(package private) java.util.ArrayList<javax.swing.JFrame> |
dependents |
(package private) java.util.ArrayList<java.lang.String> |
heading |
(package private) java.util.ArrayList<java.util.ArrayList<java.lang.String>> |
oldData |
(package private) java.util.ArrayList<java.lang.String> |
rowid |
(package private) static long |
serialVersionUID |
(package private) javax.swing.JTable |
table |
(package private) javax.swing.table.AbstractTableModel |
tableModel
This TableModel gets data from and stores data into the
containing Table class.
|
(package private) java.lang.String |
tableName |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
Table(java.sql.ResultSet rs,
java.lang.String tableName)
For displaying result sets
|
Table(java.lang.String tableName)
For displaying tables or views
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addRow()
This method adds a new row to the table.
|
(package private) void |
deleteRows()
Delete all of the rows that are selected.
|
(package private) boolean |
eql(java.lang.String x,
java.lang.String y)
Compare two Strings for equality.
|
(package private) void |
fillColumn(int i,
int j)
This method fills in all cells from cell[i, j] to the end of
the table stopping at the first nonnull entry
|
(package private) void |
fillColumn(int i,
int j,
java.lang.String s1,
java.lang.String s2)
This method fills in all cells from cell[i, j] to the end of
the table stopping at the first nonnull entry.
|
(package private) void |
initTables(java.sql.ResultSet rs)
Initialize tables for a table or view with null argument.
|
(package private) DatabaseEditor.EditWindow |
makeCellEditWindow(DatabaseEditor.Table jtable,
int i,
int jj,
java.awt.Rectangle location)
Create an edit window on a Table cell and update table focus to
edited cell.
|
(package private) void |
makeNull()
This method sets the selected cell to null
|
(package private) void |
outputTable(java.lang.String fileName,
java.lang.String column,
java.lang.String row,
java.lang.String nil,
boolean escape)
Output a result set to a text file separating rows by a new
line and cells in a row by the separator String.
|
(package private) void |
revertSelected()
This method undoes all of the uncommitted edits in the selected
row.
|
(package private) void |
revertTable()
This method undoes all of the uncommitted edits in the entire
table.
|
(package private) void |
updateRow(int i)
New strategy is to use ? instead of putting new values in the
statement itself.
|
(package private) void |
updateSelected()
This method updates all cells in the selected row.
|
(package private) void |
updateTable()
This method updates all cells in the entire table.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
static final long serialVersionUID
java.lang.String tableName
java.util.ArrayList<javax.swing.JFrame> dependents
javax.swing.JTable table
java.util.ArrayList<java.lang.String> heading
java.util.ArrayList<java.util.ArrayList<java.lang.String>> data
java.util.ArrayList<java.util.ArrayList<java.lang.String>> oldData
java.util.ArrayList<java.lang.String> rowid
javax.swing.table.AbstractTableModel tableModel
Table(java.lang.String tableName)
tableName
- the title of the window and table or view to displayTable(java.sql.ResultSet rs, java.lang.String tableName)
rs
- the ResultSet to displaytableName
- the title of the windowvoid initTables(java.sql.ResultSet rs)
rs
- the result set to view or null if a table or viewboolean eql(java.lang.String x, java.lang.String y)
x
- first stringy
- second stringDatabaseEditor.EditWindow makeCellEditWindow(DatabaseEditor.Table jtable, int i, int jj, java.awt.Rectangle location)
jtable
- the table containing the cell to be editedi
- the row of the Table being editedjj
- the column of the Table being editedlocation
- the location to put the CellEditWindowvoid outputTable(java.lang.String fileName, java.lang.String column, java.lang.String row, java.lang.String nil, boolean escape)
fileName
- the name of the file to writecolumn
- the cell separatorrow
- the row cell separatornil
- the String used for a null entryescape
- true if replace ' with ''void deleteRows()
void makeNull()
void revertSelected()
void revertTable()
void addRow()
void fillColumn(int i, int j)
i
- the row number of the first cell to be filledj
- the column number of the first cell to be filledvoid fillColumn(int i, int j, java.lang.String s1, java.lang.String s2)
i
- the row number of the first cell to be filledj
- the column number of the first cell to be filleds1
- the first string in sequences2
- the second string in sequencevoid updateSelected()
void updateTable()
void updateRow(int i)
i
- the row number to update