List of usage examples for org.jfree.chart.title DateTitle DateTitle
public DateTitle()
From source file:org.martus.client.swingui.actions.ActionMenuCharts.java
private void runChart(ChartAnswers answers) { try {//from www .j av a 2s . c om SearchTreeNode searchTree = getMainWindow().askUserForSearchCriteria(); if (searchTree == null) return; MiniFieldSpec fieldToCount = answers.getFieldToCount(); MiniFieldSpec[] extraSpecs = new MiniFieldSpec[] { fieldToCount }; SortableBulletinList sortableList = doSearch(searchTree, extraSpecs, new MiniFieldSpec[] {}, "ReportSearchProgress"); if (sortableList == null) return; HashMap<String, Integer> counts = extractBulletinCounts(fieldToCount, sortableList); // TODO: Use or delete these // ChartRenderingInfo info = new ChartRenderingInfo(); // EntityCollection entities = new StandardEntityCollection(); // JFreeChart bar3dChart = create3DBarChart(counts, labelText); JFreeChart chart = createChart(answers, fieldToCount, counts); chart.removeSubtitle(new DateTitle()); UiChartPreviewDlg preview = new UiChartPreviewDlg(getMainWindow(), chart); preview.setVisible(true); if (preview.wasCancelButtonPressed()) return; boolean sendToDisk = preview.wantsPrintToDisk(); boolean didPrint = false; if (sendToDisk) didPrint = printToDisk(chart); else didPrint = printToPrinter(chart); if (didPrint) mainWindow.notifyDlg("ChartCompleted"); } catch (Exception e) { MartusLogger.logException(e); getMainWindow().notifyDlg("ChartUnknownError"); } }