Java 类com.google.gwt.event.logical.shared.AttachEvent.Handler 实例源码

项目:dataworks-zeus    文件:OwnerJobTrend.java   
public OwnerJobTrend(){
    date=new DateField();
    date.setEditable(false);
    date.setAllowBlank(false);
    date.setValue(new Date());

    HorizontalLayoutContainer form=new HorizontalLayoutContainer();
    form.add(new FieldLabel(date,"日期"),new HorizontalLayoutData());
    form.add(submit,new HorizontalLayoutData());

    container.add(form,new VerticalLayoutData(1,30));
    container.addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            submit.fireEvent(new SelectEvent());
        }
    });
}
项目:dataworks-zeus    文件:RunningJobTrend.java   
public RunningJobTrend(){
    start=new DateField();
    start.setEditable(false);
    start.setValue(new Date(new Date().getTime()-7*24*60*60*1000L));
    end=new DateField();
    end.setEditable(false);
    end.setValue(new Date());
    HorizontalLayoutContainer form=new HorizontalLayoutContainer();
    form.add(new FieldLabel(start, "起始日期"),new HorizontalLayoutData(0.3,1));
    form.add(new FieldLabel(end,"截止日期"),new HorizontalLayoutData(0.3, 1));
    form.add(submit,new HorizontalLayoutData(-1,-1));

    container.add(form,new VerticalLayoutData(1, 30));

    container.addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            submit.fireEvent(new SelectEvent());
        }
    });
}
项目:daris    文件:ArchiveEntryImagePanel.java   
public ArchiveEntryImagePanel(ArchiveEntryCollectionRef arc,
        ArchiveEntry entry) {

    _arc = arc;
    _entry = entry;

    _ap = new AbsolutePanel();
    _ap.fitToParent();
    _ap.setOverflow(Overflow.HIDDEN);
    initWidget(_ap);

    addAttachHandler(new Handler() {

        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                loadImage();
            }
        }
    });

}
项目:rtgov-ui    文件:DateTimePicker.java   
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                cid = generateUniqueCid();
                getElement().addClassName(cid);
                initPicker(cid,DEFAULT_DATE_TIME_FORMAT);
            } else {
                removePicker(cid);
            }
        }
    });
}
项目:rtgov-ui    文件:ToggleSwitch.java   
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                cid = generateUniqueCid();
                getElement().addClassName(cid);
                init(cid);
            } else {
                remove(cid);
            }
        }
    });
}
项目:zeus3    文件:OwnerJobTrend.java   
public OwnerJobTrend(){
    date=new DateField();
    date.setEditable(false);
    date.setAllowBlank(false);
    date.setValue(new Date());

    HorizontalLayoutContainer form=new HorizontalLayoutContainer();
    form.add(new FieldLabel(date,"日期"),new HorizontalLayoutData());
    form.add(submit,new HorizontalLayoutData());

    container.add(form,new VerticalLayoutData(1,30));
    container.addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            submit.fireEvent(new SelectEvent());
        }
    });
}
项目:zeus3    文件:RunningJobTrend.java   
public RunningJobTrend(){
    start=new DateField();
    start.setEditable(false);
    start.setValue(new Date(new Date().getTime()-7*24*60*60*1000L));
    end=new DateField();
    end.setEditable(false);
    end.setValue(new Date());
    HorizontalLayoutContainer form=new HorizontalLayoutContainer();
    form.add(new FieldLabel(start, "起始日期"),new HorizontalLayoutData(0.3,1));
    form.add(new FieldLabel(end,"截止日期"),new HorizontalLayoutData(0.3, 1));
    form.add(submit,new HorizontalLayoutData(-1,-1));

    container.add(form,new VerticalLayoutData(1, 30));

    container.addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            submit.fireEvent(new SelectEvent());
        }
    });
}
项目:atom    文件:StringFormattedLobView.java   
@Override
protected boolean createFieldWidget() {
    initWidget(uiBinder.createAndBindUi(this));
    field = textArea;
    toolbar.initToolBar(textArea);

    textArea.addAttachHandler(new Handler() {

        @Override
        public void onAttachOrDetach(AttachEvent event) {
            AtomTools.log(Level.FINE, "textArea.onAttachOrDetach - " + event.toDebugString(), this);
            fixIFrameDefaultFont(true);
        }
    });

    fixIFrameDefaultFont(true);

    return false;
}
项目:gantt    文件:GanttConnector.java   
private void updateVerticalScrollGridDelegation() {
    // register scroll handler to Gantt widget
    ganttScrollHandlerRegistration = getWidget().addDomHandler(ganttScrollHandler, ScrollEvent.getType());

    scrollDelegateHandlerRegistration = delegateScrollGridTarget.addScrollHandler(gridScrollDelegateTargetHandler);

    // add detach listener to unregister scroll handler when its
    // detached.
    delegateScrollGridTarget.addAttachHandler(new Handler() {

        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (!event.isAttached() && scrollDelegateHandlerRegistration != null) {
                scrollDelegateHandlerRegistration.removeHandler();
            }
        }
    });
}
项目:gantt    文件:GanttConnector.java   
private void updateVerticalScrollTableDelegation() {
    // register scroll handler to Gantt widget
    ganttScrollHandlerRegistration = getWidget().addDomHandler(ganttScrollHandler, ScrollEvent.getType());

    // register a scroll handler to 'delegation' scroll panel.
    scrollDelegateHandlerRegistration = delegateScrollPanelTarget.addScrollHandler(scrollDelegateTargetHandler);

    // add detach listener to unregister scroll handler when its
    // detached.
    delegateScrollPanelTarget.addAttachHandler(new Handler() {

        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (!event.isAttached() && scrollDelegateHandlerRegistration != null) {
                scrollDelegateHandlerRegistration.removeHandler();
            }
        }
    });
}
项目:overlord-commons    文件:DateBox.java   
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                cid = generateUniqueCid();
                getElement().addClassName(cid);
                initPicker(cid);
            } else {
                removePicker(cid);
            }
        }
    });
}
项目:gwt-esri    文件:TimeSlider.java   
/**
 * Creates a new TimeSlider object.
 * 
 * @param params - Parameters for the time slider object.
 * @param loadHandler - handler to fire when dijit is created.  All method calls will fail untill this
 * event fires. 
 */ 
