public class Custom3DPalette extends Custom3D
Title: Custom3DPalette class
Description: Custom3DPalette Series Style.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Modifier and Type | Class and Description |
---|---|
static interface |
Custom3DPalette.ColorResolver |
Series.MarkTextResolver
Modifier and Type | Field and Description |
---|---|
protected boolean |
bUseColorRange |
protected boolean |
bUsePalette |
protected int |
iPaletteSteps |
protected boolean |
sameBrush |
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, iNumSampleValues, iZOrder, labelMember, lastVisible, listenerList, mandatory, manualData, marks, middleZ, notMandatory, oldDataSource, percentDecimal, percentFormat, sLabels, startZ, useAxis, useSeriesColor, valueFormat, vxValues, vyValues, yMandatory
chart, InternalUse
Constructor and Description |
---|
Custom3DPalette() |
Custom3DPalette(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
int |
addPalette(double aValue,
Color aColor)
Add Color to Palette list
|
protected void |
calcColorRange() |
void |
clearPalette()
Deletes all Palette information.
|
protected int |
countLegendItems() |
protected void |
createDefaultPalette(int numSteps) |
void |
createSubGallery(Gallery addSubChart) |
void |
doBeforeDrawChart() |
protected void |
drawLegendShape(IGraphics3D g,
int valueIndex,
Rectangle rect) |
void |
galleryChanged3D(boolean is3D) |
double |
getBlueFactor()
Defines the alpha value for the Blue of the ARGB component.
Default value: 1 |
ChartBrush |
getBrush()
Defines the Brush to fill the Surface polygons.
It only works when getUsePalette() and
getUseColorRange() are false. |
int |
getCountLegendItems() |
Color |
getEndColor()
Determines the last Range palette color.
When getUseColorRange() is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods. |
double |
getGreenFactor()
Defines the alpha value for the Green of the ARGB component.
Default value: 1 |
java.lang.String |
getLegendString(int legendIndex,
LegendTextStyle legendTextStyle)
Returns LegendString for LegendIndexth item.
|
Color |
getMidColor()
Determines the middle Range palette color.
When getUseColorRange() is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods. |
PaletteList |
getPalette()
Access the Color Palette list
|
double |
getPaletteMin()
The starting value used to calculate the color palette when
Custom3DPalette.UsePaletteMin is true.
Default value: 0 |
double |
getPaletteRange()
Defines the range of colors in the default color Palette.
Default value: O |
double |
getPaletteStep()
The interval amount between palette Colors.
Use getPaletteMin() and
getPaletteSteps() Default value: 0 |
int |
getPaletteSteps()
The number of entries in the default color Palette.
The greater the number of steps, the more colors will be used to fill the Surface polygons. |
PaletteStyle |
getPaletteStyle()
Selects Pale or Strong color palette.
Default value: PaletteStyles.Pale |
ChartPen |
getPen()
Defines the Pen to draw the Surface polygons.
You can make it invisible by turning the Pen.Visible to false. |
double |
getRedFactor()
Defines the alpha value for the Red of the ARGB component.
Defalut value: 2 |
Color |
getStartColor()
Determines 1 of 3 Colors used to create the palette to fill the Surface
polygons.
When getUseColorRange() is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods. |
boolean |
getUseColorRange()
Gradient color palette to fill Surface polygons.
The Palette is defined with three colors: getStartColor()
getMidColor() and
getEndColor() . |
boolean |
getUsePalette()
Determines multi-color palette to fill Surface polygons.
PaletteSteps determines the number of entries in the palette. Alternatively to getPaletteSteps() you may use
getUseColorRange() UseColorRange or the Series
ColorEachPoint method to define colour for the Surface Series. |
boolean |
getUsePaletteMin()
Forces the color palette to start at
getUsePaletteMin() value when true.Default value: false |
Color |
getValueColor(int valueIndex)
Returns the colour of the index point.
Index gives the position of the point, where 0 is the first, 1 is the second, and so on. |
protected Color |
getValueColorValue(double aValue) |
Color |
legendItemColor(int legendIndex) |
void |
prepareForGallery(boolean isEnabled) |
protected java.lang.Object |
readResolve() |
void |
removeColorResolver() |
void |
setBlueFactor(double value)
Sets the alpha value for the Blue of the ARGB component.
Default value: 1 |
void |
setChart(IBaseChart c)
Chart associated with this object.
|
void |
setColorResolver(Custom3DPalette.ColorResolver resolver) |
void |
setEndColor(Color value)
Sets the last Range palette color.
Default value: WHITE |
void |
setGreenFactor(double value)
Sets the alpha value for the Green of the ARGB component.
Defalut value: 1 |
void |
setMidColor(Color value)
Sets the middle Range palette color.
Default value: Transparent |
void |
setPaletteMin(double value)
Sets starting value used to calculate the color palette when
getUsePaletteMin() is true.Default value: 0 |
void |
setPaletteRange(double value)
Sets the range of colors in the default color Palette.
Default value: O |
void |
setPaletteStep(double value)
|
void |
setPaletteSteps(int value)
Sets the number of entries in the default color Palette.
Default value: false |
void |
setPaletteStyle(PaletteStyle value)
Sets Pale or Strong color palette.
Default value: PaletteStyles.Pale |
void |
setRedFactor(double value)
Sets the alpha value for the Red of the ARGB component.
Defalut value: 2 |
protected boolean |
setSameBrush() |
void |
setStartColor(Color value)
Sets 1 of 3 Colors used to create the palette to fill the Surface
polygons.
Default value: NAVY |
void |
setSubGallery(int index)
Creates and prepares the index'th Series style to show at sub-gallery
dialog.
|
void |
setUseColorRange(boolean value)
Sets gradient color palette to fill Surface polygons.
Default value: true |
void |
setUsePalette(boolean value)
Sets multi-color palette to fill Surface polygons.
Default value: false |
void |
setUsePaletteMin(boolean value)
Set to true to force the color palette to start at
getUsePaletteMin() value.Default value: false |
add, add, add, add, add, add, add, add, add, calcZOrder, calcZPos, drawMark, getMaxZValue, getMinZValue, getPoint, getTimesZOrder, getZValues, isValidSourceOf, prepareLegendCanvas, setTimesZOrder, valueListOfAxis
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addChartValue, added, addedValue, addNull, addNullXY, addSampleValues, addSeriesMouseListener, addSeriesPaintListener, addValues, assign, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcHorizMargins, calcPercentSt, calcPosValue, calculateMarkPosition, calcVerticalMargins, calcXPos, calcXPosValue, calcXSizeValue, calcYPos, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clicked, clone, cloneSeries, convertArray, createNewSeries, createNewSeries, createNewSeries, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, draw, drawHiddenValue, drawLegend, drawLegend, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValue, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, getActive, getAllowSinglePoint, getBitmapEditor, getColor, getColorEach, getColorMember, getColors, getCount, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getDescription, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getMandatory, getMandatoryAxis, getMarks, getMarkText, getMarkValue, getMaxXValue, getMaxYValue, getMiddleZ, getMinXValue, getMinYValue, getNotMandatory, getNumGallerySeries, getNumSampleValues, getOriginValue, getPercentFormat, getSeriesColor, getShowInLegend, getStartZ, getTitle, getUseAxis, getValueFormat, getValueIndexSwapper, getValueList, getValueList, getValueMarkText, getValuesLists, getVertAxis, getVerticalAxis, getVisible, getXValues, getYMandatory, getYValueList, getYValues, getZOrder, hasClickEvents, hasColors, hasDataSource, hasLabels, hasListenersOf, hasNoMandatoryValues, isNull, isPointInChartRect, isValidSeriesSource, lastDisplayed, lastVisibleMark, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, randomBounds, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesMouseListener, removeSeriesPaintListener, repaint, sameClass, setActive, setColor, setColorEach, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDefaultNullValue, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, sortDrawSeries, swapValueIndex, titleOrName, toString, valuesListAdd, xScreenToValue, yScreenToValue
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChart, invalidate
protected int iPaletteSteps
protected boolean bUseColorRange
protected boolean bUsePalette
protected boolean sameBrush
public Custom3DPalette(IBaseChart c)
public Custom3DPalette()
protected boolean setSameBrush()
public void setColorResolver(Custom3DPalette.ColorResolver resolver)
public void removeColorResolver()
protected int countLegendItems()
countLegendItems
in class Series
protected java.lang.Object readResolve()
readResolve
in class Series
public ChartPen getPen()
public double getPaletteRange()
public void setPaletteRange(double value)
value
- doublepublic int getPaletteSteps()
public void setPaletteSteps(int value)
value
- intpublic double getRedFactor()
public void setRedFactor(double value)
value
- doublepublic double getGreenFactor()
public void setGreenFactor(double value)
value
- doublepublic double getBlueFactor()
public void setBlueFactor(double value)
value
- doubleprotected void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
drawLegendShape
in class Series
public Color getEndColor()
getUseColorRange()
is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods.
public void setEndColor(Color value)
value
- Colorpublic Color getMidColor()
getUseColorRange()
is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods.
public void setMidColor(Color value)
value
- Colorpublic Color getStartColor()
getUseColorRange()
is true, Surface series
creates a color palette using StartColor, MidColor and EndColor methods.
public void setStartColor(Color value)
value
- Colorpublic ChartBrush getBrush()
getUsePalette()
and
getUseColorRange()
are false.public void setPaletteStyle(PaletteStyle value)
Example:
series = new com.steema.teechart.styles.Surface(myChart.getChart()); series.setPaletteStyle(PaletteStyle.STRONG); series.setUsePalette(true); series.getPen().setVisible(false); series.setPaletteSteps(15); series.setUseColorRange(false); series.fillSampleValues(30);
value
- PaletteStylespublic PaletteStyle getPaletteStyle()
public double getPaletteStep()
getPaletteMin()
and
getPaletteSteps()
public void setPaletteStep(double value)
value
- doublepublic PaletteList getPalette()
public double getPaletteMin()
getUsePaletteMin()
public void setPaletteMin(double value)
getUsePaletteMin()
is true.value
- doublegetUsePaletteMin()
protected void calcColorRange()
public void clearPalette()
public int addPalette(double aValue, Color aColor)
aValue
- double data valueaColor
- Color colorpublic void createSubGallery(Gallery addSubChart)
createSubGallery
in class Series
protected void createDefaultPalette(int numSteps)
public void setSubGallery(int index)
Series
setSubGallery
in interface ISeries
setSubGallery
in class Series
index
- intpublic boolean getUseColorRange()
getStartColor()
getMidColor()
and
getEndColor()
. When both
getUseColorRange()
and
getUsePalette()
are false, all Surface
polygons are filled with Surface's Series.Color color. public void setUseColorRange(boolean value)
value
- booleanpublic boolean getUsePalette()
getPaletteSteps()
you may use
getUseColorRange()
UseColorRange or the Series
ColorEachPoint method to define colour for the Surface Series. public void setUsePalette(boolean value)
value
- booleanpublic boolean getUsePaletteMin()
getUsePaletteMin()
value when true.getUsePaletteMin()
public void setUsePaletteMin(boolean value)
getUsePaletteMin()
value.value
- booleangetUsePaletteMin()
protected Color getValueColorValue(double aValue)
public Color getValueColor(int valueIndex)
getValueColor
in interface ISeries
getValueColor
in class Series
valueIndex
- intpublic int getCountLegendItems()
getCountLegendItems
in interface ISeries
getCountLegendItems
in class Series
public java.lang.String getLegendString(int legendIndex, LegendTextStyle legendTextStyle)
getLegendString
in interface ISeries
getLegendString
in class Series
legendIndex
- intlegendTextStyle
- LegendTextStylespublic Color legendItemColor(int legendIndex)
legendItemColor
in interface ISeries
legendItemColor
in class Series
public void setChart(IBaseChart c)
TeeBase
public void prepareForGallery(boolean isEnabled)
prepareForGallery
in class Series
public void doBeforeDrawChart()
doBeforeDrawChart
in class Series
public void galleryChanged3D(boolean is3D)
galleryChanged3D
in class Series