public abstract class PieVizModel extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_EXPLODE_AREA_MARGIN
The margin of the explode are in percent of the label are rectangle.
|
static double |
DEFAULT_PIE_SIZE
The percentage of the drawing space that should be used for drawing.
|
static double |
LABEL_AREA_MARGIN
The margin of the label area in percent of the drawing space size.
|
static double |
MAXIMUM_EXPLODE_SIZE
The maximum size of the explode margin in percent.
|
static double |
MAXIMUM_PIE_SIZE
The minimum size of the pie drawing space in percent.
|
static double |
MINIMUM_ARC_ANGLE
The default minimum arc angle of a pie section to draw.
|
static double |
MINIMUM_EXPLODE_SIZE
The minimum size of the explode margin in percent.
|
static double |
MINIMUM_PIE_SIZE
The minimum size of the pie drawing space in percent.
|
static String |
MISSING_VAL_SECTION_CAPTION
The caption of the bar which holds all missing values.
|
static Color |
MISSING_VAL_SECTION_COLOR
The caption of the bar which holds all missing values.
|
| Constructor and Description |
|---|
PieVizModel(boolean supportsHiliting,
boolean detailsAvailable)
Constructor for class PieVizModel.
|
public static final String MISSING_VAL_SECTION_CAPTION
public static final Color MISSING_VAL_SECTION_COLOR
public static final double DEFAULT_PIE_SIZE
public static final double MAXIMUM_PIE_SIZE
public static final double MINIMUM_PIE_SIZE
public static final double LABEL_AREA_MARGIN
public static final double DEFAULT_EXPLODE_AREA_MARGIN
public static final double MINIMUM_EXPLODE_SIZE
public static final double MAXIMUM_EXPLODE_SIZE
public static final double MINIMUM_ARC_ANGLE
public PieVizModel(boolean supportsHiliting,
boolean detailsAvailable)
supportsHiliting - true if hiliting
should be supporteddetailsAvailable - true if details are availablepublic boolean detailsAvailable()
true if at least one section contains more than
one sub section.public abstract String getPieColumnName()
public abstract String getAggregationColumnName()
protected abstract List<PieSectionDataModel> getSections()
protected abstract PieSectionDataModel getMissingSection()
public PieHiliteCalculator getCalculator()
public ValueScale getValueScale()
public void setValueScale(ValueScale scale)
scale - the value scale to usepublic boolean setPieSize(double pieSize)
pieSize - the pieSize in percent of the drawing space.
(0.9 = 90 percent)true if the size has changedpublic double getPieSize()
public boolean setExplodeSize(double expSize)
expSize - the explode size in percent of the drawing space
(0.9 = 90%)true if the size has changedpublic double getExplodeSize()
public boolean setLabelDisplayPolicy(LabelDisplayPolicy labelDisplayPolicy)
labelDisplayPolicy - the label display policytrue if the property has changedpublic LabelDisplayPolicy getLabelDisplayPolicy()
public boolean showMissingValSection()
true if a section with the missing values should
be displayedpublic boolean setShowMissingValSection(boolean showMissingValSection)
showMissingValSection - true if the missing value
section should be displayed if it's availabletrue if the property has changedpublic boolean setShowDetails(boolean showDetails)
showDetails - true if also the sub sections should
be displayedtrue if the property has changedpublic boolean showDetails()
true if the sub sections of a section should be
displayedpublic boolean setDrawSectionOutline(boolean drawSectionOutline)
drawSectionOutline - true if the section outline
should be drawntrue if the property has changedpublic boolean drawSectionOutline()
true if the section outline should be drawnpublic boolean setExplodeSelectedSections(boolean explode)
explode - true if selected sections should be
exploded drawntrue if the property has changedpublic boolean explodeSelectedSections()
true if selected section should be exploded drawnpublic boolean setDrawAntialias(boolean drawAntialias)
drawAntialias - true if the shapes should be drawn
using antialiasingtrue if the property has changedpublic boolean drawAntialias()
true if the shapes should be drawn using
antialiasingpublic AggregationMethod getAggregationMethod()
AggregationMethodpublic boolean setAggregationMethod(AggregationMethod aggrMethod)
aggrMethod - the aggrMethod to settrue if the method has changedpublic List<PieSectionDataModel> getSections2Draw()
Listpublic boolean hasMissingSection()
true if this model contains a missing sectionpublic Dimension getDrawingSpace()
public boolean setDrawingSpace(Dimension drawingSpace)
drawingSpace - the drawingSpace to settrue if the parameter has changedpublic Rectangle2D getLabelArea()
Rectangle2D that defines the maximum surrounding of
the label area which includes the getExplodedArea()public Rectangle2D getExplodedArea()
Rectangle2D that defines the maximum surrounding of
the exploded sections which includes the getPieArea() rectanglepublic Rectangle2D getPieArea()
Rectangle2D to draw the pie in which is surrounded
by the getExplodedArea() rectangle which in turn is surrounded
by the getLabelArea() rectangle.public Point getPieCenter()
public double getLabelLinkSize()
public double getAbsAggregationValue()
public void updateHiliteInfo(Set<RowKey> keys, boolean hilite)
keys - the keys to (un)hilitehilite - true if the keys should be hilitedpublic void unHiliteAll()
public void clearSelection()
public PieSectionDataModel getSelectedElement(Point point)
point - the point to check for selectionnull if none is selectedpublic boolean selectElement(Point point)
point - the point on the screen to selecttrue if the selection has changedpublic boolean selectElement(Rectangle2D rect)
rect - the rectangle on the screen to selecttrue if the selection has changedpublic boolean supportsHiliting()
true if hiliting is supportedpublic String createLabel(PieSectionDataModel section)
section - the section to create the label forpublic String createLabel(PieSectionDataModel section, PieSubSectionDataModel subSection)
section - the main sectionsubSection - the sub section of interestpublic String getHTMLDetailData()
String with the detail information of the
selected sectionpublic List<PieSectionDataModel> getSelectedSections()
List of all selected p
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.