|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--net.sourceforge.chart2d.Chart2D
|
+--net.sourceforge.chart2d.PieChart2D
One of Chart2D's three general chart types. An PieChart2D is a pie chart PieChart2D extends Chart2D with extends JComponent. It can be added to a content pane or it can be used to return a BufferedImage of a chart. Use setMaximumSize to specify the maximum preferred size of the chart. Use setMinimumSize to specify the minimum preferred size of the chart. Use setPreferredSize to specify a preferred size of the chart; otherwise a preferred size will be calculated for the chart. The preferred size is the size at which all the chart's components are at their "model size" (i.e. no magnification at this size). So, if you have multiple charts in your GUI, and you want them to all have similar magnification ratios, then you should set all the charts to a common custom preferred size.
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.ActionStandin, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardState |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
| Field Summary | |
static java.awt.Dimension |
MAX_SIZE_DEFAULT
The default is Dimension (1024, 768). |
static java.awt.Dimension |
MIN_SIZE_DEFAULT
The default is Dimension (250, 150). |
| Fields inherited from class javax.swing.JComponent |
_bounds, accessibleContext, listenerList, paintingChild, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents |
| Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PieChart2D()
Creates a default PieChart2D object with a default PieChart2DProperties object. |
|
PieChart2D(PieChart2DProperties pieChart2DProps)
Creates a default PieChart2D object with the given PieChart2DProperties object. |
|
| Method Summary | |
(package private) ChartArea |
getChartArea()
Returns the ChartArea of this PieChart2D. |
java.awt.image.BufferedImage |
getImage()
Returns a buffered image of the chart. |
PieChart2DProperties |
getPieChart2DProperties()
Returns the PieChart2DProperties of this chart. |
(package private) PieChartArea |
getPieChartArea()
Returns the PieChartArea of this PieChart2D. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of the chart. |
void |
pack()
Causes the chart to set itself to its preferred size. |
void |
paintComponent(java.awt.Graphics g)
Paints the chart. |
void |
setPieChart2DProperties(PieChart2DProperties pieChart2DProps)
Specifies the new PieChart2DProperties for the chart. |
void |
setPreferredSize(java.awt.Dimension size)
Specifies a custom preferred size for the chart. |
| Methods inherited from class javax.swing.JComponent |
_paintImmediately, |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static java.awt.Dimension MAX_SIZE_DEFAULT
public static java.awt.Dimension MIN_SIZE_DEFAULT
| Constructor Detail |
public PieChart2D()
public PieChart2D(PieChart2DProperties pieChart2DProps)
pieChart2DProps - The PieChart2DProperties for this chart.| Method Detail |
public void setPreferredSize(java.awt.Dimension size)
setPreferredSize in class Chart2Dsize - The custom preferred size for this chart.public void setPieChart2DProperties(PieChart2DProperties pieChart2DProps)
pieChart2DProps - The new PieChart2DProperties.public PieChart2DProperties getPieChart2DProperties()
public java.awt.image.BufferedImage getImage()
getImage in class Chart2Dpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class Chart2Dpublic void pack()
pack in class Chart2Dpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentg - The graphics context for calculations and painting.ChartArea getChartArea()
getChartArea in class Chart2DPieChartArea getPieChartArea()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||