原創|使用教程|編輯:郝浩|2013-05-29 11:34:05.000|閱讀 2262 次
概述:應用甘特圖控件盡快建立一個甘特圖,需要做一些基本設置。本文介紹JAVA甘特圖控件FlexGantt在程序里的基本設置。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
應用甘特圖控件盡快建立一個甘特圖,需要做一些基本設置。本文介紹JAVA甘特圖控件FlexGantt在程序里的基本設置。
上述所有步驟結合起來放在main()方法里,如下面小程序:
/**
* Copyright 2006 - 2008
* Dirk Lemmermann Software & Consulting
* //www.dlsc.com
*/
package com.dlsc.flexgantt.examples.jumpstart;
import javax.swing.JFrame;
Page 3 FlexGantt - Getting Startedimport com.dlsc.flexgantt.swing.GanttChart;
import com.dlsc.flexgantt.swing.GanttChartFrame;
/**
* One of the steps used for the 'Jumpstart' tutorial. The step will create a
* basic Gantt chart. The chart will be populated with a default model and a
* single default node, which displays a default value as its key.
*
* @author Dirk Lemmermann
*/
public class Step1_Basic_Setup {
/**
* The example‘s main method.
*/
public static void main(String[] args) {
/*
* Create a basic Gantt chart, which will use the default Gantt chart
* model. The default model itself will use the default Gantt chart node
* as a root object.
*/
GanttChart gc = new GanttChart();
/*
* Add the Gantt chart to a specialized frame class. The frame will
* automatically add a status bar and a glass pane (used for updating
* the cursor when commands get executed).
*/
GanttChartFrame<GanttChart> frame = new GanttChartFrame<GanttChart>("Step 1", gc);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
/*
* Show the frame. The split panel inside the Gantt chart will adjust to
* the preferred size of the left-hand side (the tree table).
*/
frame.setVisible(true);
}
}
基本設置后的教程應用程序
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@ke049m.cn
文章轉載自:慧都控件網