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()); } }); }
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()); } }); }
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(); } } }); }
/** * 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); } } }); }
/** * 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); } } }); }
@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; }
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(); } } }); }
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(); } } }); }
/** * 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); } } }); }
/** * 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(); } } }); }
/** * 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); } }); }
/** * 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); } }); }
/** * 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); } }); }
/** * 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); } }); }
/** * 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); } }); }
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); }
/** * 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; }
/** * Constructor. */ public SourceEditor() { setElement(Document.get().createDivElement()); addAttachHandler(new Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (event.isAttached()) { initEditor(); } else { destroyEditor(); } } }); }
/** * 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); } } }); }
/** * Called after construction. */ @PostConstruct protected void postContruct() { addAttachHandler(new Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (event.isAttached()) { doAttachInit(); } } }); }
/** * Constructor. */ public AsyncActionButton() { addAttachHandler(new Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (event.isAttached()) { initFromTemplate(); } } }); }
/** * 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(); } }); }
/** * @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()); }
/** * @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()); }
/** * @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()); }
/** * @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()); }
/** * @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()); }
/** * @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()); }
/** * Adds an attach handler to the widget. * @param handler */ public HandlerRegistration addAttachHandler(Handler handler);