Class FilterIconPainter
java.lang.Object
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
org.eclipse.nebula.widgets.nattable.filterrow.FilterIconPainter
- All Implemented Interfaces:
ICellPainter
ImagePainter that is responsible for painting the icon into the
filter row cells. It will handle 3 different icons, where two of them are
mandatory:
- removeFilterImage (mandatory) - Image that is rendered if a filter is applied for that cell.
- comboImage (mandatory) - Image that is rendered if no filter is applied
for that cell, but the filter cell editor is of type
ComboBoxCellEditor. - filterImage (optional) - Image that is rendered if no filter is applied for that cell.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
calculateByHeight, calculateByWidth -
Constructor Summary
ConstructorsConstructorDescriptionCreates aFilterIconPainterthat uses the default images for removeFilter and combo box icons.FilterIconPainter(org.eclipse.swt.graphics.Image filterImage) Creates aFilterIconPainterthat uses the default images for removeFilter and combo box icons.FilterIconPainter(org.eclipse.swt.graphics.Image filterImage, org.eclipse.swt.graphics.Image removeFilterImage, org.eclipse.swt.graphics.Image comboImage) Creates aFilterIconPainterthat uses the given images for the icons in the filter row cells. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.graphics.ImagegetImage(ILayerCell cell, IConfigRegistry configRegistry) Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
getCellPainterAt, getPreferredHeight, getPreferredWidth, isCalculateByHeight, isCalculateByWidth, paintCell, setCalculateByHeight, setCalculateByWidthMethods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
getBackgroundColourMethods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
-
Constructor Details
-
FilterIconPainter
public FilterIconPainter()Creates aFilterIconPainterthat uses the default images for removeFilter and combo box icons. No image for indicating the filter row will be applied. -
FilterIconPainter
public FilterIconPainter(org.eclipse.swt.graphics.Image filterImage) Creates aFilterIconPainterthat uses the default images for removeFilter and combo box icons. Will apply the given image for indicating the filter row to a user.- Parameters:
filterImage- Icon that will be rendered if no filter is applied for a cell in a filter row.
-
FilterIconPainter
public FilterIconPainter(org.eclipse.swt.graphics.Image filterImage, org.eclipse.swt.graphics.Image removeFilterImage, org.eclipse.swt.graphics.Image comboImage) Creates aFilterIconPainterthat uses the given images for the icons in the filter row cells.- Parameters:
filterImage- Icon that will be rendered if no filter is applied for a cell in a filter row.removeFilterImage- Icon that will be rendered if a filter is applied for a cell in a filter row.comboImage- Icon that is rendered if no filter is applied for a cell in a filter row, and the configured cell editor for that cell is aComboBoxCellEditor.
-
-
Method Details
-
getImage
- Overrides:
getImagein classImagePainter- Parameters:
cell- TheILayerCellfor which thisImagePainteris called.configRegistry- The currentIConfigRegistryto retrieve the cell style information from.- Returns:
- The
Imagethat should be painted by thisImagePainter.
-