public TimeSlider(Parameters params, DijitLoadHandler handler) {

    if( !assertLoaded() ) return; 

    loadHandler = handler;
    parameters = params;

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( event.isAttached() && jso == null ) {
                jso = _create(parameters, panel.getElement());
                if( loadHandler != null ) loadHandler.onLoad();
            }
        }
    });

}
项目:gwt-esri    文件:AttributeInspector.java   
/**
 * Creates a new Attribute Inspector object.
 * 
 * @param params - input parameters
 */
public  AttributeInspector(Parameters params) {

    if( !assertLoaded() ) return; 

    parameters = params;

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if(jso == null ) jso = create(parameters);
        }
    });

}
项目:gwt-esri    文件:Editor.java   
/**
 * Creates a new Editor object.
 * 
 * @param params - Parameters that define the functionality of the editor widget. Create a
 * new settings object to pass to the widget
 */
public Editor(Parameters params) {

    if( !assertLoaded() ) return; 

    parameters = params;

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( jso == null ) jso = create(parameters);
        }
    });

}
项目:gwt-esri    文件:Legend.java   
/**
 * Creates a new Legend dijit. Should be called after all the layers have been loaded in the map, 
 * typically in the map's onLayerAddResult event.
 * 
 * @param params - Parameters used to configure the dijit. See the list below for details. 
 */
public  Legend(Parameters params) {

    if( !assertLoaded() ) return; 

    parameters = params;

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( jso == null ) jso = create(parameters);
        }
    });

}
项目:gwt-esri    文件:TemplatePicker.java   
/**
 * Creates a new TemplatePicker object that displays a gallery of templates
 * from the input feature layers or items. A symbol and label is displayed
 * for each template. The symbol is defined by the template's feature type.
 * The label is the template's name.
 * 
 * @param params - FeatureLayers or items are required all other parameters
 * are optional. See options list.
 */
