Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.filter.auto
Class AbstractAutoFilterPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.sciapp.filter.auto.AbstractAutoFilterPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
BooleanAutoFilterPanel, DateAutoFilterPanel, NumericAutoFilterPanel, StringAutoFilterPanel

public abstract class AbstractAutoFilterPanel
extends JPanel

AbstractAutoFilterPanel defines a panel that is the visual representation of a custom duplex filter. This class uses visual filters to show and collect the user's filter selections. Each visual filter has a combobox (instead of a textfield), which is populated with the available filter options.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JRadioButton andButton
          the 'and' radio button.
protected  String columnName
          the column name
protected  JLabel columnName_label
          the label for the column name.
static String DEFAULT_DESC_STR
          a default string for the description.
protected  JLabel desc_label
          the label for the description.
protected  String desc_str
          a string for the description at the top.
protected  JRadioButton orButton
          the 'or' radio button.
protected  ArrayList visuals
          a list of visual filters.
 
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
AbstractAutoFilterPanel()
          Creates a new AbstractAutoFilterPanel.
AbstractAutoFilterPanel(String columnName)
          Creates a new AbstractAutoFilterPanel.
 
Method Summary
protected  void createPanel()
          Creates the panel using a BoxLayout with vertical orientation.
protected abstract  VisualFilter createVisualFilter()
          Returns a new instance of a visual filter subclass.
 TableFilter getTableFilter()
          Constructs and returns a table filter object that represents the selected values of the visual filters combination.
abstract  void populate(Collection values)
          Populates the comboboxes visible on each visual filter with the supplied collection values.
 void setColumnName(String column)
          Modifies the filtered column's name.
 void setTableFilter(TableFilter tf)
          Initializes the visual controls to the values contained in the supplied table filter.
 
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

desc_str

protected String desc_str
a string for the description at the top.


columnName

protected String columnName
the column name


desc_label

protected JLabel desc_label
the label for the description.


columnName_label

protected JLabel columnName_label
the label for the column name.


andButton

protected JRadioButton andButton
the 'and' radio button.


orButton

protected JRadioButton orButton
the 'or' radio button.


visuals

protected ArrayList visuals
a list of visual filters.


DEFAULT_DESC_STR

public static final String DEFAULT_DESC_STR
a default string for the description.

Constructor Detail

AbstractAutoFilterPanel

public AbstractAutoFilterPanel()
Creates a new AbstractAutoFilterPanel.


AbstractAutoFilterPanel

public AbstractAutoFilterPanel(String columnName)
Creates a new AbstractAutoFilterPanel.

Method Detail

createPanel

protected void createPanel()
Creates the panel using a BoxLayout with vertical orientation.


createVisualFilter

protected abstract VisualFilter createVisualFilter()
Returns a new instance of a visual filter subclass.


getTableFilter

public TableFilter getTableFilter()
Constructs and returns a table filter object that represents the selected values of the visual filters combination.

Returns:
the table filter.

populate

public abstract void populate(Collection values)
Populates the comboboxes visible on each visual filter with the supplied collection values.

Parameters:
values - the values with which we want to populate the combobox of the visual filter subclasses.

setColumnName

public void setColumnName(String column)
Modifies the filtered column's name.

Parameters:
column - the column's name.

setTableFilter

public void setTableFilter(TableFilter tf)
Initializes the visual controls to the values contained in the supplied table filter.

Parameters:
tf - the table filter whose values are going to be extracted so that to initialize the panel.

Copyright © 2005 Scientific Applications. All Rights Reserved.