public class SearcherPanel extends Panel
CriteriaPanel
instance as helper to define the 'where' clause for the
final sql expression that, on the other side, for its main body, is defined
thorough the template picked up from the configuration file. Actually the
helper object instance starts leaving by the construction of the
JotyDialog
descendant container object; there, the helper is also
added to the layout of the m_criteriaContainer
member object here
instantiated.
The basic template is designed to support 'pagination' so that, during the search process, the resulting query performs it. The size of the resulting page is also got from the configuration file.
The class controls the availability of the search/navigation buttons depending on the effect of the research.
Panel.createQueryDefPostStatement(String, String, String, int)
,
Accessor.getQueryFromPostStatement()
,
org.joty.common.BasicPostStatement#getQueryFromDataDef(org.joty.access.Accessor.DataDef,
org.joty.access.Accessor)
,
Serialized FormModifier and Type | Class and Description |
---|---|
static interface |
SearcherPanel.SearcherPanelContainer |
Panel.JotySeparator
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
boolean |
m_accessorMode |
JotyButton |
m_btnFind |
JotyButton |
m_btnPrevious |
JotyButton |
m_btnSelect |
Panel |
m_criteriaContainer |
CriteriaPanel |
m_criteriaPanel |
org.joty.data.WrappedField |
m_detailsKeyWField |
boolean |
m_furtherRecords |
boolean |
m_initAction |
int |
m_iteration |
java.lang.String |
m_keyFieldName |
javax.swing.JLabel |
m_lblCriteria |
javax.swing.JLabel |
m_lblSearchResult |
Table |
m_table |
m_absoluteGridColumnWidths, m_actionOnRowHandler, m_app, m_defaultButton, m_dialog, m_gridColumnWidths, m_gridManager, m_insidePanel, m_panelDataDef, m_panelIdxInDialog, m_queryDefPostStatement, m_selectorsTransferHandler, m_storing
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
SearcherPanel() |
SearcherPanel(JotyDialog dialog) |
Modifier and Type | Method and Description |
---|---|
void |
addLongKeyElem(java.lang.String name) |
void |
addStrKeyElem(java.lang.String name) |
void |
doSearch(boolean backward)
Makes the inquiry on the database and loads the resulting data in the
main grid, by invoking
loadResult() , keeping track and depending
on the iteration currently occurring. |
protected void |
emptyResult() |
java.lang.String |
getQuery(org.joty.data.SearchQueryBuilderFront qBuilder)
Invoked only in normal mode (not Accessor mode), it uses the
SearchQueryBuilderBack.getQuery() method and forces the sharingExpr
parameter to null since it is assumed that no convenience does exist in implementing the shared mode without
the adoption of the Accessor mode (meaning 'remote' accessor mode) |
void |
guiDataExch() |
void |
initContainer(JotyDialog dialog,
java.awt.Rectangle adjacentPaneRect) |
void |
injectIntoBuffer() |
protected void |
loadResult(WResultSet rs) |
void |
reset() |
void |
resetIteration() |
void |
rowAction()
Takes convenient actions associated with the row: by a double click on
the row it opens the details dialog while in a 'Select' action is
explicitly made when the pane serves a Dialog opened as data selector,
then the
GridManager.storeSelectedValues method is called to get inherent selected choice. |
void |
setKeyFieldName(java.lang.String name) |
void |
setSearcherLayout(JotyDialog dialog,
java.awt.Rectangle adjacentPaneRect)
Shows conditionally the JotyDialog content panel basing on the state
represented by the
m_expandSign member variable: every call to
the method inverts its value so that the showing status inverts itself. |
protected void |
statusChangeProc() |
java.lang.String |
strKeyElemVal(java.lang.String name) |
add, appLang, contextKeyElem, createContextPostStatement, createContextPostStatement, createContextPostStatement, createQueryDefPostStatement, createQueryDefPostStatement, doClickOnDefaultButton, doGuiDataExch, getDialog, getKeyDataFromRow, getKeyDataFromRow, getSelectorsTransferHandler, guiDataExch, increaseRect, init, injectedDialog, isAnInsidePanel, jotyLang, openModeStr, setAsInsidePanel, setSelectorsTransferHandler
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, 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, getName, 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 Panel m_criteriaContainer
public CriteriaPanel m_criteriaPanel
public javax.swing.JLabel m_lblCriteria
public javax.swing.JLabel m_lblSearchResult
public JotyButton m_btnFind
public JotyButton m_btnPrevious
public JotyButton m_btnSelect
public java.lang.String m_keyFieldName
public org.joty.data.WrappedField m_detailsKeyWField
public int m_iteration
public boolean m_furtherRecords
public Table m_table
public boolean m_initAction
public boolean m_accessorMode
public SearcherPanel()
public SearcherPanel(JotyDialog dialog)
public void addLongKeyElem(java.lang.String name)
public void addStrKeyElem(java.lang.String name)
public void doSearch(boolean backward)
loadResult()
, keeping track and depending
on the iteration currently occurring.
Optionally (if the containing JotyDialog operates in Accessor mode), the
method uses the Accessor
object to dispatch the final statements
to the server or to compose it for a direct access to the dbms.
backward
- true if the previous iteration is to be re-launched.GridManager.loadData(WResultSet, org.joty.common.BasicPostStatement)
public java.lang.String getQuery(org.joty.data.SearchQueryBuilderFront qBuilder)
SearchQueryBuilderBack.getQuery()
method and forces the sharingExpr
parameter to null since it is assumed that no convenience does exist in implementing the shared mode without
the adoption of the Accessor mode (meaning 'remote' accessor mode)SearchQueryBuilderBack
protected void emptyResult()
public void guiDataExch()
guiDataExch
in class Panel
public void initContainer(JotyDialog dialog, java.awt.Rectangle adjacentPaneRect)
public void injectIntoBuffer()
protected void loadResult(WResultSet rs)
public void rowAction()
GridManager.storeSelectedValues
method is called to get inherent selected choice.public void setKeyFieldName(java.lang.String name)
public void setSearcherLayout(JotyDialog dialog, java.awt.Rectangle adjacentPaneRect)
m_expandSign
member variable: every call to
the method inverts its value so that the showing status inverts itself.
The actor of the invocation can be the
SearcherMultiPaneDialog#m_btnSearcherExpand
button.
protected void statusChangeProc()
statusChangeProc
in class Panel
public java.lang.String strKeyElemVal(java.lang.String name)
public void reset()
public void resetIteration()