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);
}
TimeGrid.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:unitimes
作者:
评论列表
文章目录