public class TablePanel<O> extends Object
Constructor and Description |
---|
TablePanel(Iterable<O> objects,
List<String> features,
BiFunction<O,String,Double> featureFun,
Map<String,String> featureNames,
Map<String,String> featureShortNames,
Map<String,String> featureUnits,
Map<String,Boolean> isInts,
Map<String,String> infoTexts,
Supplier<FeatureColorGenerator<O>> colorSupplier,
Function<O,String> labelGenerator,
BiConsumer<O,String> labelSetter) |
TablePanel(Iterable<O> objects,
List<String> features,
BiFunction<O,String,Double> featureFun,
Map<String,String> featureNames,
Map<String,String> featureShortNames,
Map<String,String> featureUnits,
Map<String,Boolean> isInts,
Map<String,String> infoTexts,
Supplier<FeatureColorGenerator<O>> colorSupplier,
Function<O,String> labelGenerator,
BiConsumer<O,String> labelSetter,
String manualColorFeature,
BiConsumer<O,Color> colorSetter) |
Modifier and Type | Method and Description |
---|---|
void |
exportToCsv(File file) |
O |
getObjectForViewRow(int viewRowIndex)
Returns the object listed at the specified view row index.
|
JPanel |
getPanel()
The panel in which the table is displayed.
|
JTable |
getTable()
Exposes the
JTable in which the data is displayed. |
int |
getViewRowForObject(O o) |
void |
scrollToObject(O o) |
void |
setObjects(Iterable<O> objects) |
void |
setUseColoring(boolean useColoring) |
public TablePanel(Iterable<O> objects, List<String> features, BiFunction<O,String,Double> featureFun, Map<String,String> featureNames, Map<String,String> featureShortNames, Map<String,String> featureUnits, Map<String,Boolean> isInts, Map<String,String> infoTexts, Supplier<FeatureColorGenerator<O>> colorSupplier, Function<O,String> labelGenerator, BiConsumer<O,String> labelSetter)
public TablePanel(Iterable<O> objects, List<String> features, BiFunction<O,String,Double> featureFun, Map<String,String> featureNames, Map<String,String> featureShortNames, Map<String,String> featureUnits, Map<String,Boolean> isInts, Map<String,String> infoTexts, Supplier<FeatureColorGenerator<O>> colorSupplier, Function<O,String> labelGenerator, BiConsumer<O,String> labelSetter, String manualColorFeature, BiConsumer<O,Color> colorSetter)
public void setUseColoring(boolean useColoring)
public JPanel getPanel()
public JTable getTable()
JTable
in which the data is displayed.public O getObjectForViewRow(int viewRowIndex)
viewRowIndex
- the row to query.null
if the view row does not
correspond to an object currently displayed.public int getViewRowForObject(O o)
public void scrollToObject(O o)
public void exportToCsv(File file) throws IOException
IOException
Copyright © 2015–2021 Fiji. All rights reserved.