RoomSharingWidget.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:unitimes 作者:
Cell(int day, int slot) {
    super("cell", "item", isEditable(day, slot) ? "clickable" : null);
    iDay = day; iSlot = slot;
    RoomSharingOption option = iModel.getOption(day, slot);
    if (option == null) {
        getElement().getStyle().clearBackgroundColor();
        setHTML("");
        setTitle("");
    } else {
        getElement().getStyle().setBackgroundColor(option.getColor());
        setHTML(option.getCode() == null ? "" : option.getCode());
        setTitle(CONSTANTS.longDays()[day] + " " + slot2short(slot) + " - " + slot2short(slot + iMode.getStep()) + ": " + option.getName());
    }
    if (isEditable(day, slot))
        addMouseDownHandler(new MouseDownHandler() {
            @Override
            public void onMouseDown(MouseDownEvent event) {
                setOption(iOption);
            }
        });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号