|
||||||||||
| 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.JPanel
|
+--com.zwares.base.gui.panels.ETablePanel
This class provides features like border, sorting, selecting, etc. It can be used instead of JTable. It return a panel with a title and a table.
| Nested Class Summary |
| 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 ETableModel |
dataTableModel
|
protected EEventSourceObject |
multicaster
|
protected java.lang.String |
name
|
protected EPopupMenu |
popupMenu
|
protected javax.swing.JScrollPane |
scrollPane
|
protected com.zwares.base.gui.panels.ETablePanel.TableSorter |
sorterTableModel
|
protected javax.swing.JTable |
table
|
| 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 | |
ETablePanel()
Creates a new ETablePanel. |
|
ETablePanel(java.lang.String n,
ETableModel m)
Creates a new ETableModel. |
|
| Method Summary | |
void |
addEventListener(EEventListener el)
Adds an ActionListener to the list of listners. |
void |
addRow(int index,
java.lang.Object row)
Adds a row to the table at the given index. |
void |
addRow(java.lang.Object row)
Adds a row to the end of the table. |
void |
clearAll()
Removes all the rows. |
void |
eventGenerated(EEvent e)
Call back method for all the actions. |
void |
filter(java.lang.String st)
Filters the table based on the given String st. |
EPopupMenu |
getPopupMenu()
Method to return the popup menu for the table. |
int |
getRowCount()
Returns the number of rows in the table. |
int |
getSelectedIndex()
Returns the selected index from the table. |
java.lang.Object |
getSelectedObject()
Returns the selected object from the table. |
javax.swing.JTable |
getTable()
Returns the instance of table. |
java.lang.Object[] |
getTableData()
Returns the table data. |
ETableModel |
getTableModel()
Returns the table model. |
protected void |
init()
Initialization method. |
protected void |
initPanel()
Initializes the panel and sets its layout. |
protected void |
initTable()
Initializes the table and adds it to a scroll pane. |
void |
initTableColumns()
Selectes the first row. |
protected void |
initVariables()
Creates instances of all the varaibles like table, scrollpane etc. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Implementing mouse listener events for any double clicks. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
notifyEventListeners(EEvent evt)
Notifies all the registered listeners about the event evt. |
void |
removeEventListener(EEventListener el)
Removes any listener added. |
void |
removePopupMenu()
Method to remove the popup menu from the table. |
void |
removeRow(int index)
Removes the row at the given index and selectes the first one. |
void |
removeSelectedRow()
Removes the selectedRow and selectes the first one. |
void |
repaintTable()
Repaints the table. |
void |
selectRow(int row)
Selects a row. |
void |
selectRow(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Selects a row. |
void |
setPopupMenu(EPopupMenu m)
Method to set the popup menu for the table. |
void |
setTable(javax.swing.JTable t)
Returns the instance of table. |
void |
setTableData(java.lang.Object[] d)
Sets the table data. |
void |
setTableModel(ETableModel m)
Sets the table model. |
void |
setTableSize(int x,
int y,
boolean autoResizeMode)
Sets the table size. |
void |
updateTable()
Updates the table for any changes in data / property. |
| 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, setBackground, 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 javax.swing.JScrollPane scrollPane
protected javax.swing.JTable table
protected ETableModel dataTableModel
protected com.zwares.base.gui.panels.ETablePanel.TableSorter sorterTableModel
protected java.lang.String name
protected EPopupMenu popupMenu
protected EEventSourceObject multicaster
| Constructor Detail |
public ETablePanel()
public ETablePanel(java.lang.String n,
ETableModel m)
| Method Detail |
protected void init()
protected void initVariables()
protected void initTable()
protected void initPanel()
public void initTableColumns()
public void setTable(javax.swing.JTable t)
public javax.swing.JTable getTable()
public void setTableSize(int x,
int y,
boolean autoResizeMode)
public void setTableModel(ETableModel m)
public ETableModel getTableModel()
public void setTableData(java.lang.Object[] d)
public java.lang.Object[] getTableData()
public int getRowCount()
public void addRow(java.lang.Object row)
public void addRow(int index,
java.lang.Object row)
public void removeRow(int index)
public void removeSelectedRow()
public void clearAll()
public void selectRow(int row)
public void selectRow(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
public int getSelectedIndex()
public java.lang.Object getSelectedObject()
public void filter(java.lang.String st)
public void updateTable()
public void repaintTable()
public void setPopupMenu(EPopupMenu m)
public EPopupMenu getPopupMenu()
public void removePopupMenu()
public void addEventListener(EEventListener el)
public void removeEventListener(EEventListener el)
public void notifyEventListeners(EEvent evt)
public void eventGenerated(EEvent e)
eventGenerated in interface EEventListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||