Java 类com.google.gwt.user.client.ui.SourcesMouseEvents 实例源码

项目:iambookmaster    文件:PlayerList.java   
public ItemWidget(ObjectBean object) {
    setStyleName(PlayerStyles.OBJECT_IN_BAG);
    this.object = object;
    SourcesMouseEvents widget;
    if (object.getIcon()==null) {
        getElement().getStyle().setDisplay(model.getSettings().isVerticalObjects() ? Display.BLOCK : Display.INLINE_BLOCK);
        setTitle(AppLocale.getAppConstants().playerClickToUse());
        text = new Label();
        if (model.getSettings().isVerticalObjects()) {
            text.setText(object.getName());
            text.setWordWrap(false);
        } else {
            text.setText(object.getName()+",");
        }
        widget = text;
        add(text);
    } else {
        getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
        setTitle(object.getName());
        image = new Image();
        image.addLoadHandler(this);
        if (object.getIcon().getBigUrl()==null) {
            image.setUrl(object.getIcon().getUrl() );
        } else {
            big = true;
            image.setUrl(object.getIcon().getBigUrl());
        }
        add(image);
        widget = image;
    }
    if (model.getSettings().isHiddenUsingObjects()) {
        addStyleName(PlayerStyles.CLICKABLE);
        widget.addMouseListener(this);
    }
    animationTimer.add(this);
}
项目:gwittir    文件:DragAndDropContext.java   
public void makeDraggable(SourcesMouseEvents w, boolean revert) {
    Draggable d = new Draggable();
    d.widget = (Widget) w;
    d.listener = new DragSupportListener((Widget) w, revert);
    w.addMouseListener(d.listener);
    draggables.put(d.widget, d);
}
项目:onecmdb    文件:DragControl.java   
public DragControl(Widget dragWidget, SourcesMouseEvents drag) {
        drag.addMouseListener(this);
        this.dragWidget = dragWidget;
}
项目:OneCMDBwithMaven    文件:DragControl.java   
public DragControl(Widget dragWidget, SourcesMouseEvents drag) {
        drag.addMouseListener(this);
        this.dragWidget = dragWidget;
}
项目:gwittir    文件:DragAndDropContext.java   
public void addDragListener(SourcesMouseEvents w, DragListener l) {
    Draggable d = this.draggables.get((Widget) w);
    d.listeners.add(l);
}
项目:gwittir    文件:DragAndDropContext.java   
public void removeDragListener(SourcesMouseEvents w, DragListener l) {
    Draggable d = this.draggables.get((Widget) w);
    d.listeners.remove(l);
}
项目:gwittir    文件:DragAndDropContext.java   
public void removeDraggable(SourcesMouseEvents w) {
    Draggable d = this.draggables.get((Widget) w);
    w.removeMouseListener(d.listener);
    this.draggables.remove(d.widget);
}
项目:gwittir    文件:DragAndDropContext.java   
public void removeDropListeners(SourcesMouseEvents w, DropListener dl) {
    List<DropListener> listeners = (dropListeners.get((Widget) w) != null)
        ? dropListeners.get((Widget) w) : new ArrayList<DropListener>();
    listeners.remove(dl);
}