|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.viz.aggregation.AggregationValSubModel<S,H>
S - the shape of this sub modelH - the optional hilite shapepublic abstract class AggregationValSubModel<S extends Shape,H extends Shape>
This class holds the data of a sub model which represents rows of the same color.
| Constructor Summary | |
|---|---|
protected |
AggregationValSubModel(Color color)
Constructor for class AttributeValColorModel. |
protected |
AggregationValSubModel(Color color,
boolean supportHiliting)
Constructor for class AttributeValColorModel. |
protected |
AggregationValSubModel(Color color,
boolean supportHiliting,
double aggrSum,
int valueCounter,
int rowCounter)
Constructor for class AttributeValColorModel (used for cloning). |
protected |
AggregationValSubModel(ConfigRO config)
Constructor for class AggregationValSubModel. |
| Method Summary | |
|---|---|
protected void |
addDataRow(RowKey rowKey,
DataCell aggrValCell)
Adds the given values to the sub element. |
protected void |
calculateHilitedShape(HiliteShapeCalculator<S,H> calculator)
Calculates the hilite rectangle or resets the hilite rectangle to null if no rows are hilited. |
protected void |
clearHilite()
Clears the hilite counter. |
protected AggregationValSubModel<S,H> |
clone()
|
double |
getAggregationSum()
|
double |
getAggregationValue(AggregationMethod method)
|
Color |
getColor()
|
Set<RowKey> |
getHilitedKeys()
|
int |
getHiliteRowCount()
Call the AggregationModel.supportsHiliting() method to check if hiliting
is supported. |
H |
getHiliteShape()
Call the AggregationModel.supportsHiliting() method to check if hiliting
is supported. |
Set<RowKey> |
getKeys()
|
String |
getName()
|
int |
getRowCount()
|
S |
getShape()
|
int |
getValueCount()
|
boolean |
isEmpty()
|
boolean |
isHilited()
|
boolean |
isPresentable()
|
boolean |
isSelected()
|
protected boolean |
removeHilitedKeys(Collection<RowKey> unhilitedKeys,
HiliteShapeCalculator<S,H> calculator)
|
void |
save2File(ConfigWO config,
ExecutionMonitor exec)
|
boolean |
selectElement(Point point)
Selects this element if the element rectangle contains the given point. |
boolean |
selectElement(Rectangle2D rect)
Selects this element if the element rectangle intersect the given rectangle. |
protected boolean |
setHilitedKeys(Collection<RowKey> hilitedKeys,
HiliteShapeCalculator<S,H> calculator)
|
protected void |
setHiliteShape(H shape)
|
protected void |
setPresentable(boolean presentable,
HiliteShapeCalculator<S,H> calculator)
|
protected void |
setSelected(boolean isSelected)
|
protected void |
setShape(S shape,
HiliteShapeCalculator<S,H> calculator)
|
boolean |
supportsHiliting()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AggregationValSubModel(Color color)
color - the color to use for this sub element
protected AggregationValSubModel(Color color,
boolean supportHiliting)
color - the color to use for this sub elementsupportHiliting - if hiliting support should be enabled
protected AggregationValSubModel(Color color,
boolean supportHiliting,
double aggrSum,
int valueCounter,
int rowCounter)
color - the color to use for this sub elementsupportHiliting - if hiliting should be supportedaggrSum - the sum of the aggregation valuesvalueCounter - the number of aggregation valuesrowCounter - the number of rows incl. missing values
protected AggregationValSubModel(ConfigRO config)
throws org.knime.core.node.InvalidSettingsException
config - the config object to use
org.knime.core.node.InvalidSettingsException - if the config object is invalid| Method Detail |
|---|
protected void addDataRow(RowKey rowKey,
DataCell aggrValCell)
rowKey - the rowkey of the row to addaggrValCell - the value cell of the aggregation column of this sub
elementpublic int getRowCount()
getRowCount in interface AggregationModel<S extends Shape,H extends Shape>public int getValueCount()
getValueCount in interface AggregationModel<S extends Shape,H extends Shape>public double getAggregationSum()
getAggregationSum in interface AggregationModel<S extends Shape,H extends Shape>public double getAggregationValue(AggregationMethod method)
getAggregationValue in interface AggregationModel<S extends Shape,H extends Shape>method - the AggregationMethod to use
public Color getColor()
getColor in interface AggregationModel<S extends Shape,H extends Shape>public S getShape()
getShape in interface AggregationModel<S extends Shape,H extends Shape>
protected void setShape(S shape,
HiliteShapeCalculator<S,H> calculator)
shape - the new shape of this sub elementcalculator - the hilite shape calculatorpublic H getHiliteShape()
AggregationModel.supportsHiliting() method to check if hiliting
is supported.
getHiliteShape in interface AggregationModel<S extends Shape,H extends Shape>protected void setHiliteShape(H shape)
shape - the new hilite shapepublic boolean isSelected()
isSelected in interface AggregationModel<S extends Shape,H extends Shape>true if the element is selectedpublic boolean isEmpty()
isEmpty in interface AggregationModel<S extends Shape,H extends Shape>true if this model contains no rowspublic boolean isPresentable()
isPresentable in interface AggregationModel<S extends Shape,H extends Shape>true if the sub elements should be drawn
protected void setPresentable(boolean presentable,
HiliteShapeCalculator<S,H> calculator)
presentable - true if this element is presentablecalculator - the hilite shape calculatorpublic String getName()
getName in interface AggregationModel<S extends Shape,H extends Shape>null)public boolean supportsHiliting()
supportsHiliting in interface AggregationModel<S extends Shape,H extends Shape>protected void setSelected(boolean isSelected)
isSelected - set to true if the element is selectedpublic boolean selectElement(Point point)
point - the Point to check
true if the element contains the pointpublic boolean selectElement(Rectangle2D rect)
rect - the Rectangle2D to check
true if the element intersects the rectanglepublic Set<RowKey> getKeys()
public boolean isHilited()
isHilited in interface AggregationModel<S extends Shape,H extends Shape>true if at least one row of this element is hilitedpublic Set<RowKey> getHilitedKeys()
protected void clearHilite()
protected boolean setHilitedKeys(Collection<RowKey> hilitedKeys,
HiliteShapeCalculator<S,H> calculator)
hilitedKeys - the hilited keyscalculator - the hilite shape calculator
true if at least one key has been added
protected boolean removeHilitedKeys(Collection<RowKey> unhilitedKeys,
HiliteShapeCalculator<S,H> calculator)
unhilitedKeys - the keys which should be unhilitedcalculator - the hilite shape calculator
true if at least one key has been removedpublic int getHiliteRowCount()
AggregationModel.supportsHiliting() method to check if hiliting
is supported.
getHiliteRowCount in interface AggregationModel<S extends Shape,H extends Shape>protected void calculateHilitedShape(HiliteShapeCalculator<S,H> calculator)
null if no rows are hilited.
calculator - the hilite shape calculator
protected AggregationValSubModel<S,H> clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
public void save2File(ConfigWO config,
ExecutionMonitor exec)
throws CanceledExecutionException
config - the config object to useexec - the ExecutionMonitor to provide progress messages
CanceledExecutionException - if the operation is canceled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||