public class FilterTableModel extends javax.swing.table.AbstractTableModel
FilterDialog.| Modifier and Type | Field and Description |
|---|---|
static int |
COL_ENABLED
The filter enabled column
|
static int |
COL_HIDING
The column indicating if the filter is hiding.
|
static int |
COL_INVERTED
The column to invert the filter
|
static int |
COL_TEXT
The column that displays the filter text
|
private OSDLabel |
lblOSD
A helper for
drawOSDText(Graphics2D). |
(package private) FilterModel |
model
The filter model
|
| Constructor and Description |
|---|
FilterTableModel()
Constructs a new
FilterTableModel. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(Filter filter)
Adds a new filter to the filter list.
|
void |
drawOSDText(java.awt.Graphics2D g)
Draws a text on the map display that indicates that filters are active.
|
void |
executeFilters()
Runs the filters on the current edit data set, if any.
|
void |
executeFilters(boolean force)
Runs the filters on the current edit data set, if any.
|
void |
executeFilters(java.util.Collection<? extends OsmPrimitive> primitives)
Runs the filter on a list of primitives that are part of the edit data set, if any.
|
void |
executeFilters(java.util.Collection<? extends OsmPrimitive> primitives,
boolean force)
Runs the filter on a list of primitives that are part of the edit data set, if any.
|
java.lang.Class<?> |
getColumnClass(int column) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int column) |
Filter |
getFilter(int rowIndex)
Gets the filter by row index
|
java.util.List<Filter> |
getFilters()
Returns the list of filters.
|
int |
getRowCount() |
java.lang.Object |
getValueAt(int row,
int column) |
boolean |
isCellEditable(int row,
int column) |
boolean |
isCellEnabled(int row,
int column)
Determines if a cell is enabled.
|
private void |
loadPrefs() |
void |
moveDownFilter(int rowIndex)
Moves down the filter in the given row.
|
void |
moveUpFilter(int rowIndex)
Moves up the filter in the given row
|
void |
removeFilter(int rowIndex)
Removes the filter that is displayed in the given row
|
private void |
savePrefs() |
void |
setFilter(int rowIndex,
Filter filter)
Sets/replaces the filter for a given row.
|
void |
setValueAt(java.lang.Object aValue,
int row,
int column) |
private void |
updateFilters() |
private void |
updateMap() |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic static final int COL_ENABLED
public static final int COL_HIDING
public static final int COL_TEXT
public static final int COL_INVERTED
final FilterModel model
private final OSDLabel lblOSD
drawOSDText(Graphics2D).public FilterTableModel()
FilterTableModel.private void updateFilters()
public void executeFilters()
public void executeFilters(java.util.Collection<? extends OsmPrimitive> primitives)
primitives - The primitivespublic void executeFilters(boolean force)
force - force execution of filters even if no filter is enabled. Useful to reset state after change of filterspublic void executeFilters(java.util.Collection<? extends OsmPrimitive> primitives, boolean force)
force - force execution of filters even if no filter is enabled. Useful to reset state after change of filtersprimitives - The primitivesprivate void updateMap()
private void loadPrefs()
private void savePrefs()
public void addFilter(Filter filter)
filter - The new filterpublic void moveDownFilter(int rowIndex)
rowIndex - The filter rowpublic void moveUpFilter(int rowIndex)
rowIndex - The filter rowpublic void removeFilter(int rowIndex)
rowIndex - The index of the filter to removepublic void setFilter(int rowIndex, Filter filter)
rowIndex - The row indexfilter - The filter that should be placed in that rowpublic Filter getFilter(int rowIndex)
rowIndex - The row indexpublic int getRowCount()
public int getColumnCount()
public java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelpublic java.lang.Class<?> getColumnClass(int column)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic boolean isCellEnabled(int row, int column)
row - row indexcolumn - column indextrue if the cell at (row, column) is enabledpublic boolean isCellEditable(int row, int column)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic void setValueAt(java.lang.Object aValue, int row, int column)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic java.lang.Object getValueAt(int row, int column)
public void drawOSDText(java.awt.Graphics2D g)
g - The graphics to draw that text on.public java.util.List<Filter> getFilters()