本文整理汇总了Java中org.jfree.data.general.DatasetUtilities.isEmptyOrNull方法的典型用法代码示例。如果您正苦于以下问题:Java DatasetUtilities.isEmptyOrNull方法的具体用法?Java DatasetUtilities.isEmptyOrNull怎么用?Java DatasetUtilities.isEmptyOrNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.general.DatasetUtilities
的用法示例。
在下文中一共展示了DatasetUtilities.isEmptyOrNull方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws a representation of the data within the dataArea region, using the
* current m_Renderer.
*
* @param g2 the graphics device.
* @param dataArea the region in which the data is to be drawn.
* @param info an optional object for collection dimension
* information (<code>null</code> permitted).
*/
public void render(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info) {
// now get the data and plot it (the visual representation will depend
// on the m_Renderer that has been set)...
if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {
int seriesCount = this.dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
this.renderer.drawSeries(
g2, dataArea, info, this, this.dataset, series
);
}
}
else {
drawNoDataMessage(g2, dataArea);
}
}
示例2: render
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws a representation of the data within the dataArea region, using the
* current m_Renderer.
*
* @param g2 the graphics device.
* @param dataArea the region in which the data is to be drawn.
* @param info an optional object for collection dimension
* information (<code>null</code> permitted).
*/
protected void render(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info) {
// now get the data and plot it (the visual representation will depend
// on the m_Renderer that has been set)...
if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {
int seriesCount = this.dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
this.renderer.drawSeries(g2, dataArea, info, this,
this.dataset, series);
}
}
else {
drawNoDataMessage(g2, dataArea);
}
}
示例3: draw
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws the plot on a Java 2D graphics device (such as the screen or a
* printer).
*
* @param g2 the graphics device.
* @param area the area within which the plot should be drawn.
* @param anchor the anchor point (<code>null</code> permitted).
* @param parentState the state from the parent plot, if there is one.
* @param info collects info about the drawing
* (<code>null</code> permitted).
*/
public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
PlotState parentState, PlotRenderingInfo info) {
// adjust for insets...
RectangleInsets insets = getInsets();
insets.trim(area);
if (info != null) {
info.setPlotArea(area);
info.setDataArea(area);
}
drawBackground(g2, area);
drawOutline(g2, area);
Shape savedClip = g2.getClip();
g2.clip(area);
Composite originalComposite = g2.getComposite();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
getForegroundAlpha()));
if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {
drawPie(g2, area, info);
}
else {
drawNoDataMessage(g2, area);
}
g2.setClip(savedClip);
g2.setComposite(originalComposite);
drawOutline(g2, area);
}
示例4: draw
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws the plot on a Java 2D graphics device (such as the screen or a printer).
*
* @param g2 the graphics device.
* @param plotArea the area within which the plot should be drawn.
* @param parentState the state from the parent plot, if there is one.
* @param info collects info about the drawing (<code>null</code> permitted).
*/
public void draw(Graphics2D g2, Rectangle2D plotArea, PlotState parentState,
PlotRenderingInfo info) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Entering draw() method, plot area = " + plotArea.toString());
}
// adjust for insets...
Insets insets = getInsets();
if (insets != null) {
plotArea.setRect(plotArea.getX() + insets.left,
plotArea.getY() + insets.top,
plotArea.getWidth() - insets.left - insets.right,
plotArea.getHeight() - insets.top - insets.bottom
);
}
if (info != null) {
info.setPlotArea(plotArea);
info.setDataArea(plotArea);
}
drawBackground(g2, plotArea);
drawOutline(g2, plotArea);
Shape savedClip = g2.getClip();
g2.clip(plotArea);
Composite originalComposite = g2.getComposite();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, getForegroundAlpha()));
if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {
drawPie(g2, plotArea, info);
}
else {
drawNoDataMessage(g2, plotArea);
}
g2.setClip(savedClip);
g2.setComposite(originalComposite);
drawOutline(g2, plotArea);
}
示例5: render
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws a representation of a dataset within the dataArea region using the appropriate
* renderer.
*
* @param g2 the graphics device.
* @param dataArea the region in which the data is to be drawn.
* @param index the dataset and renderer index.
* @param info an optional object for collection dimension information.
*
* @return A boolean that indicates whether or not real data was found.
*/
public boolean render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info) {
boolean foundData = false;
CategoryDataset currentDataset = getDataset(index);
CategoryItemRenderer renderer = getRenderer(index);
CategoryAxis domainAxis = getDomainAxisForDataset(index);
ValueAxis rangeAxis = getRangeAxisForDataset(index);
if (!DatasetUtilities.isEmptyOrNull(currentDataset) && renderer != null) {
foundData = true;
CategoryItemRendererState state = renderer.initialise(g2, dataArea, this, index, info);
int columnCount = currentDataset.getColumnCount();
int rowCount = currentDataset.getRowCount();
if (this.columnRenderingOrder == SortOrder.ASCENDING) {
for (int column = 0; column < columnCount; column++) {
if (this.rowRenderingOrder == SortOrder.ASCENDING) {
for (int row = 0; row < rowCount; row++) {
renderer.drawItem(
g2, state, dataArea, this, domainAxis, rangeAxis,
currentDataset, row, column
);
}
}
else {
for (int row = rowCount - 1; row >= 0; row--) {
renderer.drawItem(
g2, state, dataArea, this, domainAxis, rangeAxis,
currentDataset, row, column
);
}
}
}
}
else {
for (int column = columnCount - 1; column >= 0; column--) {
if (this.rowRenderingOrder == SortOrder.ASCENDING) {
for (int row = 0; row < rowCount; row++) {
renderer.drawItem(
g2, state, dataArea, this, domainAxis, rangeAxis,
currentDataset, row, column
);
}
}
else {
for (int row = rowCount - 1; row >= 0; row--) {
renderer.drawItem(
g2, state, dataArea, this, domainAxis, rangeAxis,
currentDataset, row, column
);
}
}
}
}
}
return foundData;
}
示例6: render
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Draws a representation of a dataset within the dataArea region using the
* appropriate renderer.
*
* @param g2 the graphics device.
* @param dataArea the region in which the data is to be drawn.
* @param index the dataset and renderer index.
* @param info an optional object for collection dimension information.
*
* @return A boolean that indicates whether or not real data was found.
*/
public boolean render(Graphics2D g2, Rectangle2D dataArea, int index,
PlotRenderingInfo info) {
boolean foundData = false;
CategoryDataset currentDataset = getDataset(index);
CategoryItemRenderer renderer = getRenderer(index);
CategoryAxis domainAxis = getDomainAxisForDataset(index);
ValueAxis rangeAxis = getRangeAxisForDataset(index);
boolean hasData = !DatasetUtilities.isEmptyOrNull(currentDataset);
if (hasData && renderer != null) {
foundData = true;
CategoryItemRendererState state = renderer.initialise(g2, dataArea,
this, index, info);
int columnCount = currentDataset.getColumnCount();
int rowCount = currentDataset.getRowCount();
int passCount = renderer.getPassCount();
for (int pass = 0; pass < passCount; pass++) {
if (this.columnRenderingOrder == SortOrder.ASCENDING) {
for (int column = 0; column < columnCount; column++) {
if (this.rowRenderingOrder == SortOrder.ASCENDING) {
for (int row = 0; row < rowCount; row++) {
renderer.drawItem(g2, state, dataArea, this,
domainAxis, rangeAxis, currentDataset,
row, column, pass);
}
}
else {
for (int row = rowCount - 1; row >= 0; row--) {
renderer.drawItem(g2, state, dataArea, this,
domainAxis, rangeAxis, currentDataset,
row, column, pass);
}
}
}
}
else {
for (int column = columnCount - 1; column >= 0; column--) {
if (this.rowRenderingOrder == SortOrder.ASCENDING) {
for (int row = 0; row < rowCount; row++) {
renderer.drawItem(g2, state, dataArea, this,
domainAxis, rangeAxis, currentDataset,
row, column, pass);
}
}
else {
for (int row = rowCount - 1; row >= 0; row--) {
renderer.drawItem(g2, state, dataArea, this,
domainAxis, rangeAxis, currentDataset,
row, column, pass);
}
}
}
}
}
}
return foundData;
}