本文整理匯總了Java中org.jfree.ui.RefineryUtilities.centerFrameOnScreen方法的典型用法代碼示例。如果您正苦於以下問題:Java RefineryUtilities.centerFrameOnScreen方法的具體用法?Java RefineryUtilities.centerFrameOnScreen怎麽用?Java RefineryUtilities.centerFrameOnScreen使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.ui.RefineryUtilities
的用法示例。
在下文中一共展示了RefineryUtilities.centerFrameOnScreen方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Starting point for the demonstration application.
*
* @param args ignored.
*/
public static void main(String[] args) {
// ******************************************************************
// More than 150 demo applications are included with the JFreeChart
// Developer Guide...for more information, see:
//
// > http://www.object-refinery.com/jfreechart/guide.html
//
// ******************************************************************
PieChartDemo1 demo = new PieChartDemo1("Pie Chart Demo 1");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
}
示例2: displayChart
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Displays a chart in a frame.
* @param chart the chart to be displayed
*/
private static void displayChart(JFreeChart chart) {
// Chart panel
ChartPanel panel = new ChartPanel(chart);
panel.setFillZoomRectangle(true);
panel.setMouseWheelEnabled(true);
panel.setPreferredSize(new Dimension(1024, 400));
// Application frame
ApplicationFrame frame = new ApplicationFrame("Ta4j example - Cash flow to chart");
frame.setContentPane(panel);
frame.pack();
RefineryUtilities.centerFrameOnScreen(frame);
frame.setVisible(true);
}
示例3: main
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Starting point for the demonstration application.
*
* @param args ignored.
*/
public static void main(String[] args) {
// ******************************************************************
// More than 150 demo applications are included with the JFreeChart
// Developer Guide...for more information, see:
//
// > http://www.object-refinery.com/jfreechart/guide.html
//
// ******************************************************************
PieChartDemo1 demo = new PieChartDemo1("JFreeChart: Pie Chart Demo 1");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
}
示例4: TimeandCostGraph
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public TimeandCostGraph(String title, int one, int two) {
super(title);
XYDataset dataset = null;
try {
dataset = createDataset();
} catch (Exception e) {
System.out.println("MultiLineChart -- Constructor" + e);
}
final JFreeChart chart = createChart(dataset);
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(700, 470));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
}
開發者ID:cyberheartmi9,項目名稱:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代碼行數:19,代碼來源:TimeandCostGraph.java
示例5: visualizarSerieChartAsignRescateVict
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public void visualizarSerieChartAsignRescateVict(Color color,CategoryDataset dataset) {
ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
chartNotifAsigResc.setBackgroundPaint(Color.white);
CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
plot.setBackgroundPaint(color);
plot.setDataset(dataset);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
}
示例6: showScheduleAndWait
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static void showScheduleAndWait(
List<Schedule> schedules,
EnumMap<AncillaryCommodity,PriceSignal> ps,
EnumMap<AncillaryCommodity,PowerLimitSignal> pls,
long currentTime) {
final Object sync = new Object();
ScheduleDrawer demo = new ScheduleDrawer(schedules, ps, pls, currentTime);
JFrame frame = new JFrame("Schedule");
frame.setContentPane(demo);
frame.pack();
RefineryUtilities.centerFrameOnScreen(frame);
frame.setVisible(true);
synchronized (sync) {
try {
sync.wait();
} catch (InterruptedException e) {}
}
frame.dispose();
}
示例7: main
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Starting point for the demonstration application.
*
* @param args
*/
public static void main(final String[] args) {
ScatterPlotter sp = new ScatterPlotter("");
if(sp.getScatterPlot().isBatch()){
sp.pack();
RefineryUtilities.centerFrameOnScreen(sp);
sp.setVisible(false);
//try {
// scatter.saveSVG(new File("out.svg"), 500, 500);
//} catch (IOException e) {
// e.printStackTrace();
//}
}else{
sp.pack();
RefineryUtilities.centerFrameOnScreen(sp);
sp.setVisible(true);
}
}
示例8: main
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Starting point for the demonstration application.
*
* @param args ignored.
*/
public static void main(String[] args) {
// ******************************************************************
// More than 150 demo applications are included with the JFreeChart
// Developer Guide...for more information, see:
//
// > http://www.object-refinery.com/jfreechart/guide.html
//
// ******************************************************************
PieChartDemo1 demo = new PieChartDemo1("Pie Chart Demo 1");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
}
示例9: editQualityDimension
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static void editQualityDimension(QualityDimension qd) {
DialogFactory dialog = new DialogFactory(null,true);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
//dialog.setBounds(350, 350, 200, 200);
dialog.setTitle("Edit Quality Dimension data ...");
dialog.jValue.setEditable(true);
dialog.jValue.setEnabled(true);
dialog.jName.setText(qd.getName());
dialog.jValue.setText(qd.getValue().toString());
RefineryUtilities.centerFrameOnScreen(dialog);
dialog.setVisible(true);
dialog.dispose();
if (dialog.ok == true) {
qd.setName(dialog.jName.getText());
qd.setValue(dialog.jValue.getText());
}
}
示例10: execute
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Execute.
*/
public void execute() {
IntervalXYDataset dataset = createDataset();
JFreeChart chart = createChart(dataset);
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
exportFigure(chart);
//this.setVisible(true);
}
示例11: init
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
/**
* Inits the.
*
* @param values the values
* @param values_des the values_des
* @param dates the dates
* @param save the save
* @param show the show
*/
private void init(double[] values, String values_des, List<Date> dates, boolean save, boolean show) {
this.values1 = values;
this.values1_des = values_des;
this.dates = dates;
ChartPanel chartPanel = (ChartPanel) createDemoPanel();
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
if(show) {
this.setVisible(true);
}
}
示例12: main
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static void main(String[] args) throws IOException, InterruptedException, WriteException {
//Paramètres
SimulationParameters simulationParameters = new SimulationParameters();
RefineryUtilities.centerFrameOnScreen(simulationParameters);
simulationParameters.setVisible(true);
while (simulationParametersComplete == false) {
sleep(1);
// Get user selected time and file to open
if (hDep == null || resultFile == null) {
simulationParametersComplete = false;
} else {
simulationParametersComplete = true;
}
}
//App Controller
AppController ac = new AppController(hDep, resultFile);
//Lancement des threads
ac.launch();
}
示例13: getAbstractObject
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static AbstractObject getAbstractObject() {
DialogFactory dialog = new DialogFactory(null,true);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
//dialog.setBounds(350, 350, 200, 200);
dialog.setTitle("Enter Abstract Object data ...");
dialog.jValue.setEditable(false);
dialog.jValue.setEnabled(false);
RefineryUtilities.centerFrameOnScreen(dialog);
dialog.setVisible(true);
dialog.dispose();
if (dialog.ok == true) {
AbstractObject output = new AbstractObject(dialog.jName.getText());
return(output);
}
else return(null);
}
示例14: getProperty
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static Property getProperty() {
DialogFactory dialog = new DialogFactory(null,true);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
//dialog.setBounds(350, 350, 200, 200);
dialog.setTitle("Enter Property data ...");
dialog.jValue.setEditable(false);
dialog.jValue.setEnabled(false);
RefineryUtilities.centerFrameOnScreen(dialog);
dialog.setVisible(true);
dialog.dispose();
if (dialog.ok == true) {
Property output = new Property(dialog.jName.getText());
return(output);
}
else return(null);
}
示例15: getQualityDimension
import org.jfree.ui.RefineryUtilities; //導入方法依賴的package包/類
public static QualityDimension getQualityDimension() {
DialogFactory dialog = new DialogFactory(null,true);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
//dialog.setBounds(350, 350, 200, 200);
dialog.setTitle("Enter Quality Dimension data ...");
dialog.jValue.setEditable(true);
dialog.jValue.setEnabled(true);
RefineryUtilities.centerFrameOnScreen(dialog);
dialog.setVisible(true);
dialog.dispose();
if (dialog.ok == true) {
QualityDimension output = new QualityDimension(dialog.jName.getText(),dialog.jValue.getText());
return(output);
}
else return(null);
}