<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Hexise's Blog

    業(yè)精于勤荒于嬉 行成于思?xì)в陔S
    posts - 13, comments - 12, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    2007年1月4日

    一、軟件準(zhǔn)備:
           IBM Lotus Domino Server 7.0.2 ;
           IBM Lotus Notes Designer and Admin Client 7.0.2 ;
           IBM Lotus Sametime Server 7.5.1 ;
           IBM Lotus Sametime Connect 7.5.1 ;

    二、安裝順序:
            Domino Server->Sametime Server->Notes Admin Client->Sametime Client

    三、Domino Server安裝:
            1.按照提示安裝Domino Server,選擇Domino Enterprise Server
            2.運(yùn)行Server Setup Program
            3.選擇Set up the first server or a new Domino domain.
            4.填寫Server name和Server title,Organization Name和Organization Certifier password
            5.填寫管理員的名稱和密碼,一定要記錄該用戶名和密碼
            6.選中Domino Server提供的Http Services
            7.不必選中LDAP Service

    四、Sametime Server安裝:
            1.按照提示安裝Sametime Server,如果需要激活80端口,選中Enable HTTP tunneling。
            2.啟動(dòng)Sametime歡迎界面,http://domain/stcenter.nsf,登錄至管理頁面,如果無法登錄,可能是域名解析問題,將域名與ip的對應(yīng)關(guān)系添加到windows/system32/drivers/etc/host文件中
            3.如果歡迎界面沒有用戶注冊選項(xiàng),需管理員開啟該功能。
            
            在管理頁面中選擇Domino目錄->Domino,勾選

    posted @ 2007-09-04 17:23 Hexise 閱讀(1398) | 評論 (0)編輯 收藏

    向已有的TreeViewer和TableViewer上添加編輯功能,可以使用CellEditor和CellModifier。

    CellEditor定義了某個(gè)列被編輯時(shí)顯示的外觀,它可以是文本框、下拉列表框或單選框,也可以自己定義。

    通常使用的CellEditor的子類就是:CheckboxCellEditor、ComboBoxCellEditor和TextCellEditor。
    CellEditor一般用數(shù)組來保存,如果某個(gè)列不需要編輯,則可將該列的CellEditor設(shè)為null。
    當(dāng)CellEditor的數(shù)組定義完后,即可利用setCellEditors(CellEditor[] editors)方法將該數(shù)組設(shè)置到對應(yīng)的TreeViewer或TableViewer中去。例如:

    ????CellEditor[]?cellEditors? = ? new ?CellEditor[ 5 ];
    ????cellEditors[
    0 ]? = ? new ?TextCellEditor(tableViewer.getTable());
    ????cellEditors[
    1 ]? = ? null ;
    ????cellEditors[
    2 ]? = ? new ?ComboBoxCellEditor(tableViewer.getTable(),? new ?String[]{ " first " ,? " second " ,? " third " ,? " forth " });
    ????cellEditors[
    3 ]? = ? new ?CheckboxCellEditor(tableViewer.getTable());
    ????cellEditors[
    4 ]? = ? new ?CustomizedTextCellEditor(tableViewer.getTable());
    ????tableViewer.setCellEditors(cellEditors);

    其中CustomizedTextCellEditor是自定義的CellEditor,避免了設(shè)置value時(shí)造成的空指針異常。

    protected?class?CustomizedTextCellEditor?extends?TextCellEditor{
    ????
    public?CustomizedTextCellEditor(Composite?parent){
    ????????
    super(parent);
    ????}

    ????
    protected?void?doSetValue(Object?value)?{
    ????????
    if(value?==?null)
    ????????????
    return;
    ????????
    super.doSetValue(value);
    ????}
    ????????
    }


    CellEditor負(fù)責(zé)外觀,它對要編輯的模型信息一無所知。所以jface中引入了ICellModifier接口,將model與CellEditor聯(lián)系在一起。為了確定在CellModifier中的列,需要定義columnProperties的String[]數(shù)組,用以區(qū)分不同列對應(yīng)的不同屬性。使用setColumnProperties(String[] columnProperties)設(shè)置該屬性集。

    ICellModifier定義了三個(gè)接口方法:

    public boolean canModify(Object element, String property);
    該方法判斷何時(shí)該列可以被編輯。其中element是對應(yīng)的model。返回true表示此時(shí)該列可以被編輯。

    public Object getValue(Object element, String property);
    該方法一般在activateCellEditor()時(shí)調(diào)用,用于設(shè)定CellEditor的初始值。其中element是對應(yīng)的model。

    此處雖然可以返回Object類型的引用,但是使用時(shí)需小心,特定的CellEditor僅接受特定類型的Value。比如:
    TextCellEditor對應(yīng)String類型的Value;
    ComboBoxCellEditor對應(yīng)Integer類型的Value;
    CheckBoxCellEditor對應(yīng)Boolean類型的Value;
    若返回了不適合的Value對象,則會(huì)拋出AssertionFailedException。

    public void modify(Object element, String property, Object value);
    該方法執(zhí)行保存修改。一般在saveEditorValue之類的方法中調(diào)用。此處的element不再是model,而是Item類型的引用。取用對應(yīng)的模型,需要使用((Item) element).getData()方法。一般此處的value值,也就是當(dāng)前CellEditor的Value值,使用CellEditor.getValue()得到。另外,在執(zhí)行完更改后,需要刷新對應(yīng)的TableViewer或TreeViewer,使做出的更新可見。

    org.eclipse.debug.internal.ui.elements.adapters.DefaultVariableCellModifier是ICellModifier的一個(gè)完整實(shí)現(xiàn):

    import?org.eclipse.debug.core.DebugException;
    import?org.eclipse.debug.core.model.IVariable;
    import?org.eclipse.debug.internal.ui.DebugUIPlugin;
    import?org.eclipse.debug.internal.ui.DefaultLabelProvider;
    import?org.eclipse.debug.internal.ui.VariableValueEditorManager;
    import?org.eclipse.debug.ui.actions.IVariableValueEditor;
    import?org.eclipse.jface.viewers.ICellModifier;

    /**
    ?*?
    @since?3.2
    ?*
    ?
    */

    public?class?DefaultVariableCellModifier?implements?ICellModifier?{
    ????
    ????
    /*?(non-Javadoc)
    ?????*?@see?org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object,?java.lang.String)
    ?????
    */

    ????
    public?boolean?canModify(Object?element,?String?property)?{
    ????????
    if?(VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property))?{
    ????????????
    if?(element?instanceof?IVariable)?{
    ????????????????
    return?((IVariable)?element).supportsValueModification();
    ????????????}

    ????????}

    ????????
    return?false;
    ????}


    ????
    /*?(non-Javadoc)
    ?????*?@see?org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object,?java.lang.String)
    ?????
    */

    ????
    public?Object?getValue(Object?element,?String?property)?{
    ????????
    if?(VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property))?{
    ????????????
    if?(element?instanceof?IVariable)?{
    ????????????????IVariable?variable?
    =?(IVariable)?element;
    ????????????????
    try?{
    ????????????????????
    return?DefaultLabelProvider.escapeSpecialChars(variable.getValue().getValueString());
    ????????????????}
    ?catch?(DebugException?e)?{
    ????????????????????DebugUIPlugin.log(e);
    ????????????????}

    ????????????}

    ????????}

    ????????
    return?null;
    ????}


    ????
    /*?(non-Javadoc)
    ?????*?@see?org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object,?java.lang.String,?java.lang.Object)
    ?????
    */

    ????
    public?void?modify(Object?element,?String?property,?Object?value)?{
    ????????Object?oldValue?
    =?getValue(element,?property);
    ????????
    if?(!value.equals(oldValue))?{
    ????????????
    if?(VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property))?{
    ????????????????
    if?(element?instanceof?IVariable)?{
    ????????????????????IVariable?variable?
    =?(IVariable)?element;
    ????????????????????IVariableValueEditor?editor?
    =?VariableValueEditorManager.getDefault().getVariableValueEditor(variable.getModelIdentifier());
    ????????????????????
    if?(value?instanceof?String)?{
    ????????????????????????value?
    =?DefaultLabelProvider.encodeEsacpedChars((String)value);
    ????????????????????}

    ????????????????????
    if?(editor?!=?null)?{
    ????????????????????????
    if??(editor.saveVariable(variable,?(String)?value,?DebugUIPlugin.getShell()))?{
    ????????????????????????????
    return;
    ????????????????????????}

    ????????????????????}

    ????????????????????
    try?{
    ????????????????????????variable.setValue((String)?value);
    ????????????????????}
    ?catch?(DebugException?e)?{
    ????????????????????????DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(),?Messages.VariableColumnPresentation_4,?Messages.VariableColumnPresentation_5,?e.getStatus());
    ????????????????????}

    ????????????????}

    ????????????}

    ????????}

    ????}


    }

    posted @ 2007-01-04 15:29 Hexise 閱讀(6402) | 評論 (4)編輯 收藏

    主站蜘蛛池模板: 久久99免费视频| 久久久久亚洲精品美女| h在线观看视频免费网站| 一级毛片人与动免费观看| 国产精品亚洲午夜一区二区三区 | 亚洲精品国产手机| 国产精品亚洲二区在线观看| 午夜视频在线观看免费完整版| 99在线观看免费视频| 热久久这里是精品6免费观看| 激情小说亚洲图片| 亚洲色大网站WWW永久网站| 亚洲精品国产成人| 亚洲视频在线观看网站| 亚洲精品国产精品乱码在线观看| 成人伊人亚洲人综合网站222| 免费激情视频网站| 毛片a级毛片免费观看免下载| 五月亭亭免费高清在线| 日韩免费人妻AV无码专区蜜桃 | 国产亚洲综合色就色| 亚洲精品第一国产综合精品99| 在线观看免费国产视频| 国内大片在线免费看| 成人毛片免费观看| 亚洲欧洲免费无码| 91免费资源网站入口| 国产成在线观看免费视频| 国产在线jyzzjyzz免费麻豆| 最近中文字幕mv免费高清视频8| 国产一区二区三区免费| 久久国产乱子精品免费女| 全黄大全大色全免费大片| 免费看搞黄视频网站| 国产好大好硬好爽免费不卡| 免费看搞黄视频网站| 久久99青青精品免费观看| 久久免费观看国产精品| 1000部免费啪啪十八未年禁止观看 | 中文字幕手机在线免费看电影 | 日韩毛片无码永久免费看|