|
Chart Builder API (beta) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--oracle.ord.media.chart.Chart
The Chart
class is the top-level Chart Builder class.
This class provides methods for defining titles, subtitles, footnotes, and legends.
The class also provides methods for defining the background areas of the chart.
Titles, subtitles and footnotes are implemented as
subclasses of Chart
, and get
functions are provided to return
instances of each subclass. The corresponding get
functions are
getTitle(), getSubtitle()
and getFootnote()
.
For example, the following calls set the title string to "My Title",
and alter the title font:
getTitle().setText("My Title");
getTitle().setFont(new java.awt.Font("Times", Font.BOLD, 12);
Similarly, the subtitle text could be set with:
getSubtitle().setText("My Subtitle");
Note that a title will not be displayed unless the user supplies
a title string with the getTitle().setText()
routine.
The same holds true for subtitles and footnotes.
Note that titles, subtitles, and footnotes are each instances of the
ChartLabel
class, and thus the methods and properties
of subtitle and footnote properties mirror those of titles.
The Chart
class also provides methods for setting background colors:
setBackground()
setRenderingHintsChart()
method.
The default anti-aliasing mode for AxisChart
and PieChart
objects are:
AxisChart
PieChart
Chart.ChartLabel
,
AxisChart
,
PieChart
, Serialized FormInner Class Summary | |
class |
Chart.ChartLabel
The ChartLabel class supports writing text labels in the Chart. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Chart()
|
Method Summary | |
java.awt.Color |
getBackground()
Get the background color. |
int |
getBorderBottom()
Return the width of the bottom border. |
int |
getBorderLeft()
Return the width of the left border. |
int |
getBorderRight()
Return width of the right border. |
int |
getBorderTop()
Return the width of the top border. |
java.awt.Color |
getEdgeColor()
Get the color of the outer border of the chart. |
Chart.ChartLabel |
getFootnote()
Return an instance of the ChartLabel class. |
int |
getHeight()
Return the height of the chart. |
java.awt.Dimension |
getMinimumSize()
Return the minimum size of the chart. |
java.awt.Dimension |
getPreferredSize()
Return the preferred size of the chart. |
java.awt.RenderingHints |
getRenderingHintsChart()
Return the rendering hints used for the chart's buffered image. |
java.awt.Dimension |
getSize()
Return the size of the chart. |
Chart.ChartLabel |
getSubtitle()
Return an instance of the subtitle class. |
Chart.ChartLabel |
getTitle()
Return an instance of the ChartLabel class. |
static java.lang.String |
getVersion()
Get the version of Chart Builder. |
int |
getWidth()
Return the width of the chart. |
boolean |
isSetRenderingHintsChart()
Return true if setRenderingHints() has been called. |
void |
setBackground(java.awt.Color c)
Set the background color. |
void |
setBorderBottom(int bottom)
Set the height of the bottom border. |
void |
setBorderLeft(int left)
Set the width of the left border. |
void |
setBorderRight(int right)
Set the width of the right border. |
void |
setBorderTop(int top)
Set the height of the top border. |
void |
setEdgeColor(java.awt.Color c)
Set the color of the outer border of the chart. |
void |
setRenderingHintsChart(java.awt.RenderingHints hints)
Set the rendering hints for the chart's entire buffered image. |
void |
setTitlesForeground(java.awt.Color c)
Set the foreground color for the title, subtitle, and footnotes. |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAccessibleContext, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Chart()
Method Detail |
public void setRenderingHintsChart(java.awt.RenderingHints hints)
AxisChart.setRenderingHintsLine(RenderingHints)
public java.awt.RenderingHints getRenderingHintsChart()
public boolean isSetRenderingHintsChart()
setRenderingHints()
has been called.public static java.lang.String getVersion()
public Chart.ChartLabel getTitle()
public Chart.ChartLabel getFootnote()
public Chart.ChartLabel getSubtitle()
public int getHeight()
getHeight
in class java.awt.Component
public int getWidth()
getWidth
in class java.awt.Component
public java.awt.Dimension getSize()
getSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public void setEdgeColor(java.awt.Color c)
public java.awt.Color getEdgeColor()
public java.awt.Color getBackground()
getBackground
in class java.awt.Component
public void setBackground(java.awt.Color c)
setBackground
in class java.awt.Component
public void setTitlesForeground(java.awt.Color c)
public void setBorderLeft(int left)
left
- The width of the left border.
left
must be greater than or equal to 0.
For axis charts having labels on the left, the left border
is automatically derived based on the attributes of the Y-axis labels.
Normally, one uses setBorderLeft()
for pie charts
or for axis charts that do not have Y-axis labels on the left.
public void setBorderRight(int right)
right
- The width of the right border.
right
must be greater than or equal to 0.
Normally, one uses setBorderLeft()
for pie charts
or for axis charts that do not have Y-axis labels on the right.
For axis charts having labels on the right, the right border
is automatically derived based on the attributes of the Y-axis
labels.
public void setBorderTop(int top)
top
- The height of the top border.
top
must be greater than or equal to 0.
Normally, one does not call setBorderTop()
for charts having titles and/or subtitles.
Charts having titles and/or subtitles will have their borders
generated automatically, based on the height of the fonts used for the
title and/or subtitles.
public void setBorderBottom(int bottom)
Set
- The height of the bottom border.
bottom
must be greater than or equal to 0.
Normally, one only uses setBorderBottom()
for pie charts,
not for axis charts.
For axis charts, the dimensions of the bottom border are derived
automatically.
public int getBorderLeft()
public int getBorderRight()
public int getBorderTop()
public int getBorderBottom()
|
Chart Builder API (beta) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |