|
||||||||||
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.JPanel
net.sf.dc.console.DataCrowPanel
net.sf.dc.console.TablePanel
Base panel for all panels which contain a JTable This class facilities most of the functions needed to fill / clear / update tables. It also provides a popup menu for the table and action buttons.
Nested Class Summary | |
class |
TablePanel.AddRowAction
Adds an empty row to the table |
class |
TablePanel.ClearButtonAction
Clears the table |
class |
TablePanel.CreatePdfReport
Opens the PDF creation dialog |
class |
TablePanel.FieldSelectorAction
Opens the hidden / visible fields selector dialog |
class |
TablePanel.OpenRecordAction
Opens a record |
class |
TablePanel.PopupMenu
Menu shown when the user performs a right click on a table. |
class |
TablePanel.RemoveRowAction
Removes a row (or multiple rows) from the table |
class |
TablePanel.TableActionsPanel
Panel which holds all buttons and their actions for tables. |
class |
TablePanel.UpdateAllAction
Opens the dialog for updating all the values of one (or more) columns in the UI table |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected java.util.Hashtable |
cache
|
protected int |
moduleIndex
|
protected TablePanel.TableActionsPanel |
panelTableActions
|
protected TablePanel.PopupMenu |
popupMenu
|
protected javax.swing.JTable |
table
|
protected net.sf.dc.console.TablePanel.TableValueChangedAction |
tableChangeListener
|
protected DCTableModel |
tableModel
|
protected net.sf.dc.console.TablePanel.TableMouseListener |
tableMouseListener
|
protected java.util.Vector |
vColumns
|
protected java.util.Vector |
vHiddenColumns
|
Fields inherited from class net.sf.dc.console.DataCrowPanel |
labelStatus |
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 | |
TablePanel(int module)
|
Method Summary | |
void |
addRow(java.util.LinkedList data)
Adds the datacrow objects to the table |
void |
cancelEdit()
Tries to apply the current editing of the table cell. |
void |
clearTable()
Clear the table of all values |
void |
createPdfReport()
Creates a PDF report. |
void |
fillTable(java.util.LinkedList data)
Fills the table with the specified values |
protected DCModule |
getModule()
Retrieves the module to which this panel belongs |
int |
getRowNumberWithID(java.lang.String ID)
Returns the row number of the record with the given ID (product object ID; ie. |
java.lang.Object[] |
getValuesAtRow(int rowNumber,
boolean hidden)
Returns all the values at the give row |
void |
openRecord()
Opens a record form for the selected record 1) Cancel all edits. |
void |
removeHiddenFields(int[] hiddenColumns)
External use. |
void |
removeRows(int[] rows)
Remove the rows from the table with the given indices |
void |
setRequiredFields(DCObject o)
Creates a visual representation (different header) of the required fields |
void |
startAmazonUpdate()
Starts the Amazon internet update. |
void |
startFieldSelector()
Opens the fields selector dialog and applies the hidden fields on the table. |
void |
startIMDBUpdate()
Starts the IMDB internet update. |
void |
updateRow(java.lang.String ID,
java.lang.Object[] values)
Updates the row with the given ID with the data (values) |
void |
updateRowAt(int rowNumber,
java.lang.Object[] rowData,
boolean overWrite,
int[] fieldIndices)
Updates a row at the given rownumber. |
Methods inherited from class net.sf.dc.console.DataCrowPanel |
setBackground, setStatus |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final DCTableModel tableModel
protected javax.swing.JTable table
protected TablePanel.TableActionsPanel panelTableActions
protected TablePanel.PopupMenu popupMenu
protected final java.util.Hashtable cache
protected final net.sf.dc.console.TablePanel.TableValueChangedAction tableChangeListener
protected final net.sf.dc.console.TablePanel.TableMouseListener tableMouseListener
protected java.util.Vector vHiddenColumns
protected java.util.Vector vColumns
protected int moduleIndex
Constructor Detail |
public TablePanel(int module)
Method Detail |
public void cancelEdit()
protected DCModule getModule()
public void startFieldSelector()
public void removeHiddenFields(int[] hiddenColumns)
hiddenColumns
- The model indices of the columnspublic void fillTable(java.util.LinkedList data)
data
- list containing the rows of data to be displayedpublic int getRowNumberWithID(java.lang.String ID)
ID
- public void updateRow(java.lang.String ID, java.lang.Object[] values)
ID
- the ID (Product Object ID)values
- the new valuespublic java.lang.Object[] getValuesAtRow(int rowNumber, boolean hidden)
rowNumber
- the UI row numberhidden
- indicates if values of hidden fields should also be returnedpublic void addRow(java.util.LinkedList data)
public void clearTable()
public void updateRowAt(int rowNumber, java.lang.Object[] rowData, boolean overWrite, int[] fieldIndices)
rowNumber
- UI row to be updatedrowData
- the data to be written to the rowoverWrite
- indicates of existing data should be
overwrittenfieldIndices
- the field indices (communicates
directly to the column indices)public void startAmazonUpdate()
public void startIMDBUpdate()
public void openRecord()
public void removeRows(int[] rows)
public void setRequiredFields(DCObject o)
o
- data crow object (used as a reference)public void createPdfReport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |