|
||||||||||
| 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
org.knime.core.node.util.ColumnFilterPanel
public class ColumnFilterPanel
Panel is used to select/filter a certain number of columns.
You can add a property change listener to this class that is notified when the include list changes.
| Nested Class Summary | |
|---|---|
static class |
ColumnFilterPanel.ValueClassFilter
Class that filters all columns based on a given set of compatible DataValue classes. |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
EXCLUDED_COLUMNS
Settings key for the excluded columns. |
static String |
INCLUDED_COLUMNS
Settings key for the excluded columns. |
| 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 | |
|---|---|
ColumnFilterPanel()
Deprecated. Use the constructor ColumnFilterPanel(boolean)
instead |
|
ColumnFilterPanel(boolean showKeepAllBox)
Creates a new filter column panel with three component which are the include list, button panel to shift elements between the two lists, and the exclude list. |
|
ColumnFilterPanel(boolean showKeepAllBox,
Class<? extends DataValue>... filterValueClasses)
Creates a new filter column panel with three component which are the include list, button panel to shift elements between the two lists, and the exclude list. |
|
ColumnFilterPanel(boolean showKeepAllBox,
ColumnFilter filter)
Creates a new filter column panel with three component which are the include list, button panel to shift elements between the two lists, and the exclude list. |
|
ColumnFilterPanel(Class<? extends DataValue>... filterValueClasses)
Deprecated. Use the constructor ColumnFilterPanel(boolean, Class...) instead |
|
ColumnFilterPanel(ColumnFilter filter)
Deprecated. Use the constructor ColumnFilterPanel(boolean, ColumnFilter) instead |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
Adds a listener which gets informed whenever the column filtering changes. |
Set<String> |
getExcludedColumnList()
Deprecated. Use getExcludedColumnSet() instead |
Set<String> |
getExcludedColumnSet()
Returns all columns from the exclude list. |
Set<String> |
getIncludedColumnList()
Deprecated. Use getIncludedColumnSet() instead |
Set<String> |
getIncludedColumnSet()
Returns all columns from the include list. |
DataType |
getType(String name)
Returns the data type for the given cell retrieving it from the initial DataTableSpec. |
void |
hideColumns(DataColumnSpec... columns)
Removes the given columns form either include or exclude list and notifies all listeners. |
boolean |
isKeepAllSelected()
If the keep all box is visible and is selected. |
void |
removeAllColumnFilterChangeListener()
Removes all column filter change listener. |
void |
removeChangeListener(ChangeListener listener)
Removes the given listener from this filter column panel. |
void |
resetHiding()
Re-adds all remove/hidden columns to the exclude list. |
void |
setAddAllButtonText(String text)
Setter for the original "Add All" button. |
void |
setAddButtonText(String text)
Setter for the original "Add" button. |
void |
setColumnFilter(ColumnFilter filter)
Sets the internal used ColumnFilter to the given one and calls
the update(DataTableSpec, boolean, Collection) method to
update the column panel. |
void |
setEnabled(boolean enabled)
Enables or disables all components on this panel. |
void |
setExcludeTitle(String title)
Sets the title of the exclude panel. |
void |
setIncludeTitle(String title)
Sets the title of the include panel. |
void |
setKeepAllSelected(boolean select)
Sets a new selection for the keep all columns box. |
protected void |
setListCellRenderer(ListCellRenderer renderer)
Set the renderer that is used for both list in this panel. |
void |
setRemoveAllButtonText(String text)
Setter for the original "Remove All" button. |
void |
setRemoveButtonText(String text)
Setter for the original "Remove" button. |
void |
update(DataTableSpec spec,
boolean exclude,
Collection<String> list)
Updates this filter panel by removing all current selections from the include and exclude list. |
void |
update(DataTableSpec spec,
boolean exclude,
String... cells)
Updates this filter panel by removing all current selections from the include and exclude list. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String INCLUDED_COLUMNS
public static final String EXCLUDED_COLUMNS
| Constructor Detail |
|---|
@Deprecated public ColumnFilterPanel()
ColumnFilterPanel(boolean)
instead
update(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String[])public ColumnFilterPanel(boolean showKeepAllBox)
showKeepAllBox - true, if an check box to keep all
columns is shownupdate(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String[])
public ColumnFilterPanel(boolean showKeepAllBox,
Class<? extends DataValue>... filterValueClasses)
filterValueClasses - an array of type DataValue classes only
allowed for selection. Will be check during updateshowKeepAllBox - true, if an check box to keep all columns is shownupdate(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String...)@Deprecated public ColumnFilterPanel(Class<? extends DataValue>... filterValueClasses)
ColumnFilterPanel(boolean, Class...) instead
filterValueClasses - an array of type DataValue classes only
allowed for selection. Will be check during updateupdate(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String...)@Deprecated public ColumnFilterPanel(ColumnFilter filter)
ColumnFilterPanel(boolean, ColumnFilter) instead
filter - specifies valid column values. Will be check during updateupdate(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String...)
public ColumnFilterPanel(boolean showKeepAllBox,
ColumnFilter filter)
showKeepAllBox - true, if an check box to keep all columns is shownfilter - specifies valid column values. Will be check during updateupdate(DataTableSpec, boolean, Collection),
update(DataTableSpec, boolean, String...)| Method Detail |
|---|
public void setEnabled(boolean enabled)
setEnabled in class JComponentpublic void addChangeListener(ChangeListener listener)
listener - the listenerpublic void removeChangeListener(ChangeListener listener)
listener - the listener.public void removeAllColumnFilterChangeListener()
public final boolean isKeepAllSelected()
public final void setKeepAllSelected(boolean select)
select - true, if the box should be selected
public void update(DataTableSpec spec,
boolean exclude,
String... cells)
spec - the spec to retrieve the column names fromexclude - the flag if cells contains the columns to
exclude (otherwise include).cells - an array of data cells to either in- or exclude.
public void update(DataTableSpec spec,
boolean exclude,
Collection<String> list)
spec - the spec to retrieve the column names fromexclude - the flag if list contains the columns to
exclude otherwise includelist - the list of columns to exclude or include@Deprecated public Set<String> getExcludedColumnList()
getExcludedColumnSet() instead
public Set<String> getExcludedColumnSet()
@Deprecated public Set<String> getIncludedColumnList()
getIncludedColumnSet() instead
public Set<String> getIncludedColumnSet()
public DataType getType(String name)
DataTableSpec. If this name could not found, return
null.
name - the column name to get the data type for
nullprotected final void setListCellRenderer(ListCellRenderer renderer)
renderer - the new renderer being usedJList.setCellRenderer(javax.swing.ListCellRenderer)public final void hideColumns(DataColumnSpec... columns)
null elements or is not contained in any of the
lists.
columns - the columns to removepublic final void resetHiding()
public final void setIncludeTitle(String title)
title - the new titlepublic final void setExcludeTitle(String title)
title - the new titlepublic void setRemoveAllButtonText(String text)
text - the new button titlepublic void setAddAllButtonText(String text)
text - the new button titlepublic void setRemoveButtonText(String text)
text - the new button titlepublic void setAddButtonText(String text)
text - the new button titlepublic void setColumnFilter(ColumnFilter filter)
ColumnFilter to the given one and calls
the update(DataTableSpec, boolean, Collection) method to
update the column panel.
filter - the new ColumnFilter to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||