posted @ 2008-01-21 09:54 Raul Gong 閱讀(2847) | 評論 (2) | 編輯 收藏
摘要: 利用birt的api畫pie圖(餅圖)時,改變餅圖的切片的顏色。在使用api構建圖的過程中,在"Base Series"步驟中,構造一個顏色數組Fill[] fiaBase,里面存儲顏色,pie使用的時候按照數據順序取出,與切片大小無關。其中顏色數據可以是ColorDefinitionImpl.RED( ),也可以調用其構造方法輸入三原色創造顏色:ColorDefinitionImpl.create(128, 128, 255)。實際使用中,可以嘗試在自己封裝的方法中包含這個色彩數組參數。 閱讀全文
摘要: From Eclipsepedia...Actions are associated with commands in various ways depending on how the actions are defined.
For actions contributed via the actionSets extension point ......
For actions created programmatically, associating the action with a command is a two-step process......
分兩種情況講解Actions與Command進行關聯的方法。 閱讀全文
For actions contributed via the actionSets extension point ......
For actions created programmatically, associating the action with a command is a two-step process......
分兩種情況講解Actions與Command進行關聯的方法。 閱讀全文
posted @ 2008-01-08 14:44 Raul Gong 閱讀(271) | 評論 (0) | 編輯 收藏
摘要: 在制作eclipse插件的時候,時常需要對已經存在的視圖做一些擴展,例如在project explorer中增加一個右鍵菜單,或者需要獲取outline中當前選中項,等等。而這些操作的前提,是獲取這些視圖的id,然后通過獲取視圖的語句獲取到視圖,并進行下一步操作。本文講解了兩種方法來獲取視圖id,第一種是通過手動查找,較為靈活但也稍微耗時;第二種為編寫代碼直接獲得,方便快捷,并給出了實例代碼。本文所講解的方法可稍加改動擴展到搜尋eclipse中其他資源的用途,拋磚引玉,希望各位多多指正。
閱讀全文
閱讀全文
posted @ 2008-01-08 10:27 Raul Gong 閱讀(1896) | 評論 (0) | 編輯 收藏
摘要: SWT/JFace 事件的四種寫法(轉) 閱讀全文
posted @ 2008-01-04 16:15 Raul Gong 閱讀(768) | 評論 (0) | 編輯 收藏
摘要: IPartListener和IPartListener2作用于eclipse視圖之間的聯系。描述IPartListener(2)的用法,實例代碼。 閱讀全文
posted @ 2008-01-04 15:51 Raul Gong 閱讀(2673) | 評論 (0) | 編輯 收藏
摘要: 獲取IWorkbenchPage對象的幾種方法,以及實例代碼。 閱讀全文
posted @ 2008-01-04 11:01 Raul Gong 閱讀(1031) | 評論 (0) | 編輯 收藏
摘要: 同題目,IStructuredSelection , SourceManipulation , 實例代碼。 閱讀全文
posted @ 2008-01-04 10:23 Raul Gong 閱讀(287) | 評論 (0) | 編輯 收藏
摘要: 獲取到的有關“當前選擇項”內容的一種典型實現方法。例如:TreeSelection -> IStructuredSelection-> 進行各種操作。 閱讀全文
posted @ 2008-01-03 20:34 Raul Gong 閱讀(1902) | 評論 (0) | 編輯 收藏
摘要: 同標題,實例代碼。 閱讀全文
posted @ 2008-01-03 18:46 Raul Gong 閱讀(320) | 評論 (0) | 編輯 收藏
摘要: 這段代碼完成的功能是:從xml中解析數據,將數據存放在一個類中。 閱讀全文
posted @ 2008-01-03 10:13 Raul Gong 閱讀(282) | 評論 (1) | 編輯 收藏