下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
TeamcenterRichclientCustomizationTrainingfor10.1?Prerequisites TeamcenterApplicationAdministration ProficiencyinJavaprogramming ?Required Oracle Teamcenter (includingadministratorrichclient,onlinehelp,sample VisualStudio.NET JDK Eclipse TeamcenterRichClient-Server Teamcenterclientserver均可客戶 Serverlayer:服務器層,采IntegrationToolkit(ITKCBusinessBusinessModelerExercise 找出你的Teamcenter環(huán)境變 設置Teamcenter客戶化需要的環(huán)境變量與對應的文件 使用BMIDE查看常見對象對應 MSG%TCLOCALIZATIONUSERXMLDATAUSERLIB%;%TCTMPKEEPSYSTEMTeamcenterClass attributes方method)是繼承到子 RichClientProgrammingEclipseEnvironment有有RichClientProgrammingEclipseEnvironment RichClientProgrammingEclipseEnvironment RichClient 輸入ProjectName(譬如 選擇產(chǎn)生 選擇此plug-in將傳遞到 選擇不要建立一個richclientRichClientProgrammingEclipseEnvironment RichClientRichClientProgrammingEclipseEnvironment?RichClientüü ülülüaüsü..tRichClientProgrammingEclipseEnvironment RichClientRichClient RuntherichclientfromInEclipse,chooseRun→DebugRichClient 選擇Plug-inDevelopment內(nèi)Deployableplug-insand可直接指定Teamcenterrichclient文件夾,Eclipse會自動把jar放到plugins子文件 如果有修改properties文檔,必須執(zhí)行 two-tierrich four-tierrich利用WebApplicationManager打包richclientRichClientExercise TeamcenterUI boBox, ponent, ?eterHow-To獲得Teamcenter如果需要建立objects或是searchobjects,必須先獲取目前clientsession,我們可以通過以下的方式來獲TCSessionsession=一般在Handler通過如下方法獲取AIFDesktopaifdesktop=application=aifdesktop.getCurrentApplication();session=(TCSession)eterHow-Togetselecteditemsfrom從TeamcenterUI中,用戶點選Itemorformorfolder,我們可以通過以的方式得到選取的StructuredSelectioniselectionIteratorit=iselection.iterator();ponentContextcompContext= p= 也可以AIFDesktopaifdesktop=application=ponentContextaif[]=eterHow-To建立Item、Form、or ponentItemType=( ponentitem ID,REVID,ITEMTYPE,OBJECTNAME,DESC,通過以下的方式,可以獲取目前的sessionuser所屬的newstufffolder將objects粘貼在這個folderponentFoldertcfolder= 請建立一個CrtetmrtHaja求 bar加入一個選單,增列一個CreateItemCommand的功創(chuàng)建一個Item,請自行定義id、revid、object將新建立的item粘貼在newstuffeterHow-Toset/getobject’s在設定object’sproperties時,必須注當有大批量的properties要設定值時,最好采取以下的TCFormProperty[]ps=f.getAllFormProperties();//Getthepropertytosetps[0].setStringValueData(“abc”);//Setsthevaluebutisnotsaved.ps[1].setStringValueData(“def”);//Setsthevaluebutisnotsaved.f.setTCProperties(ps);//Nowissavedtothedb當properties數(shù)量不大時,則可以采用以下的TCFormPropertyp=f.getFormTCProperty(“my_prop_name”);//Getpropertytosetp.setStringValue(“abc”);//Setit.Atthispointitissavedtothedb.eterHow-Toset/get針對不同型態(tài)的property,使用的method也會不一樣,例如string可以通過以下的方式來獲取或是設定屬eterHow-Tofinduserby可以用以下的方式來查詢已知的ponentUserTypetccUserType=( tccUser[0]=eterHow-To建立workflow通過以下的方式,建立一個已經(jīng)存在的workflowtemplate,并將item粘到target ponenttasktemplate = .create(PROCESSNAME,PROCESS,WORKFLOWTEMPLATE ponent[],Target:請建立一個SetAndGetPropsValue.java,并且可以達到以下的建立新的Item類,MyItem,并在MyItemRevision上定義兩種類型的性,一個是TypeReference(User),一個是String將 并布署到搜尋到一 ponentUser,并將這個object的reference存放到建的TypeReference屬性將自定的字符串a(chǎn)rray存放到新建的Stringarray修改objectname以及objectdescription,自定義設定必須使用setTCProperties做為最后 eterHow-Togetobjectsby建議都建議都使ponents,因為這個method不會受到preferenceps objectsreferenced,則可以用以下的 ps3 如果要抓取當前對象被哪些對象使用,則可以用以下的 ps2 eterHow-Toexport/import將localfiles存放到Teamcenter,必須通過Dataset的形式 ,可以以下的方式來實 "textobjtcDataset.setFiles(newString[]{FULLFILEFILEFORMAT,newString[]{"Plain"},FILE將Dataset中存放的files匯出到localdisk請建立兩個xrtFia和mFaImport兩個dataset,一個是Text一個是MSExcel,并將local到這兩個dataset將datasets粘貼到MyItemRevision點選MyItemRevision,并將粘貼在下面的Dataset匯出到localRichClientProgrammingCreatingaViewAddaCreateRichClientProgrammingCreatingaView續(xù)1SetactivepartCommandonlybeactivatedwithCustomDefineacustomview RichClientProgrammingCreatingaView續(xù)2 CreateaCustomView建立一個用戶點選一個object時,可以通過getChild()打印出子對象在viewRichClientCreatingaRichClientApplicationandSendDefineaDefinea RichClientCreatingaRichClientApplicationandSendDefineaSendto Defineahandlerfor“Sendto <iterateRichClientCreatingaRichClientApplicationandSendDefineacommandfor“SendtoDefineadefinitionfor“SendtoExercise7(很少用到,了解建立一個 建立一個Sendto利用前述的步驟,定義出如下的RichClientProgrammingCustomizeShortcut Customizing Create Createacommandunder RichClientProgrammingCustomizetheToolbar 修改現(xiàn)有application的Toolbar(以MyTeamcenter示例 Create Createatoolbarunder Createacommandunderthe在myteamcenter窗口中建 立一個toolbar按鈕在實現(xiàn)以下的需彈出窗口顯示選擇的對如果沒有選擇對象則提示RichClientCustomizeFormandProperties XMLstylesheet AutomaticRichClientProgramming RichClientProgrammingFormsUsingXMLStyleSheet 式RichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy 信息,Viewer顯示所有屬性信 信息,Viewer顯示表單專有屬性信Properties 顯示Property 語n.RENDERINGn 顯示Summary 語
.REGISTEREDTO=.SUMMARYRENDERING=n n 顯示Form 語
.SUMMARY_REGISTEREDTO=n.FORMRENDERING n .FORM_REGISTEREDTO=RichClientFormsUsingXMLStyleSheet?RichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy?RichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy Summary/ViewerViewerXML XMLelements pageTitleformatfirstcolumnsecondcolumnpropertyseparatorall Display RichClientOneColumnTwo ThinClientOneRichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMyRichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy<propertyname="object_name"<propertyname="object_desc"<propertyname="owning_user"renderingHint="objectlink"modifiable="false"<propertyname="checked_out"<propertyname="checked_out_user"<propertyname="checked_out_date"<propertyname="checked_out_change_id"RichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy<propertyname="proj_assign_mod_date"<propertyname="project_ids"<pagetitle="All"<allRichClientFormsUsingXMLStyleSheet ModifytheSummary/ViewerpaneinMy 每一個renderinghint所使用的JavaBeansclass定義在 mon_<version>.jar的package renderinghintJavaBeansnDEFINITION=aaana rn_titled.DEFINITION=aana>RichClientFormsUsingXMLStyleSheet ViewerPaneRichClientForms 建立FormForm Twomethodsarerequiredtoimplementan RichClientForms Rendering RenderingContructor.Togetform loadRendering.ToinitializeformUI.Whenuserclickonviewtabordoubleclickonform,themethodiscalled. saveRendering.Tosaveformdata.WhenuserclickonSavebutton,themethodiscalled. setRenderingReadWrite.Toenable/disableUIcomponentsintheRichClientForms Rendering FormPanel ponentForm.getFormTCProperty(_”) get>Value() set>Value()> set>ValueData()eeDRichClientForms Rendering FormPanel package packageRichClientForms Rendering 程序框publicclassMyForm {publicMyForm {
}{}publicvoid{}}
RichClientForms Rendering 加publicvoidloadRendering()throws{setLayout(newVerticalLayout()); //布局管理器JPanelmainPanel=newJPanel(newPropertyLayout());projectId=newJTextField(26); serialNo=newmainPanel.add("1.1.right.center",newJLabel("ProjectID"));mainPanel.add("1.2.left.center",projectId);mainPanel.add("2.1.right.center",newJLabel("SerialNumber"));mainPanel.add("2.2.left.center",serialNo);add("unbound.bind",piProperty=form.getFormTCProperty(“project_id”);projectId.setText(piProperty.getStringValue());serialNo.setText(snProperty.getStringValue());}
RichClientForms Rendering 加publicvoid{piProperty.setStringValueData(projectId.getText());snProperty.setStringValueData(serialNo.getText());TCProperty[]ps=newTCProperty[2];ps[0]=ps[1]=}RichClientFormsUsingJavaBeans 建立FormForm 在packagecom.customer.forms建立Form的class ExtendJPanel implementthe ponentExercise?新增一個表單類型,并使用 Rendering方式顯示表屬?使用iTextField,iComboBox在form的UIRichClient plugin.xml->Runtime-RichClient HSSFWorkbookwb=new HSSFRowrow= HSSFCellStylestyle= HSSFCellcell=row.createCell((short) //Orange"foreground",foregroundbeingthefillforegroundnotthefont style= for(intx=0;x<1000;x++) //Createarowandputsomecellsinit.Rowsare0 for(inty=0;y<100;y++) cell=row.createCell((short) //Writetheoutputtoa FileOutputStreamfileOut=new RichClient //設置字體HSSFFontfont=設置字體大小;)設置字體名字;//設置樣式HSSFCellStylestyle=設置底邊框;設置底邊框顏色;設置左邊框;設置左邊框顏色;//設置右邊框設置右邊框顏色;//設置頂邊框設置頂邊框顏色;在樣式用應用設置的字體設置自動換行;設置水平對齊的樣式為居中對齊設置垂直對齊的樣式為居中對齊;Exercise?Myteamcenter中增加菜單生成?將選擇的對象的名稱輸入到excel?在home下生成excel數(shù)據(jù)集,并將excel文件導入到數(shù)據(jù)集RichClientProgramming TC9.1中的界面開發(fā)將逐漸過渡到SWT üDisplay和Sü控件ü RichClientProgramming RichClientProgramming控件實例的構造:Control(Controlparent,int???Labelname=newLabel(shel,?SWT.SNGLE單行?SWT.BORDER邊框?SWT.MULTI多行?控件的?最好不要手動釋放一個控件,而應該交由SWTRichClientProgramming?Button、Label、?? RichClientProgramming?標準的SWT布局FillLayout:在容器中以相同的大小單行或單列的排列組FormLayout(SWT2.0的新特性):通過定義組件四個邊的“粘貼”位置來排列組件, 的相對的組件可以父組件,也可以是同一容器的其它組üRichClientProgramming?布局實1.首先定義窗口和Display.getDefault().dispose();//移去平 啟動畫display=new =newS (display,SWT.TITLE);FormLayoutlayout=newFormLayout();layout.marginHeight=10; .setText("用戶登錄oRichClientProgramming?布局實2.創(chuàng)建窗口上的元素,其中下面的兩個button由一個使用RowLayout組件來包容name=new ,name.setText("用戶名nameText=new ,SWT.SINGLE|pass=new , passText=newText(s ,SWT.SINGLE|SWT.BORDER);bottom=newComposite(s ,SWT.NONE);RowLayoutrowLayout=newRowLayout();rowLayout.justify=true;//justify定義組件在容器中分散開,效果類似于swing的RichClientProgramming?布局實2.創(chuàng)建窗口上的元素,其中下面的兩個button由一個使用RowLayout組件來包容name=new ,name.setText("用戶名nameText=new ,SWT.SINGLE|pass=new , passText=newText(s ,SWT.SINGLE|SWT.BORDER);bottom=newComposite(s ,SWT.NONE);RowLayoutrowLayout=newRowLayout();rowLayout.justify=true;//justify定義組件在容器中分散開,效果類似于swing的RichClientProgramming?布局實mes離是父組件ctr()高度t的(s)為。FormDatadata=newFormData();data.top=newFormAtta oRichClientProgramming?布局實定義name文本輸入的位置。它的頂邊在 的中心位置(這是正確的表達,但程序是這樣解釋,事實上它的中心位置與在同一條水平線上),左邊me 的右邊有。data=newdata.top=newFormAtta ent(name,0,SWT.CENTER);data.left=newFormAtta ent(name,10,SWT.RIGHT);RichClientProgramming?布局實定義 的位置。它的頂邊距 的底邊有10個點數(shù)的移data=newdata.top=new RichClientProgramming?布局實定義pass文本輸入的位置。它的頂邊在 的中心位置(同),左邊與name文本框的左邊對data=newdata.top=newFormAtta ent(pass,0,SWT.CENTER);data.left=newFormAtta RichClientProgramming?布局實定義bottom組件的位置。它的頂邊距 的底邊15個點數(shù),左與 的左邊對齊,右邊與pass文本輸入的右邊對齊data=newdata.top=newFormAtta ent(pass,15,SWT.BOTTOM);data.left=newFormAtta ent(pass,0,SWT.LEFT);data.right=newFormAtta ?RichClientProgramming ?要自定 框,首先要繼承üpublicclassMyDialogextends?定 框大小,需要重寫getInitialSize方§protectedPointgetInitialSize()§returnnew?定 框界面,需要重寫createDialogArea方?自定 框按鈕.需要重寫createButton和initializeBounds
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 制造企業(yè)研發(fā)副總經(jīng)理面試攻略及題目
- 網(wǎng)絡安全工程師面試技術要點與備考資料含答案
- 月季之美課件
- 大學舌頭課件
- 2025河南鄭州航空港鄭飛特種裝備招聘4人筆試考試參考題庫及答案解析
- 大學武術理論課件
- 2025解放軍總醫(yī)院第一醫(yī)學中心社會招聘138人筆試考試備考試題及答案解析
- 2026年中國大唐集團資本控股有限公司招聘考試筆試模擬試題及答案解析
- 大學平面構成課件
- 2025湖南郴州資興市東江街道羅圍社區(qū)公共環(huán)境衛(wèi)生類公益性崗位招聘考試筆試模擬試題及答案解析
- 產(chǎn)褥感染課件
- 2025江蘇省蘇豪控股集團招聘參考筆試試題及答案解析
- (一診)達州市2026屆高三第一次診斷性測試生物試題(含標準答案)
- 介入手術室護理查房
- 員工宿舍樓裝修改造工程施工組織設計方案
- 個體化腫瘤疫苗的臨床前開發(fā)策略
- 裝飾公司合伙協(xié)議書
- 尊崇憲法維護憲法
- 排水設施使用協(xié)議書
- 老年人失智癥行為和精神癥狀(BPSD)護理方案
- 防水工程專項施工方案
評論
0/150
提交評論