本文整理匯總了Java中com.google.gwt.event.shared.HandlerManager.fireEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java HandlerManager.fireEvent方法的具體用法?Java HandlerManager.fireEvent怎麽用?Java HandlerManager.fireEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.event.shared.HandlerManager
的用法示例。
在下文中一共展示了HandlerManager.fireEvent方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setData
import com.google.gwt.event.shared.HandlerManager; //導入方法依賴的package包/類
private void setData(String dataName, String data) {
String oldData = getObjectString(dataName);
if (oldData == null || !data.equals(oldData)) {
String dataNamePath = buildPathString(dataName);
try {
if (dataStore != null) {
dataStore.removeItem(dataNamePath);
dataStore.setItem(dataNamePath, data);
} else {
Cookies.setCookie(dataNamePath, data, new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 365 * 100)));
}
} catch (Exception e) {}
HandlerManager eventBus = ConsoleUnitEventManager.getInstance().getEventBus();
BindingDataChangeEvent event = new BindingDataChangeEvent(dataName);
eventBus.fireEvent(event);
}
}
示例2: FolderSelectionWidget
import com.google.gwt.event.shared.HandlerManager; //導入方法依賴的package包/類
public FolderSelectionWidget(final Map<String, String> batchClassesNameMap, final HandlerManager eventBus) {
super();
initWidget(BINDER.createAndBindUi(this));
mainPanel.addStyleName(FolderManagementConstants.OPTIONS_BOX);
batchClassSelectionListBox.setWidth(_150PX);
batchClassSelectionListBox.addStyleName(FolderManagementConstants.CUSTOM_LIST_BOX);
if (null != batchClassesNameMap && !batchClassesNameMap.isEmpty()) {
Set<Entry<String, String>> entrySet = batchClassesNameMap.entrySet();
for (Entry<String, String> entry : entrySet) {
batchClassSelectionListBox.addItem(entry.getKey());
}
fireEventForFolderSelection(batchClassesNameMap, eventBus);
batchClassSelectionListBox.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
fireEventForFolderSelection(batchClassesNameMap, eventBus);
}
});
} else {
eventBus.fireEvent(new BatchClassChangeEvent());
}
}
示例3: fireEventForFolderSelection
import com.google.gwt.event.shared.HandlerManager; //導入方法依賴的package包/類
private void fireEventForFolderSelection(final Map<String, String> batchClassesNameMap, final HandlerManager eventBus) {
String itemText = batchClassSelectionListBox.getItemText(batchClassSelectionListBox.getSelectedIndex());
if (eventBus != null) {
eventBus.fireEvent(new BatchClassChangeEvent(itemText, batchClassesNameMap.get(itemText)));
}
}