topicbgsound.java

来自「tbuy1.1.5是在netbeans环境下用JSF技术编写的一个论坛tbuy1」· Java 代码 · 共 56 行

JAVA
56
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package biz.tbuy.bbs.bean;import biz.tbuy.bbs.TopicBuilder;import biz.tbuy.bbs.TopicFactory;import biz.tbuy.bbs.TopicModel;import biz.tbuy.common.Constants;import biz.tbuy.common.Utils;import java.util.List;import javax.faces.model.SelectItem;/** * * @author Administrator */public class TopicBgsound extends BaseBean{    private TopicModel _topic;    /** Creates a new instance of TopicBgsound */    public TopicBgsound() {        _topic = new TopicModel();    }        public void setTopic(TopicModel topic) {        _topic = topic;    }        public TopicModel getTopic() {        return _topic;    }        public List<SelectItem> getBgsounds() {        return getBBSApplication().getBgsounds();    }    // -------------------------------------------------- change bgsound        /**     * 给主题更换一首背景音乐     * @return     */    public String change() {        TopicBuilder tBuilder = TopicFactory.newBuilder(_topic);        if (tBuilder.changeBgsound(_topic.getMusic())) {            Utils.addInfoMessage(getBundle(), "修改背景音乐信息成功!");            return Constants.OUT_SUCCESS;        }        return Constants.OUT_FAILURE;    }}

⌨️ 快捷键说明

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