record.java

来自「一个简单的CellEditor的例子 希望给学习java的朋友一点帮助」· Java 代码 · 共 71 行

JAVA
71
字号
package com.intotherain.examples.SimpleCellEditor.model;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.views.properties.IPropertySource;

import com.intotherain.examples.SimpleCellEditor.properties.RecordProperties;

/**
 * 
 * @author intotherain
 *
 */
public class Record implements IAdaptable {
    private String id;
    private String usrName;
    private String totalTime;
    private IETypeEnum ieType = IETypeEnum.MisrcoSoft_IE;
    
    public Record(String newId, String name, String time, IETypeEnum ie ) {
        id = newId;
        usrName = name;
        totalTime = time;
        ieType = ie;
    }
    
    
    public IETypeEnum getIeType() {
        return ieType;
    }


    public void setIeType(IETypeEnum ieType) {
        this.ieType = ieType;
    }


    public String getTotalTime() {
        return totalTime;
    }


    public void setTotalTime(String totalTime) {
        this.totalTime = totalTime;
    }


    public void setId(String id) {
        this.id = id;
    }
    public String getId() {
        return id;
    }


    public String getUsrName() {
        return usrName;
    }


    public Object getAdapter(Class adapter) {
        if (adapter == IWorkbenchAdapter.class)
            return this;
        if (adapter == IPropertySource.class) {
            return new RecordProperties(this);
        }
        return null;
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?