TimeGrid.java 文件源码

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

项目:unitime 作者:
public SelectionPanel(boolean fixed) {
    setStyleName(fixed ? "selection" : "active-selection");
    if (fixed) {
        iRemove = new P("x"); iRemove.setHTML("×");
        iRemove.addMouseDownHandler(new MouseDownHandler() {
            @Override
            public void onMouseDown(MouseDownEvent event) {
                iSelections.remove(SelectionPanel.this);
                if (iSelection != null)
                    iAllSelections.remove(iSelection);
            }
        });
        iRemove.getElement().getStyle().setRight(2, Unit.PX);
        iRemove.getElement().getStyle().setTop(2, Unit.PX);
        iRemove.getElement().getStyle().setPosition(Position.ABSOLUTE);
        add(iRemove);
        iText = new P("text");
        add(iText, 0, 0);
    }

    sinkEvents(Event.ONMOUSEDOWN);
    sinkEvents(Event.ONMOUSEUP);
    sinkEvents(Event.ONMOUSEMOVE);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号