public TemplatePicker(Parameters params) {

    if( !assertLoaded() ) return; 

    parameters = params;

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( jso == null ) jso = create(parameters);
        }
    });

}
项目:gwt-esri    文件:BasemapGallery.java   
/**
 * Creates a new BasemapGallery dijit.
 * 
 * @param params - Parameters used to configure the widgit. See the list below for details.
 */
public BasemapGallery(Parameters params) {

    if( !assertLoaded() ) return; 

    initWidget(panel);

    parameters = params;

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( jso == null ) jso = create(parameters);
        }
    });

}
项目:dataworks-zeus    文件:CodeMirror.java   
public CodeMirror(final CodeMirrorConfig config){
    setElement(DOM.createDiv());
    addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            if(event.isAttached()){
                cm=create(getElement(), config.toJsObject(CodeMirror.this));
            }
        }
    });
    sinkEvents(Event.MOUSEEVENTS|Event.ONCLICK);
}
项目:rtgov-ui    文件:SituationTable.java   
/**
     * Creates the action buttons.
     * @param situationSummaryBean
     */
    private Widget createInfoPanel(SituationSummaryBean situationSummaryBean) {
        FlowPanel infoPanel = new FlowPanel();
        infoPanel.getElement().setClassName(""); //$NON-NLS-1$

        if (!situationSummaryBean.getProperties().isEmpty()) {
            final Anchor properties = new Anchor();
            properties.setHref("#"); //$NON-NLS-1$
            properties.getElement().setAttribute("data-toggle", "popover"); //$NON-NLS-1$ //$NON-NLS-2$
            properties.getElement().setAttribute("data-placement", "left"); //$NON-NLS-1$ //$NON-NLS-2$
            properties.getElement().setAttribute("data-html", "true"); //$NON-NLS-1$ //$NON-NLS-2$
            properties.getElement().setAttribute("data-original-title", i18n.format("situation-table.properties")); //$NON-NLS-1$ //$NON-NLS-2$
            properties.getElement().setAttribute("data-trigger", "hover"); //$NON-NLS-1$ //$NON-NLS-2$
            properties.getElement().setAttribute("data-content", createPropertiesTableHtml(situationSummaryBean.getProperties())); //$NON-NLS-1$
            properties.setHTML("<div class=\"icon icon-properties\"></div>"); //$NON-NLS-1$
            properties.addAttachHandler(new Handler() {
                @Override
                public void onAttachOrDetach(AttachEvent event) {
                    if (event.isAttached()) {
                        Element element2 = properties.getElement();
                        activatePopover(element2);
                    }
                }
            });
            infoPanel.add(properties);
        }

//        infoPanel.add(downloadInitialActionButton);
//        infoPanel.add(retryActionButton);
        return infoPanel;
    }
项目:rtgov-ui    文件:SourceEditor.java   
/**
 * Constructor.
 */
public SourceEditor() {
    setElement(Document.get().createDivElement());
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                initEditor();
            } else {
                destroyEditor();
            }
        }
    });
}
项目:rtgov-ui    文件:WidgetUtil.java   
/**
 * Initializes the given widget by hooking up mouse-in/mouse-out
 * handlers.
 * @param widget
 */
public static void initMouseInOutWidget(final IMouseInOutWidget widget) {
    widget.addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                addMouseHandlers(widget);
            } else {
                removeMouseHandlers(widget);
            }
        }
    });
}
项目:zeus3    文件:CodeMirror.java   
public CodeMirror(final CodeMirrorConfig config){
    setElement(DOM.createDiv());
    addAttachHandler(new Handler() {
        public void onAttachOrDetach(AttachEvent event) {
            if(event.isAttached()){
                cm=create(getElement(), config.toJsObject(CodeMirror.this));
            }
        }
    });
    sinkEvents(Event.MOUSEEVENTS|Event.ONCLICK);
}
项目:dtgov    文件:WidgetUtil.java   
/**
 * Initializes the given widget by hooking up mouse-in/mouse-out
 * handlers.
 * @param widget
 */
public static void initMouseInOutWidget(final IMouseInOutWidget widget) {
    widget.addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                addMouseHandlers(widget);
            } else {
                removeMouseHandlers(widget);
            }
        }
    });
}
项目:overlord-commons    文件:TemplatedWidgetTable.java   
/**
 * Called after construction.
 */
