public class BarChart extends AbstractScaleChart
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
endIndex, markers, startIndex, valueSpanCount, xAxisFillColor, xAxisOutlineColor, xAxisStroke, xAxisText, xAxisTextColor, xAxisTextFont, xAxisValue, xAxisVisible, xScaleTextColor, xScaleTextFont, xScaleTextList, xScaleTextOrientation, xScaleTextSpanCount, xScaleTextVisible, yAxisFillColor, yAxisOutlineColor, yAxisStroke, yAxisText, yAxisTextColor, yAxisTextFont, yAxisVisible, yscaleAutoCaculateFlag, yScaleLineColor, yScaleLineStroke, yScaleLineVisible, yScaleMinTextVisible, yScalePixelGap, yScaleTextColor, yScaleTextFont, yScaleTextFormat, yScaleTextInside, yScaleTextVisible, yScaleValueGap, 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 |
---|
BarChart()
Creates a new
BarChart object. |
BarChart(java.util.List items)
Creates a new
BarChart object initialized with a List |
BarChart(java.util.List items,
java.lang.String title)
Creates a new
BarChart object initialized with a List and a title text. |
BarChart(java.util.List items,
java.lang.String title,
java.awt.Color backgroundColor)
Creates a new
BarChart object initialized with a List ,a title text and a background color. |
BarChart(java.util.List items,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Creates a
BarChart object initialized with an explicit
data box,a title text, a background color and a foreground color. |
BarChart(TDataBox box)
Creates a
BarChart object initialized with an explicit
data box. |
BarChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor)
Creates a
BarChart object initialized with an explicit
data box,a title text and a background color. |
BarChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Creates a
BarChart object initialized with an explicit
data box,a title text, a background color and a foreground color. |
Modifier and Type | Method and Description |
---|---|
protected void |
calculate()
An abstract method that will be called when this chart is publishing data,
The subclass overrides this method to calculate some values.
|
protected void |
calculatePercentValuesProportionsOfRange(int categoryCount) |
void |
exportSVG(java.lang.String fileName,
int width,
int height) |
int |
getBarType()
Gets the type of the bar chart.
|
int |
getBundleSize()
Gets the size of the bundle.
|
PaintSelectionStateFilter |
getPaintSelectionStateFilter() |
protected java.lang.String |
getPercentFormatedText(Element element,
double value,
int index,
double percent) |
int |
getPillarWidth()
Gets the width of the pillar.
|
protected int |
getXAxisExtraGap(java.awt.Graphics2D g2d)
Gets the gap distance from the x-axis
|
protected void |
init()
Initializes the bar chart.
|
boolean |
isPercentTypeValueVisible()
Gets whether the value in percent type is visible.
|
protected void |
paintContent(java.awt.Graphics2D g2d,
int width,
int height,
int yAxisTextGap,
int xAxisTextGap,
int xAxisWidth,
int yAxisHeight,
int baseLine,
double pixelGap,
double valueGap)
Paints the chart content
|
void |
setBarType(int barType)
Sets a new type for the bar chart.
|
void |
setBundleSize(int bundleSize)
Sets the size of the bundle.
|
void |
setChartSVGAttribute(AbstractSVGChart abschart) |
void |
setPaintSelectionStateFilter(PaintSelectionStateFilter paintSelectionStateFilter) |
void |
setPercentTypeValueVisible(boolean percentTypeValueVisible)
Sets whether the value in percent type should be visible.
|
void |
setPillarWidth(int pillarWidth)
Sets the width of the pillar.
|
addMarker, addMarker, addXScaleText, calculateValuesProportionsOfRange, calculateYScaleValueGap, getAutoScaleValueGap, getFormatedYScaleText, getMarkers, getToolTipText, getXAxisFillColor, getXAxisOutlineColor, getXAxisStroke, getXAxisText, getXAxisTextColor, getXAxisTextFont, getXAxisValue, getXAxisVisible, getXScaleText, getXScaleTextColor, getXScaleTextFont, getXScaleTextList, getXScaleTextOrientation, getYAxisFillColor, getYAxisOutlineColor, getYAxisStroke, getYAxisText, getYAxisTextColor, getYAxisTextFont, getYAxisVisible, getYScaleLineColor, getYScaleLineStroke, getYScalePixelGap, getYScaleTextColor, getYScaleTextFont, getYScaleTextFormat, getYScaleValueGap, isXScaleTextVisible, isYScaleLineVisible, isYScaleMinTextVisible, isYScaleTextInside, isYScaleTextVisible, isYScaleValueGapAutoCalculate, paintChart, paintXAxis, removeMarker, removeXScaleText, setMarkers, setXAxisFillColor, setXAxisOutlineColor, setXAxisStroke, setXAxisText, setXAxisTextColor, setXAxisTextFont, setXAxisValue, setXAxisVisible, setXScaleTextColor, setXScaleTextFont, setXScaleTextList, setXScaleTextOrientation, setXScaleTextVisible, setYAxisFillColor, setYAxisOutlineColor, setYAxisStroke, setYAxisText, setYAxisTextColor, setYAxisTextFont, setYAxisVisible, setYScaleLineColor, setYScaleLineStroke, setYScaleLineVisible, setYScaleMinTextVisible, setYScalePixelGap, setYScaleTextColor, setYScaleTextFont, setYScaleTextFormat, setYScaleTextInside, setYScaleTextVisible, setYScaleValueGap, setYScaleValueGapAutoCalculate, toValidHeight
addElementClickedActionListener, addElementDoubleClickedActionListener, addItem, addSelectableFilter, addVisibleFilter, cleanDirtyState, clearItems, clearSelectableFilters, exportImage, exportImage, 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
public BarChart()
BarChart
object.public BarChart(TDataBox box)
BarChart
object initialized with an explicit
data box. The data box could not be null value, which'll cause throw a exception.box
- an explicit data box object.public BarChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor)
BarChart
object initialized with an explicit
data box,a title text and a background color.
The data box could not be null value, which'll cause throw a exception.box
- an explicit data box object.title
- a String
textbackgroundColor
- a background Color
public BarChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
BarChart
object initialized with an explicit
data box,a title text, a background color and a foreground color.
The data box could not be null value, which'll cause throw a exception.box
- an explicit data box object.title
- a String
textbackgroundColor
- a background Color
foregroundColor
- a foreground Color
public BarChart(java.util.List items)
BarChart
object initialized with a List
items
- a list which contains Item
type datapublic BarChart(java.util.List items, java.lang.String title)
BarChart
object initialized with a List
and a title text.items
- a list which contains Item
type datatitle
- a String
textpublic BarChart(java.util.List items, java.lang.String title, java.awt.Color backgroundColor)
BarChart
object initialized with a List
,a title text and a background color.items
- a list which contains Item
type datatitle
- a String
textbackgroundColor
- a background Color
public BarChart(java.util.List items, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
BarChart
object initialized with an explicit
data box,a title text, a background color and a foreground color.
The data box could not be null value, which'll cause throw a exception.items
- a list which contains Item
type datatitle
- a String
textbackgroundColor
- a background Color
foregroundColor
- a foreground Color
protected void init()
protected void calculate()
AbstractChart
calculate
in class AbstractChart
protected void calculatePercentValuesProportionsOfRange(int categoryCount)
protected int getXAxisExtraGap(java.awt.Graphics2D g2d)
AbstractScaleChart
getXAxisExtraGap
in class AbstractScaleChart
g2d
- the Graphics
context in which to paintprotected void paintContent(java.awt.Graphics2D g2d, int width, int height, int yAxisTextGap, int xAxisTextGap, int xAxisWidth, int yAxisHeight, int baseLine, double pixelGap, double valueGap)
paintContent
in class AbstractScaleChart
protected java.lang.String getPercentFormatedText(Element element, double value, int index, double percent)
public int getBarType()
public void setBarType(int barType)
barType
- a new type for the bar chart.public int getBundleSize()
setBundleSize(int)
public int getPillarWidth()
setBundleSize(int)
public void setPillarWidth(int pillarWidth)
pillarWidth
- the width of the pillar.getPillarWidth()
public void setBundleSize(int bundleSize)
bundleSize
- the size of the bundle.getBundleSize()
public boolean isPercentTypeValueVisible()
setPercentTypeValueVisible(boolean)
public void setPercentTypeValueVisible(boolean percentTypeValueVisible)
percentTypeValueVisible
- if true the value in percent type should be visible, false otherwise.isPercentTypeValueVisible()
public PaintSelectionStateFilter getPaintSelectionStateFilter()
public void setPaintSelectionStateFilter(PaintSelectionStateFilter paintSelectionStateFilter)
public void setChartSVGAttribute(AbstractSVGChart abschart)
setChartSVGAttribute
in class AbstractScaleChart
public void exportSVG(java.lang.String fileName, int width, int height)
exportSVG
in class AbstractChart
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.