public abstract class AbstractScaleChart extends AbstractChart
AbstractScaleChart
class provides basic implementations
for chart component that will display x scale and y scale.
the subclasses must override #paintContent method to paint specified chart context.
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected int |
endIndex |
protected java.util.List |
markers |
protected int |
startIndex |
protected int |
valueSpanCount |
protected java.awt.Color |
xAxisFillColor |
protected java.awt.Color |
xAxisOutlineColor |
protected java.lang.String |
xAxisStroke |
protected java.lang.String |
xAxisText |
protected java.awt.Color |
xAxisTextColor |
protected java.awt.Font |
xAxisTextFont |
protected double |
xAxisValue |
protected boolean |
xAxisVisible |
protected java.awt.Color |
xScaleTextColor |
protected java.awt.Font |
xScaleTextFont |
protected java.util.List |
xScaleTextList |
protected int |
xScaleTextOrientation |
protected int |
xScaleTextSpanCount |
protected boolean |
xScaleTextVisible |
protected java.awt.Color |
yAxisFillColor |
protected java.awt.Color |
yAxisOutlineColor |
protected java.lang.String |
yAxisStroke |
protected java.lang.String |
yAxisText |
protected java.awt.Color |
yAxisTextColor |
protected java.awt.Font |
yAxisTextFont |
protected boolean |
yAxisVisible |
protected boolean |
yscaleAutoCaculateFlag |
protected java.awt.Color |
yScaleLineColor |
protected java.lang.String |
yScaleLineStroke |
protected boolean |
yScaleLineVisible |
protected boolean |
yScaleMinTextVisible |
protected int |
yScalePixelGap |
protected java.awt.Color |
yScaleTextColor |
protected java.awt.Font |
yScaleTextFont |
protected java.text.NumberFormat |
yScaleTextFormat |
protected boolean |
yScaleTextInside |
protected boolean |
yScaleTextVisible |
protected double |
yScaleValueGap |
protected boolean |
yScaleValueGapAutoCalculate |
antialias, backgroundBounds, backgroundFillColor, backgroundGradient, backgroundGradientColor, backgroundGradientFactory, backgroundOutlineColor, backgroundStroke, backgroundVisible, box, chartPane, fixedValueCount, format, gradient, gradientColor, highlightBackground, highlightForeground, iconHeight, iconWidth, legendFont, legendLayout, legendOrientation, legendPane, lowerLimit, max, min, proportions, proportionsOfRange, proportionsOfSum, publishedElements, range, selectedColor, selectedOffset, selectedStroke, shadowOffset, shapeStructs, sortComparator, stroke, sum, textGap, titleLabel, unit, upperLimit, valueTextCenter, valueTextColor, valueTextFont, valueTextPosition, valueTextVisible, visibleFilters, xGap, yGap
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
AbstractScaleChart()
Creates a new
AbstractScaleChart object |
AbstractScaleChart(java.util.List items)
Creates a new
AbstractScaleChart object initialized with an explicit
list |
AbstractScaleChart(java.util.List items,
java.lang.String title)
Creates a new
AbstractScaleChart object initialized with an explicit
list and a title. |
AbstractScaleChart(java.util.List items,
java.lang.String title,
java.awt.Color backgroundColor)
Creates a new
AbstractScaleChart object initialized with an explicit
list, a title and a background color. |
AbstractScaleChart(java.util.List items,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Creates a new
AbstractScaleChart object initialized with an explicit
list, a title, a background color and a foreground color. |
AbstractScaleChart(TDataBox box)
Creates a new
AbstractScaleChart object initialized with an explicit
data box. |
AbstractScaleChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor)
Creates a new
AbstractScaleChart object initialized with an explicit
data box,a title and a background color. |
AbstractScaleChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Creates a new
AbstractScaleChart object initialized with an explicit
data box,a title , a background color and a foreground color. |
Modifier and Type | Method and Description |
---|---|
void |
addMarker(double value,
java.awt.Color color)
Adds a marker to the list of the markers.
|
void |
addMarker(Marker marker)
Adds a new specified
Marker object to the list of the markers. |
void |
addXScaleText(java.lang.String text)
Adds a new specified scale text to the scale text list.
|
protected void |
calculateValuesProportionsOfRange(boolean relativeMin,
int categoryCount) |
protected void |
calculateYScaleValueGap() |
protected double |
getAutoScaleValueGap(double range) |
protected java.lang.String |
getFormatedYScaleText(double value)
Gets the formated scale text along y-axis
|
java.util.List |
getMarkers()
Gets the list of the markers.
|
java.lang.String |
getToolTipText(Element element,
double value,
int index)
Makes a tooltip text of a specified
Element object with a value and a index position. |
protected int |
getXAxisExtraGap(java.awt.Graphics2D g2d)
Gets the gap distance from the x-axis
|
java.awt.Color |
getXAxisFillColor()
Gets the fill color of the x-axis,
the fill color is useful only when the shadowOffset>0.
|
java.awt.Color |
getXAxisOutlineColor()
Gets the outline color of the x-axis,
the outline color is useful only when the stroke !=null
|
java.lang.String |
getXAxisStroke()
Gets the stroke of the x-axis.
|
java.lang.String |
getXAxisText()
Gets the text of the x-axis.
|
java.awt.Color |
getXAxisTextColor()
Gets the color of the x-axis text.
|
java.awt.Font |
getXAxisTextFont()
Gets the font of the x-axis text.
|
double |
getXAxisValue()
Gets the value of the x-axis.
|
boolean |
getXAxisVisible()
Determines whether the x-axis is visible.
|
java.lang.String |
getXScaleText(int index)
Returns the scale text at the specified position in this xScaleTextList.
|
java.awt.Color |
getXScaleTextColor()
Gets the color of the scale text which is along the x-axis.
|
java.awt.Font |
getXScaleTextFont()
Gets the font of the scale text which is along the x-axis.
|
java.util.List |
getXScaleTextList()
Gets the list of the scale text which is painted along the x-axis.
|
int |
getXScaleTextOrientation()
Gets the orientation of the scale text which is along the x-axis.
|
java.awt.Color |
getYAxisFillColor()
Gets the fill color of the y-axis,
the fill color is useful only when the shadow>0.
|
java.awt.Color |
getYAxisOutlineColor()
Gets the outline color of the y-axis,
|
java.lang.String |
getYAxisStroke()
Gets the stroke of the y-axis.
|
java.lang.String |
getYAxisText()
Gets the text of the y-axis.
|
java.awt.Color |
getYAxisTextColor()
Gets the color of the y-axis text.
|
java.awt.Font |
getYAxisTextFont()
Gets the font of the y-axis text.
|
boolean |
getYAxisVisible()
Determines whether the y-axis should be visible.
|
java.awt.Color |
getYScaleLineColor()
Gets the color of the lines which is in a parallel with x-axis.
|
java.lang.String |
getYScaleLineStroke()
Gets the stroke of the scale line which is in a parallel with x-axis.
|
int |
getYScalePixelGap()
Gets the scale pixel gap along y-axis.
|
java.awt.Color |
getYScaleTextColor()
Gets the color of the scale text which is along y-axis.
|
java.awt.Font |
getYScaleTextFont()
Gets the font of the scale text which is along y-axis.
|
java.text.NumberFormat |
getYScaleTextFormat()
Gets the number format of the scale text which is along y-axis.
|
double |
getYScaleValueGap()
Gets the gap of the scale value which is along the y-axis.
|
boolean |
isXScaleTextVisible()
Determines whether the scale text which is along x-axis is visible.
|
boolean |
isYScaleLineVisible()
Determines whether the scale line which is in a parallel with x-axis should be visible.
|
boolean |
isYScaleMinTextVisible()
Determines whether the minimal scale text which is along the y-axis is visible.
|
boolean |
isYScaleTextInside()
Determines whether the scale text which is along the y-axis insides the y-axis.
|
boolean |
isYScaleTextVisible()
Determines whether the scale text which is along y-axis should be visible or not
|
boolean |
isYScaleValueGapAutoCalculate()
Determines whether the value gap of the y axis is calculated automatically.
|
void |
paintChart(java.awt.Graphics2D g2d,
int width,
int height)
Paints the chart graphics.
|
protected abstract void |
paintContent(java.awt.Graphics2D g2d,
int width,
int height,
int yAxisTextGap,
int xAxisTextGap,
int xAxisWidth,
int yAxisHeight,
int baseLine,
double pixelGap,
double valueGap) |
protected void |
paintXAxis(java.awt.Graphics2D g2d,
Marker marker,
int width,
int height,
int xTextGap,
int yTextGap,
double pixelGap,
double valueGap) |
void |
removeMarker(Marker marker)
Removes a specified
Marker object from the markers |
void |
removeXScaleText(int index)
Remove the scale text at the specified position in this xScaleTextList.
|
protected void |
setChartSVGAttribute(AbstractSVGChart abschart) |
void |
setMarkers(java.util.List markers)
Sets a new list for the markers.
|
void |
setXAxisFillColor(java.awt.Color xAxisFillColor)
Sets a new fill color of the x-axis,
the fill color is useful only when the shadowOffset>0.
|
void |
setXAxisOutlineColor(java.awt.Color xAxisOutlineColor)
Sets a new outline color for the x-axis,
the outline color is useful only when the xAxisStroke!=null
|
void |
setXAxisStroke(java.lang.String xAxisStroke)
Sets a new stroke for the x-axis.
|
void |
setXAxisText(java.lang.String xAxisText)
Sets a new text for the x-axis.
|
void |
setXAxisTextColor(java.awt.Color xAxisTextColor)
Sets a new color for the text of the x-axis.
|
void |
setXAxisTextFont(java.awt.Font xAxisTextFont)
Sets a new font for the x-axis text.
|
void |
setXAxisValue(double xAxisValue)
Sets a new value for the x-axis.
|
void |
setXAxisVisible(boolean xAxisVisible)
Sets whether the x-axis should be visible.
|
void |
setXScaleTextColor(java.awt.Color scaleTextColor)
Sets a new color for the scale text which is along the x-axis.
|
void |
setXScaleTextFont(java.awt.Font scaleTextFont)
Sets a new font for the the scale text which is along the x-axis.
|
void |
setXScaleTextList(java.util.List xScaleTextList)
Sets a new list for the scale text which is painted along the x-axis.
|
void |
setXScaleTextOrientation(int scaleTextOrientation)
Sets a new orientation for the scale text which is along the x-axis.
|
void |
setXScaleTextVisible(boolean scaleTextVisible)
Sets whether the scale text which is along x-axis should be visible.
|
void |
setYAxisFillColor(java.awt.Color yAxisFillColor)
Sets a new fill color for the y-axis,
the fill color is useful only when the shadowOffset>0.
|
void |
setYAxisOutlineColor(java.awt.Color yAxisOutlineColor)
Sets a new outline color for the y-axis,
|
void |
setYAxisStroke(java.lang.String yAxisStroke)
Sets a new stroke for the y-axis.
|
void |
setYAxisText(java.lang.String yAxisText)
Sets a new text for the y-axis.
|
void |
setYAxisTextColor(java.awt.Color yAxisTextColor)
Sets a new color for the y-axis text.
|
void |
setYAxisTextFont(java.awt.Font axisTextFont)
Sets a new font for the y-axis text.
|
void |
setYAxisVisible(boolean yAxisVisible)
Sets whether the y-axis should be visible.
|
void |
setYScaleLineColor(java.awt.Color yScaleLineColor)
Sets a new color for the lines which is in a parallel with x-axis.
|
void |
setYScaleLineStroke(java.lang.String yScaleLineStroke)
Sets a new stroke for the scale line which is in a parallel with x-axis.
|
void |
setYScaleLineVisible(boolean yScaleLineVisible)
Sets whether the scale line which is in a parallel with x-axis is visible.
|
void |
setYScaleMinTextVisible(boolean yScaleMinTextVisible)
Sets whether the minimal scale text which is along the y-axis should be visible.
|
void |
setYScalePixelGap(int yScalePixelGap)
Sets a new pixel gap for the scale along y-axis.
|
void |
setYScaleTextColor(java.awt.Color yScaleTextColor)
Sets a new color for the scale text which is along y-axis.
|
void |
setYScaleTextFont(java.awt.Font yScaleTextFont)
Sets a new font for the scale text which is along y-axis.
|
void |
setYScaleTextFormat(java.text.NumberFormat yScaleTextFormat)
Sets a new number format for the scale text which is along y-axis.
|
void |
setYScaleTextInside(boolean scaleTextInside)
Sets whether the scale text which is along the y-axis insides the y-axis.
|
void |
setYScaleTextVisible(boolean yScaleTextVisible)
Sets whether the scale text which is along y-axis should be visible
|
void |
setYScaleValueGap(double yScaleValueGap)
Sets a new gap for the scale value which is along the y-axis.
|
void |
setYScaleValueGapAutoCalculate(boolean scaleValueGapAutoCaculate)
Sets whether the value gap of the y axis should be calculated automatically.
|
protected double |
toValidHeight(double height) |
addElementClickedActionListener, addElementDoubleClickedActionListener, addItem, addSelectableFilter, addVisibleFilter, calculate, cleanDirtyState, clearItems, clearSelectableFilters, exportImage, exportImage, exportSVG, exportSVG, exportToImageIcon, fireElementClicked, fireElementDoubleClicked, getBackgroundBounds, getBackgroundFillColor, getBackgroundGradientColor, getBackgroundGradientFactory, getBackgroundOutlineColor, getBackgroundStroke, getChartPane, getColor, getDataBox, getElementAt, getElementClickedActionListeners, getElementDoubleClickedActionListeners, getFormat, getFormat, getFormatedText, getFormatedText, getGradientColor, getGradientColor, getHighlightBackground, getHighlightForeground, getIconHeight, getIconWidth, getItemByIndex, getItemCount, getItems, getLegendElements, getLegendFont, getLegendLabel, getLegendLayout, getLegendOrientation, getLegendPane, getLowerLimit, getMax, getMaxZoom, getMin, getMinZoom, getPopupMenuGenerator, getPublishedElements, getSelectableFilters, getSelectedColor, getSelectedColor, getSelectedOffset, getSelectedStroke, getSelectedStroke, getShadowOffset, getShapeStructAt, getSortComparator, getStroke, getStroke, getTextGap, getTitle, getTitleLabel, getToolTipText, getUnit, getUpperLimit, getValue, getValues, getValueTextColor, getValueTextFont, getValueTextPosition, getVisibleFilters, getXGap, getXTranslate, getXZoom, getYGap, getYTranslate, getYZoom, getZoomIncrement, isAntialias, isBackgroundGradient, isBackgroundVisible, isClearSelectionOnMarginClicked, isEnableDoubleClickToReset, isEnableToolTipText, isEnableXTranslate, isEnableXZoom, isEnableYTranslate, isEnableYZoom, isGradient, isIteratorByHiberarchy, isLazyPublishMode, isLocked, isSelectable, isSelectableOnRightClick, isValueTextCenter, isValueTextVisible, isVisible, lock, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paint, paintBackground, paintComponent, publishData, publishData, removeElementClickedActionListener, removeElementDoubleClickedActionListener, removeItem, removeSelectableFilter, removeVisibleFilter, reset, setAntialias, setBackgroundFillColor, setBackgroundGradient, setBackgroundGradientColor, setBackgroundGradientFactory, setBackgroundOutlineColor, setBackgroundStroke, setBackgroundVisible, setClearSelectionOnMarginClicked, setDataBox, setEnableDoubleClickToReset, setEnableToolTipText, setEnableXTranslate, setEnableXZoom, setEnableYTranslate, setEnableYZoom, setForeground, setFormat, setGradient, setGradientColor, setHighlightBackground, setHighlightForeground, setIconHeight, setIconWidth, setItems, setIteratorByHiberarchy, setLazyPublishMode, setLegendFont, setLegendLayout, setLegendOrientation, setLowerLimit, setMaxZoom, setMinZoom, setPopupMenuGenerator, setSelectableOnRightClick, setSelectedColor, setSelectedOffset, setSelectedStroke, setShadowOffset, setSortComparator, setStroke, setTextGap, setTitle, setTranslate, setUnit, setUpperLimit, setValueTextCenter, setValueTextColor, setValueTextFont, setValueTextPosition, setValueTextVisible, setXGap, setXTranslate, setXZoom, setYGap, setYTranslate, setYZoom, setZoomIncrement, unlock, updateTViewUI, zoomIn, zoomOut
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected boolean xAxisVisible
protected java.awt.Color xAxisFillColor
protected java.awt.Color xAxisOutlineColor
protected java.awt.Font xAxisTextFont
protected java.awt.Color xAxisTextColor
protected java.lang.String xAxisText
protected double xAxisValue
protected java.lang.String xAxisStroke
protected boolean yAxisVisible
protected java.awt.Color yAxisFillColor
protected java.awt.Color yAxisOutlineColor
protected java.awt.Font yAxisTextFont
protected java.awt.Color yAxisTextColor
protected java.lang.String yAxisText
protected java.lang.String yAxisStroke
protected java.lang.String yScaleLineStroke
protected java.awt.Color yScaleLineColor
protected boolean yScaleLineVisible
protected int yScalePixelGap
protected double yScaleValueGap
protected boolean yScaleMinTextVisible
protected boolean yScaleTextVisible
protected boolean yScaleTextInside
protected java.text.NumberFormat yScaleTextFormat
protected java.awt.Color yScaleTextColor
protected java.awt.Font yScaleTextFont
protected java.awt.Font xScaleTextFont
protected java.awt.Color xScaleTextColor
protected boolean xScaleTextVisible
protected int xScaleTextOrientation
protected java.util.List xScaleTextList
protected boolean yScaleValueGapAutoCalculate
protected boolean yscaleAutoCaculateFlag
protected int startIndex
protected int endIndex
protected int valueSpanCount
protected int xScaleTextSpanCount
protected java.util.List markers
public AbstractScaleChart()
AbstractScaleChart
objectpublic AbstractScaleChart(TDataBox box)
AbstractScaleChart
object initialized with an explicit
data box.box
- an explicit data box object.public AbstractScaleChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor)
AbstractScaleChart
object initialized with an explicit
data box,a title and a background color.box
- an explicit data box object.title
- a String
titlebackgroundColor
- a background Color
objectpublic AbstractScaleChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
AbstractScaleChart
object initialized with an explicit
data box,a title , a background color and a foreground color.box
- an explicit data box object.title
- a String
titlebackgroundColor
- a background Color
objectforegroundColor
- a foreground Color
objectpublic AbstractScaleChart(java.util.List items)
AbstractScaleChart
object initialized with an explicit
listitems
- an explicit listpublic AbstractScaleChart(java.util.List items, java.lang.String title)
AbstractScaleChart
object initialized with an explicit
list and a title.items
- an explicit listtitle
- a title textpublic AbstractScaleChart(java.util.List items, java.lang.String title, java.awt.Color backgroundColor)
AbstractScaleChart
object initialized with an explicit
list, a title and a background color.items
- an explicit listtitle
- a String
textbackgroundColor
- a background Color
public AbstractScaleChart(java.util.List items, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
AbstractScaleChart
object initialized with an explicit
list, a title, a background color and a foreground color.items
- an explicit listtitle
- a String
textbackgroundColor
- a background Color
foreroundColor
- a foreground Color
protected double toValidHeight(double height)
protected int getXAxisExtraGap(java.awt.Graphics2D g2d)
g2d
- the Graphics
context in which to paintpublic void paintChart(java.awt.Graphics2D g2d, int width, int height)
paintChart
in class AbstractChart
g
- the Graphics
context in which to paintwidth
- the width of the chart panelheight
- the height of the chart panelprotected java.lang.String getFormatedYScaleText(double value)
value
- the value need to be formatedprotected void paintXAxis(java.awt.Graphics2D g2d, Marker marker, int width, int height, int xTextGap, int yTextGap, double pixelGap, double valueGap)
protected abstract void paintContent(java.awt.Graphics2D g2d, int width, int height, int yAxisTextGap, int xAxisTextGap, int xAxisWidth, int yAxisHeight, int baseLine, double pixelGap, double valueGap)
public java.awt.Color getYScaleLineColor()
public void setYScaleLineColor(java.awt.Color yScaleLineColor)
yScaleLineColor
- a new color for the lines which is in a parallel with x-axis.public java.lang.String getYScaleLineStroke()
public void setYScaleLineStroke(java.lang.String yScaleLineStroke)
yScaleLineStroke
- a new stroke for the scale line which is in a parallel with x-axispublic boolean isYScaleLineVisible()
public void setYScaleLineVisible(boolean yScaleLineVisible)
yScaleLineVisible
- if true the scale line is visible,false otherwisepublic java.awt.Color getYScaleTextColor()
public void setYScaleTextColor(java.awt.Color yScaleTextColor)
yScaleTextColor
- a new color for the scale text which is along y-axispublic java.awt.Font getYScaleTextFont()
public void setYScaleTextFont(java.awt.Font yScaleTextFont)
yScaleTextFont
- a new font for the scale text which is along y-axispublic java.text.NumberFormat getYScaleTextFormat()
public void setYScaleTextFormat(java.text.NumberFormat yScaleTextFormat)
yScaleTextFormat
- a new NumberFormat
public boolean isYScaleTextVisible()
public void setYScaleTextVisible(boolean yScaleTextVisible)
yScaleTextVisible
- if true the scale text which is along y-axis is visible,false otherwisepublic java.awt.Color getXAxisFillColor()
public void setXAxisFillColor(java.awt.Color xAxisFillColor)
xAxisFillColor
- a new fill Color
of the x-axispublic java.awt.Color getXAxisOutlineColor()
public void setXAxisOutlineColor(java.awt.Color xAxisOutlineColor)
xAxisOutlineColor
- a new outline Color
for the x-axispublic java.lang.String getXAxisText()
public void setXAxisText(java.lang.String xAxisText)
xAxisText
- a new text for the x-axis.public java.awt.Color getXAxisTextColor()
public void setXAxisTextColor(java.awt.Color xAxisTextColor)
xAxisTextColor
- a new Color
for the text of the x-axispublic java.awt.Font getXAxisTextFont()
public void setXAxisTextFont(java.awt.Font xAxisTextFont)
xAxisTextFont
- a new Font
for the x-axis textpublic java.awt.Color getYAxisFillColor()
getXAxisFillColor()
public void setYAxisFillColor(java.awt.Color yAxisFillColor)
yAxisFillColor
- a new fill Color
for the y-axissetXAxisFillColor(Color)
public java.awt.Color getYAxisOutlineColor()
public void setYAxisOutlineColor(java.awt.Color yAxisOutlineColor)
yAxisOutlineColor
- a new outline Color
for the y-axispublic java.lang.String getYAxisText()
public void setYAxisText(java.lang.String yAxisText)
yAxisText
- a new Color
for the y-axispublic java.awt.Color getYAxisTextColor()
public void setYAxisTextColor(java.awt.Color yAxisTextColor)
yAxisTextColor
- a new Color
for the y-axis textpublic java.awt.Font getYAxisTextFont()
public void setYAxisTextFont(java.awt.Font axisTextFont)
axisTextFont
- a new Font
for the y-axis textpublic double getYScaleValueGap()
public void setYScaleValueGap(double yScaleValueGap)
yScaleValueGap
- a new gap for the scale value which is along the y-axispublic int getYScalePixelGap()
public void setYScalePixelGap(int yScalePixelGap)
yScalePixelGap
- a new int
gap for the scale along y-axispublic boolean isYScaleMinTextVisible()
public void setYScaleMinTextVisible(boolean yScaleMinTextVisible)
yScaleMinTextVisible
- if true the minimal scale text which is along the y-axis will be visible,false otherwise.public double getXAxisValue()
public void setXAxisValue(double xAxisValue)
xAxisValue
- a newpublic java.util.List getMarkers()
public void setMarkers(java.util.List markers)
markers
- a new List
for the markerspublic void addMarker(double value, java.awt.Color color)
value
- a double
valuecolor
- a Color
objectaddMarker(Marker)
public void removeMarker(Marker marker)
Marker
object from the markersmarker
- a specified Marker
objectpublic void addMarker(Marker marker)
Marker
object to the list of the markers.marker
- a new specified Marker
objectpublic java.lang.String getXAxisStroke()
public void setXAxisStroke(java.lang.String xAxisStroke)
xAxisStroke
- a new stroke for the x-axispublic java.lang.String getYAxisStroke()
public void setYAxisStroke(java.lang.String yAxisStroke)
yAxisStroke
- anew stroke for the y-axis.public boolean getXAxisVisible()
public void setXAxisVisible(boolean xAxisVisible)
xAxisVisible
- if true the x-axis is visible,false otherwise.public boolean getYAxisVisible()
public void setYAxisVisible(boolean yAxisVisible)
yAxisVisible
- if true the y-axis is visible,false otherwise.public boolean isYScaleTextInside()
public void setYScaleTextInside(boolean scaleTextInside)
scaleTextInside
- if true the scale text which is along the y-axis insides the y-axis,false otherwise.public java.awt.Color getXScaleTextColor()
public void setXScaleTextColor(java.awt.Color scaleTextColor)
scaleTextColor
- a new Color
object for the scale text which is along the x-axispublic java.awt.Font getXScaleTextFont()
public void setXScaleTextFont(java.awt.Font scaleTextFont)
scaleTextFont
- a new Color
object for the scale text which is along the x-axis.public int getXScaleTextOrientation()
public void setXScaleTextOrientation(int scaleTextOrientation)
scaleTextOrientation
- a new orientation for the scale text which is along the x-axis.public boolean isXScaleTextVisible()
public void setXScaleTextVisible(boolean scaleTextVisible)
scaleTextVisible
- if true the scale text which is along x-axis should be visible,false otherwise.public java.util.List getXScaleTextList()
public void setXScaleTextList(java.util.List xScaleTextList)
xScaleTextList
- a new List
object for the scale text which is painted along the x-axispublic void addXScaleText(java.lang.String text)
text
- a new specified scale textpublic java.lang.String getXScaleText(int index)
index
- index of the scale text to returnpublic void removeXScaleText(int index)
index
- index of the scale text to removepublic java.lang.String getToolTipText(Element element, double value, int index)
Element
object with a value and a index position.element
- a specified Element
value
- a double
valueindex
- the index of the XScaleTextprotected void calculateValuesProportionsOfRange(boolean relativeMin, int categoryCount)
protected void calculateYScaleValueGap()
protected double getAutoScaleValueGap(double range)
public boolean isYScaleValueGapAutoCalculate()
setYScaleValueGapAutoCalculate(boolean)
public void setYScaleValueGapAutoCalculate(boolean scaleValueGapAutoCaculate)
scaleValueGapAutoCaculate
- if true the value gap of the y axis should be calculated automatically, false otherwise.isYScaleValueGapAutoCalculate()
protected void setChartSVGAttribute(AbstractSVGChart abschart)
setChartSVGAttribute
in class AbstractChart
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.