Time of Update: 2018-12-05
/** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Display display = Display.getDefault(); Shell shell = new Shell(display); shell.setSize(200, 200); shell.setLayout(new FillLayout(SWT.HORIZONTAL))
Time of Update: 2018-12-05
// TODO Auto-generated method stub //建立一個面板類 //Composite composite = new Composite(shell, SWT.NONE); //面板類的樣式 // SWT.NONE 沒有邊框 // SWT.BORDER 沒有邊框的面板 // SWT.NO_RADIO_GROUP 對選項按鈕 //面板類的常用方法 //獲得面板中所有控制項的方法 Control[]
Time of Update: 2018-12-05
public static void showCheckButton(Shell shell) { //獲得多選框是否選中,通常是放在數組中,利用迴圈判斷是否被選中 //這是第一組選項按鈕 Group group1 = new Group(shell, SWT.SHADOW_ETCHED_OUT); group1.setLayout(new FillLayout(SWT.VERTICAL)); group1.setText("這是一組樣式"); Button bt1 =
Time of Update: 2018-12-05
// TODO Auto-generated method stub Display display = Display.getDefault(); Shell shell = new Shell(display); shell.setLayout(new FillLayout(SWT.VERTICAL)); //建立TabFolder對象 //一個選項卡檔案夾(TabFolder)由一個或多個選項(TabItem)組成 //
Time of Update: 2018-12-05
public static void sample(Shell shell) { //定義Shell的布局 RowLayout layout = new RowLayout(SWT.VERTICAL); layout.marginWidth = 0; shell.setLayout(layout); final Group group = new Group(shell, SWT.SHADOW_ETCHED_OUT); group.setLayout(new
Time of Update: 2018-12-05
public static void showCTabFolder(Shell shell) { //建立CTabFolder對象 final CTabFolder tabFolder = new CTabFolder(shell, SWT.TOP); //建立帶有關閉按鈕的選項卡 //final CTabFolder tabFolder = new CTabFolder(shell, SWT.CLOSE); //帶有邊框的選項卡 //final CTabFolder
Time of Update: 2018-12-05
//建立FormLayout對象 FormLayout formLayout = new FormLayout(); formLayout.marginHeight = 5; //設定上下補白為5像素 formLayout.marginWidth = 5; //設定左右補白為5像素 shell.setLayout(formLayout); Button bt1 = new Button(shell,
Time of Update: 2018-12-05
shell.setLayout(new GridLayout()); //建立放置文字框的面板 final Composite parent = new Composite(shell, SWT.NONE); //設定面板的布局資料 parent.setLayoutData(new GridData(GridData.FILL_BOTH)); //建立堆棧式布局 final StackLayout layout = new
Time of Update: 2018-12-05
public static void showSashForm(Shell shell) { //建立窗框對象,設定樣式為水平排列 SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.BORDER); //平滑外觀 //SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.SMOOTH); //垂直放置 //SashForm form = new
Time of Update: 2018-12-05
public static void showCBanner(Shell shell) { //建立CBanner對象 CBanner banner = new CBanner(shell, SWT.BORDER); banner.setLayout(new FillLayout()); //建立3個面板,分別放置到左側,右側和下部 Composite left = new Composite(banner, SWT.NONE); left.setLayout(new
Time of Update: 2018-12-05
public static void showScrolled(Shell shell) { // 建立一個滾動面板對象 final ScrolledComposite sc = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); //建立一個普通面板 final Composite c = new Composite(sc, SWT.NONE); GridLayout layout =
Time of Update: 2018-12-05
出現這個異常,大多是因為我們在HQL和SQL語句的使用上造成混淆。因為Hibernate使用的是hql文法,而sql文法和它是有區別的。當然了,加入表的欄位和映射成hbm.xml檔案中屬性欄位一樣的話,就很少發生這樣的情況。比如:ID是表的欄位,那麼在hbm.xml檔案中也是ID,做檢索的時候就不能發生問題了。但是,加入我的表的欄位是Person_Name,那麼在hbm.xml檔案中可能就是personName,那麼大家在使用欄位的時候就的注意,否則就會出現org.hibernate.Query
Time of Update: 2018-12-05
public static void showArrowButton(Shell shell) { //箭頭按鈕是帶有小箭頭的按鈕,建立時還要指定箭頭的方向 //SWT.UP, SWT.DOWN, SWT.LEFT, SWT.RIGHT //若不指定方向,預設為SWT.UP Button bt1 = new Button(shell, SWT.ARROW | SWT.UP); bt1.setToolTipText("SWT.LEFT"); Button bt2 = new
Time of Update: 2018-12-05
public static void showText(Shell shell) { final Text content = new Text(shell, SWT.WRAP | SWT.V_SCROLL); content.setBounds(5, 5, 325, 200); Button selectAll = new Button(shell, SWT.NONE); selectAll.setText("全選"); selectAll.setBounds(5, 225, 75,
Time of Update: 2018-12-05
public static void showFillStyle(Shell shell) { // 兩種定位方式 // 絕對位置 // button.setBounds(30, 20, 100, 50); // 託管定位 // shell.setLayout(Layout layout); // 常見的布局管理器 // FillLayout(充滿式布局) // RowLayout(行列式布局) // GridLayout(網格式布局) //
Time of Update: 2018-12-05
public static void showCombo(Shell shell) { final Combo combo = new Combo(shell, SWT.SIMPLE); String[] items = new String[4]; for (int i = 0; i < items.length; i++) { items[i] = "選項" + i; } combo.setItems(items); //
Time of Update: 2018-12-05
public static void showRowLayout(Shell shell) { RowLayout layout = new RowLayout(); //設定填充方式 layout.type = SWT.HORIZONTAL; //設定水平填充 預設為水平, //設定補白和間隔 預設狀態為3 layout.marginLeft = 5; //左補白 layout.marginTop = 5; //上補白 layout.marginRight = 5;
Time of Update: 2018-12-05
public static void showGridLayout(Shell shell) { GridLayout gridLayout = new GridLayout(); // 設定網格的列數 gridLayout.numColumns = 3; // 設定網格等寬 gridLayout.makeColumnsEqualWidth = true; // 設定補白與間隔 gridLayout.verticalSpacing = 10; //
Time of Update: 2018-12-05
BUG描述:thinkphp 2.0 版本Mod屬性還用於控制一定記錄的換行,例如:<volist name="list"id="vo"mod="5">{$vo.name}<eq name="mod"value="4"><br/></eq></volist>---- 上述文位元組選自官方手冊 ----實際的執行結果是第一行 4個記錄(缺少一個)第二行及後面行才是 5個記錄修改意見:ThinkPHP\Lib\Think\Template\
Time of Update: 2018-12-05
Ant的概念 可能有些讀者並不串連什麼是Ant以及入可使用它,但只要使用通過Linux系統得讀者,應該知道 make這個命令。當編譯Linux核心及一些軟體的來源程式時,經常要用這個命令。Make命令其實就 是一個專案管理工具,而Ant所實現功能與此類似。像make,gnumake和nmake這些編譯工具都有 一定的缺陷,但是Ant卻克服了這些工具的缺陷。最初Ant開發人員在開發跨平台的應用時,用樣也 是基於這些缺陷對Ant做了更好的設計。 Ant 與 makefile