📄 groupmodel.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 edu.tsinghua.swt.models.AbstractNode;
/**
* <pre>
* 表示QQ的一个组,做为QQ model中的一个顶层元素
* 一个组有以下属性
* name: 组名称
* friendly: 表示这个组是否是一个好友组,取值为true或者false,注意都是字符串
* blacklist: 表示这个组是否是黑名单组,取值为true或者false
* upload: 表示上传分组的时候这个组是否需要上传
* cluster: 表示这是否是一个群组,取值为true或者false
* </pre>
*
* @author 马若劼
*/
public class GroupModel extends AbstractNode {
/**
* 构造函数
*/
public GroupModel(String name) {
super();
addProperty("name", name);
addProperty("friendly", "true");
addProperty("blacklist", "false");
addProperty("visible", "true");
addProperty("upload", "true");
addProperty("cluster", "false");
}
/**
* @return true表示这个组是群组
*/
public boolean isCluster() {
if(hasProperty("cluster"))
return "true".equals(getProperty("cluster"));
else
return false;
}
/**
* @return true表示这个是好友组
*/
public boolean isFriendly() {
if(hasProperty("friendly"))
return "true".equals(getProperty("friendly"));
else
return false;
}
/**
* @return true表示这是一个黑名单组
*/
public boolean isBlackList() {
if(hasProperty("blacklist"))
return "true".equals(getProperty("blacklist"));
else
return false;
}
/**
* @return true表示组可见
*/
public boolean isVisible() {
if(hasProperty("visible"))
return "true".equals(getProperty("visible"));
else
return false;
}
/**
* @return true表示该组需要上传
*/
public boolean needUpload() {
if(hasProperty("upload"))
return "true".equals(getProperty("upload"));
else
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -