medi.swing.panel
Class AbstractDataPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--medi.swing.panel.AbstractDataPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
AuthorDataPanel, DataSetDataPanel, EditorDataPanel, ExecutionDataPanel, FatherDataPanel, GenreDataPanel, SearchDataPanel, SessionDataPanel

public abstract class AbstractDataPanel
extends javax.swing.JPanel

It is a generic panel to show information about data relative to another entity, such as sessions, author etc.

See Also:
Serialized Form

Field Summary
protected  boolean initialized
          Checks whether this panel has been initialized or not.
protected  Provider prv
          The provider to use.
protected  java.lang.String spMessage
          The message to be displayed in the status label.
 
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
AbstractDataPanel()
          Creates new form AbstractDataPanel
 
Method Summary
protected  void fillTable(DbIterator rowIt)
          Fills the table with a given DbIterator.
protected  void fillTable(java.util.Iterator rowIt)
          Fills the table with a given Iterator.
 void init()
          Initializes the panel.
 boolean isInitialized()
          Checks whether the panel is initialized or not.
protected abstract  void linkNewData(java.lang.Long dataID)
          Links a new data ID in different ways, depending on the derived class.
 void setProvider(Provider pPrv)
          Sets the provider to use.
 void setSubPanelDispatcher(SubPanelDispatcher pSpdisp)
          Sets the subpanel dispatcher to use.
 void setSubPanelDispatcher(SubPanelDispatcher pSpdisp, java.lang.Object pFillerID)
          Sets the subpanel dispatcher to use.
 void setVisible(boolean aFlag)
          Sets a panel visible/invisible and eventually initializes the panel.
 void setVolumeMounter(VolumeMounter pVmount)
          Sets the volume mounter to use.
 void setWaitIcon(javax.swing.ImageIcon icon)
          Sets the icon that will be displayed when waiting an operation to complete.
abstract  void showItems()
          Shows contained items.
 
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, 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

prv

protected Provider prv
The provider to use.


spMessage

protected java.lang.String spMessage
The message to be displayed in the status label.


initialized

protected boolean initialized
Checks whether this panel has been initialized or not. true: the panel is initialized; false: the panel is not initialized.

Constructor Detail

AbstractDataPanel

public AbstractDataPanel()
Creates new form AbstractDataPanel

Method Detail

init

public void init()
Initializes the panel.


setProvider

public void setProvider(Provider pPrv)
Sets the provider to use.

Parameters:
pPrv - The provider to use.

setVolumeMounter

public void setVolumeMounter(VolumeMounter pVmount)
Sets the volume mounter to use.

Parameters:
pVmount - The volume mounter.

setSubPanelDispatcher

public void setSubPanelDispatcher(SubPanelDispatcher pSpdisp)
Sets the subpanel dispatcher to use.

Parameters:
pSpdisp - The subpanel dispatcher

setSubPanelDispatcher

public void setSubPanelDispatcher(SubPanelDispatcher pSpdisp,
                                  java.lang.Object pFillerID)
Sets the subpanel dispatcher to use.

Parameters:
pSpdisp - The subpanel dispatcher
pFillerID - The filler ID to use, that can be either fixed or dynamic.

setWaitIcon

public void setWaitIcon(javax.swing.ImageIcon icon)
Sets the icon that will be displayed when waiting an operation to complete.

Parameters:
icon - The needed icon.

showItems

public abstract void showItems()
                        throws DbException
Shows contained items.

Throws:
DbException - If something goes wrong.

isInitialized

public boolean isInitialized()
Checks whether the panel is initialized or not.

Returns:
true: the panel is initialized; false: the panel is not initialized.

setVisible

public void setVisible(boolean aFlag)
Sets a panel visible/invisible and eventually initializes the panel.

Overrides:
setVisible in class javax.swing.JComponent
Parameters:
aFlag - true: shows the panel; false: hides the panel.

fillTable

protected void fillTable(DbIterator rowIt)
                  throws DbException
Fills the table with a given DbIterator.

Parameters:
rowIt - The iterator containing the data.
Throws:
DbException - If something goes wrong.

fillTable

protected void fillTable(java.util.Iterator rowIt)
                  throws DbException
Fills the table with a given Iterator.

Parameters:
rowIt - The iterator containing the data.
Throws:
DbException - If something goes wrong.

linkNewData

protected abstract void linkNewData(java.lang.Long dataID)
                             throws DbException
Links a new data ID in different ways, depending on the derived class.

Parameters:
dataID - The data ID to link.
Throws:
DbException - If something goes wrong.