|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
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
com.citra.filter.auto.AbstractAutoFilterPanel
public abstract class AbstractAutoFilterPanel
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.
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 List |
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 Filter |
cloneFilter(Filter from)
Clones a Filter object and returns the result. |
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. |
protected void |
initComponents()
Initializes the components that are added on this panel. |
protected void |
initialize(Class objectClass,
String name,
int modelIndex,
Collection values,
PopupFilterHeaderModel headerModel)
Initializes the panel by setting the title's name, populating the available filter values and assigning clones of the Filter object that will be used to filter the rows of the table. |
abstract void |
populate(Collection values,
PopupFilterHeaderModel headerModel)
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. |
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String desc_str
protected String columnName
protected JLabel desc_label
protected JLabel columnName_label
protected JRadioButton andButton
protected JRadioButton orButton
protected List visuals
public static final String DEFAULT_DESC_STR
Constructor Detail |
---|
public AbstractAutoFilterPanel()
public AbstractAutoFilterPanel(String columnName)
Method Detail |
---|
protected void initComponents()
protected void createPanel()
protected abstract VisualFilter createVisualFilter()
public TableFilter getTableFilter()
protected Filter cloneFilter(Filter from) throws InstantiationException, IllegalAccessException
from
- the filter to clone
InstantiationException
IllegalAccessException
public abstract void populate(Collection values, PopupFilterHeaderModel headerModel)
values
- the values with which we want to populate the combobox of the visual filter subclassesheaderModel
- the header model populating the available filter valuespublic void setColumnName(String column)
column
- the column's name.public void setTableFilter(TableFilter tf)
tf
- the table filter whose values are going to be extracted so that to initialize
the panel.public void updateUI()
updateUI
in class JPanel
JComponent.updateUI()
protected void initialize(Class objectClass, String name, int modelIndex, Collection values, PopupFilterHeaderModel headerModel)
objectClass
- the class of the objects being filteredname
- the name of the column being filteredmodelIndex
- the model index of the column being filteredvalues
- a list of available filter valuesheaderModel
- the header model installed on the table
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |