|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.viz.histogram.datamodel.AbstractHistogramVizModel
public abstract class AbstractHistogramVizModel
This is the basic visualization model for a histogram. It handles bin creation and hilite handling and defines the constants which effect the drawing like minimum space between bins and elements.
Nested Class Summary | |
---|---|
class |
AbstractHistogramVizModel.HistogramHiliteCalculator
The histogram hilite shape calculator. |
Field Summary | |
---|---|
static int |
BAR_SURROUNDING_SPACE
The space around a bar which is used to show the aggregation column color. |
static int |
BIN_SURROUNDING_SPACE
The thickness of a bin which is used to show the different bins. |
static int |
DEFAULT_NO_OF_BINS
The default number of bars which get created if the createBinnedBars method is called with a number smaller then 1. |
static double |
HILITE_RECT_WIDTH_FACTOR
The width of the hilite rectangle in percent of the surrounding rectangle. |
static int |
INTERVAL_DIGITS
Defines the number of decimal places which are used by default in the binning method. |
static int |
MIN_BIN_WIDTH
Defines the minimum width of a bin. |
static int |
MINIMUM_BAR_HEIGHT
The minimum height of a bar. |
static int |
MINIMUM_ELEMENT_WIDTH
The minimum width of an bar/element. |
static String |
MISSING_VAL_BAR_CAPTION
The caption of the bar which holds all missing values. |
static int |
SPACE_BETWEEN_BARS
The space between to bars in pixel. |
static int |
SPACE_BETWEEN_BINS
This is the minimum space between two bins. |
static int |
SPACE_BETWEEN_ELEMENTS
The space between to elements in the SIDE_BY_SIDE HistogramLayout
layout in pixel. |
Constructor Summary | |
---|---|
AbstractHistogramVizModel(List<Color> rowColors,
AggregationMethod aggrMethod,
HistogramLayout layout,
int noOfBins)
Constructor for class HistogramVizModel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MISSING_VAL_BAR_CAPTION
public static final int MIN_BIN_WIDTH
public static final int DEFAULT_NO_OF_BINS
public static final int INTERVAL_DIGITS
public static final double HILITE_RECT_WIDTH_FACTOR
public static final int BIN_SURROUNDING_SPACE
public static final int SPACE_BETWEEN_BINS
public static final int BAR_SURROUNDING_SPACE
public static final int SPACE_BETWEEN_BARS
public static final int SPACE_BETWEEN_ELEMENTS
HistogramLayout
layout in pixel. Must be greater 0.
public static final int MINIMUM_ELEMENT_WIDTH
public static final int MINIMUM_BAR_HEIGHT
Constructor Detail |
---|
public AbstractHistogramVizModel(List<Color> rowColors, AggregationMethod aggrMethod, HistogramLayout layout, int noOfBins)
rowColors
- all possible colors the user has defined for a rowlayout
- the HistogramLayout
to useaggrMethod
- the AggregationMethod
to usenoOfBins
- the no of bins to createMethod Detail |
---|
public Dimension getDrawingSpace()
public boolean setDrawingSpace(Dimension drawingSpace)
drawingSpace
- the drawingSpace to set
true
if the parameter has changedpublic List<BinDataModel> getBins()
BinDataModel
objects of this
histogram including the missing value bin if the showMissingValue
bin variable is set to
true
public List<BinDataModel> getSelectedBins()
public abstract Collection<ColorColumn> getAggrColumns()
public abstract DataColumnSpec getXColumnSpec()
public abstract String getXColumnName()
public List<Color> getRowColors()
public int getNoOfElements()
public int getNoOfBins()
public int getMaxNoOfBins()
public int getBinWidth()
public int getMaxBinWidth()
public boolean setBinWidth(int binWidth)
binWidth
- the binWidth to set
true
if the with has changedpublic boolean setNoOfBins(int noOfBins)
noOfBins
- the new number of bins to create
true
if the number of bins has changedprotected void updateNoOfBins(int noOfBins)
noOfBins
- updates the number of bins but doesn't check if the
number has changed and thus doesn't recreate the bins if the
number has changed.public int getDisplayedNoOfBins()
public BinDataModel getBin(String caption)
caption
- the caption of the bin of interest
null
if no bin
with the given caption existspublic BinDataModel getBin(int idx)
idx
- the index of the bin
BinDataModel
at the given indexpublic Set<DataCell> getBinCaptions()
public boolean isBinNominal()
true
if the bins are nominal or
false
if the bins are intervalspublic abstract boolean supportsHiliting()
true
if the bins support hiliting otherwise
false
public double getMaxAggregationValue()
public double getMinAggregationValue()
protected BinDataModel getMissingValueBin()
public boolean containsMissingValueBin()
true
if this model contains a missing value binpublic boolean containsEmptyBins()
true
if the histogram contains at least one
bin with no rows in it.public boolean isShowEmptyBins()
true
if the empty bins should be displayedpublic boolean setShowEmptyBins(boolean showEmptyBins)
showEmptyBins
- set to true
if also the empty bins
should be shown
true
if the variable has changedpublic AggregationMethod getAggregationMethod()
public boolean setAggregationMethod(AggregationMethod aggrMethod)
aggrMethod
- the aggregation method to use to calculate
the aggregation value
true
if the aggregation method has changedpublic HistogramLayout getHistogramLayout()
public boolean setHistogramLayout(HistogramLayout layout)
layout
- the layout to set
true
if the layout has changedpublic boolean isShowMissingValBin()
public boolean setShowMissingValBin(boolean inclMissingValBin)
inclMissingValBin
- the inclMissingValBin to set
true
if the parameter has changedpublic boolean isShowGridLines()
public boolean setShowGridLines(boolean showGridLines)
showGridLines
- the showGridLines to set
true
if the parameter has changedpublic boolean isShowBinOutline()
public boolean setShowBinOutline(boolean showBinOutline)
showBinOutline
- the showBinOutline to set
true
if the parameter has changedpublic boolean isShowBarOutline()
public boolean setShowBarOutline(boolean showBarOutline)
showBarOutline
- the showBarOutline to set
true
if the parameter has changedpublic boolean setShowElementOutline(boolean showElementOutline)
showElementOutline
- the showElementOutlines to set
true
if the parameter has changedpublic boolean isShowElementOutline()
true
if the bar outline should be also shown for
none highlighted blockspublic boolean isShowLabelVertical()
public boolean setShowLabelVertical(boolean showLabelVertical)
showLabelVertical
- if true
the bar labels are
displayed vertical otherwise horizontal.
true
if the parameter has changedpublic LabelDisplayPolicy getLabelDisplayPolicy()
public boolean setLabelDisplayPolicy(LabelDisplayPolicy labelDisplayPolicy)
labelDisplayPolicy
- the display policy
true
if the parameter has changedpublic abstract Set<RowKey> getHilitedKeys()
public abstract Set<RowKey> getSelectedKeys()
public BarDataModel getSelectedElement(Point p)
p
- the point to select
BinDataModel
that contains the point or
null
public void selectElement(Point point)
point
- the point on the screen to selectpublic void selectElement(Rectangle rect)
rect
- the rectangle on the screen selectpublic void clearSelection()
public abstract void updateHiliteInfo(Set<RowKey> hilited, boolean hilite)
hilited
- the rowKeys of the rows to un/hilitehilite
- if the given keys should be hilited true
or unhilited false
public abstract void unHiliteAll()
public String getHTMLDetailData()
String
which contains details information
about the current selected elementsprotected void setBinNominal(boolean nominal)
nominal
- set to true
if the nominal binning method
should be used.protected void setBins(List<? extends BinDataModel> bins, BinDataModel missingValueBin)
bins
- the bins to displaymissingValueBin
- the missing value binpublic boolean containsNotPresentableBin()
true
if at least one bin is not presentable since
the number of aggregation columns doesn't fit into the binpublic static Rectangle2D calculateSurroundingRectangle(Rectangle2D rect, int baseLine, int thickness)
rect
- the rectangle to draw the surrounding forbaseLine
- the base line to know if the bar is negative or
positivethickness
- the thickness of the surrounding rectangle
public AbstractHistogramVizModel.HistogramHiliteCalculator getHiliteCalculator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |