📄 mobilemodel.java
字号:
/*
* LumaQQ - Java QQ Client
*
* Copyright (C) 2004 luma <stubma@163.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package edu.tsinghua.lumaqq.models;
import org.eclipse.swt.graphics.Image;
import edu.tsinghua.lumaqq.IconHolder;
import edu.tsinghua.swt.models.AbstractNode;
/**
* 手机好友model,手机好友包含以下属性
* name: 名称,字符串
* mobile: 手机号码,字符串
*
* @author luma
*/
public class MobileModel extends AbstractNode implements IQQNode {
public MobileModel(String name, String mobile) {
super();
addProperty(NAME, name);
addProperty(MOBILE, mobile);
addProperty(IMAGE, IconHolder.getInstance().getImage(IconHolder.icoMobileFriend));
}
/**
* 得到名称
*
* @return
* 名称
*/
public String getName() {
if(hasProperty(NAME))
return (String)getProperty(NAME);
else
return "";
}
/**
* 得到手机号码
*
* @return
* 手机号码字符串
*/
public String getMobile() {
if(hasProperty(MOBILE))
return (String)getProperty(MOBILE);
else
return "";
}
/**
* @return
* Image
*/
public Image getImage() {
if(hasProperty(IMAGE))
return (Image)getProperty(IMAGE);
else
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -