本文整理汇总了Java中com.google.gwt.event.logical.shared.AttachEvent.Handler类的典型用法代码示例。如果您正苦于以下问题:Java Handler类的具体用法?Java Handler怎么用?Java Handler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Handler类属于com.google.gwt.event.logical.shared.AttachEvent包,在下文中一共展示了Handler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OwnerJobTrend
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
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());
}
});
}
示例2: RunningJobTrend
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
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());
}
});
}
示例3: ArchiveEntryImagePanel
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
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();
}
}
});
}
示例4: postConstruct
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
}
});
}
示例5: postConstruct
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
}
});
}
示例6: createFieldWidget
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
@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;
}
示例7: updateVerticalScrollGridDelegation
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
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();
}
}
});
}
示例8: updateVerticalScrollTableDelegation
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
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();
}
}
});
}
示例9: postConstruct
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
}
});
}
示例10: TimeSlider
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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();
}
}
});
}
示例11: AttributeInspector
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
});
}
示例12: Editor
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
});
}
示例13: Legend
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
});
}
示例14: TemplatePicker
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
});
}
示例15: BasemapGallery
import com.google.gwt.event.logical.shared.AttachEvent.Handler; //导入依赖的package包/类
/**
* 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);
}
});
}