@PostConstruct
protected void postContruct() {
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                doAttachInit();
            }
        }
    });
}
项目:overlord-commons    文件:AsyncActionButton.java   
/**
 * Constructor.
 */
public AsyncActionButton() {
    addAttachHandler(new Handler() {
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if (event.isAttached()) {
                initFromTemplate();
            }
        }
    });
}
项目:gwt-esri    文件:AttachmentEditor.java   
/**
 * Creates a new AttachmentEditor Widget.
 */
public  AttachmentEditor() {

    if( !assertLoaded() ) return; 

    initWidget(panel);

    addAttachHandler(new Handler(){
        @Override
        public void onAttachOrDetach(AttachEvent event) {
            if( jso == null ) jso = create();
        }
    });

}
项目:teiid-webui    文件:NotificationWidget.java   
/**
 * @see org.jboss.datavirt.ui.client.local.events.MouseOutEvent.HasMouseOutHandlers#addMouseOutHandler(org.jboss.datavirt.ui.client.local.events.MouseOutEvent.Handler)
 */
@Override
public HandlerRegistration addMouseOutHandler(
        org.teiid.webui.client.events.MouseOutEvent.Handler handler) {
    return addHandler(handler, MouseOutEvent.getType());
}
项目:teiid-webui    文件:NotificationWidget.java   
/**
 * @see org.jboss.datavirt.ui.client.local.events.MouseInEvent.HasMouseInHandlers#addMouseInHandler(org.jboss.datavirt.ui.client.local.events.MouseInEvent.Handler)
 */
@Override
public HandlerRegistration addMouseInHandler(
        org.teiid.webui.client.events.MouseInEvent.Handler handler) {
    return addHandler(handler, MouseInEvent.getType());
}
项目:rtgov-ui    文件:NotificationWidget.java   
/**
 * @see org.overlord.dtgov.ui.client.local.events.MouseOutEvent.HasMouseOutHandlers#addMouseOutHandler(org.overlord.dtgov.ui.client.local.events.MouseOutEvent.Handler)
 */
@Override
public HandlerRegistration addMouseOutHandler(
        org.overlord.rtgov.ui.client.local.events.MouseOutEvent.Handler handler) {
    return addHandler(handler, MouseOutEvent.getType());
}
项目:rtgov-ui    文件:NotificationWidget.java   
/**
 * @see org.overlord.HasTableSortHandlers.ui.client.local.events.MouseInEvent.HasMouseInHandlers#addTableSortHandler(org.overlord.dtgov.ui.client.local.events.MouseInEvent.Handler)
 */
@Override
public HandlerRegistration addMouseInHandler(
        org.overlord.rtgov.ui.client.local.events.MouseInEvent.Handler handler) {
    return addHandler(handler, MouseInEvent.getType());
}
项目:dtgov    文件:NotificationWidget.java   
/**
 * @see org.overlord.dtgov.ui.client.local.events.MouseOutEvent.HasMouseOutHandlers#addMouseOutHandler(org.overlord.dtgov.ui.client.local.events.MouseOutEvent.Handler)
 */
@Override
public HandlerRegistration addMouseOutHandler(
        org.overlord.dtgov.ui.client.local.events.MouseOutEvent.Handler handler) {
    return addHandler(handler, MouseOutEvent.getType());
}
项目:dtgov    文件:NotificationWidget.java   
/**
 * @see org.overlord.dtgov.ui.client.local.events.MouseInEvent.HasMouseInHandlers#addMouseInHandler(org.overlord.dtgov.ui.client.local.events.MouseInEvent.Handler)
 */
@Override
public HandlerRegistration addMouseInHandler(
        org.overlord.dtgov.ui.client.local.events.MouseInEvent.Handler handler) {
    return addHandler(handler, MouseInEvent.getType());
}
项目:rtgov-ui    文件:IMouseInOutWidget.java   
/**
 * Adds an attach handler to the widget.
 * @param handler
 */
public HandlerRegistration addAttachHandler(Handler handler);
项目:dtgov    文件:IMouseInOutWidget.java   
/**
 * Adds an attach handler to the widget.
 * @param handler
 */
public HandlerRegistration addAttachHandler(Handler handler);