当前位置: 首页>>代码示例>>Java>>正文


Java Event.getData方法代码示例

本文整理汇总了Java中org.zkoss.zk.ui.event.Event.getData方法的典型用法代码示例。如果您正苦于以下问题:Java Event.getData方法的具体用法?Java Event.getData怎么用?Java Event.getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.zkoss.zk.ui.event.Event的用法示例。


在下文中一共展示了Event.getData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEditPlayer

import org.zkoss.zk.ui.event.Event; //导入方法依赖的package包/类
public void onEditPlayer(Event e){
	Player oldPlayer = (Player) e.getData();
	
	
	if(Executions.getCurrent().getBrowser("mobile") !=null || Executions.getCurrent().getUserAgent().indexOf("Phone")!=-1){
		execution.setAttribute("oldPlayer", oldPlayer);
		Executions.sendRedirect("/pages/add_player_mobile.zul");
	} else {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("oldPlayer", oldPlayer);
		Window window = (Window) Executions.createComponents("add_player.zul", null, map);
		window.doModal();
	}

	onPlayerChange();
	page.removeAttribute("oldPlayer");
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:18,代码来源:IndexComposer.java

示例2: onEditGame

import org.zkoss.zk.ui.event.Event; //导入方法依赖的package包/类
public void onEditGame(Event e){
	
	Game game = (Game) e.getData();
	
	if(game != null) {
		Tournament tournament = (Tournament) session.getAttribute("tournament");

		round.challenges.add(game);
		tournament.roundsList.remove(round);
		List<Player> toMatch = new ArrayList<Player>();
		toMatch.addAll(tournament.players);
		for(Game g : round.challenges){
			toMatch.remove(g.player1);
			toMatch.remove(g.player2);
		}
		round = MatchingUtils.doSingleMatch(tournament.rounds, tournament.roundsList, toMatch, round.challenges);
		tournament.roundsList.add(round);
	}
	gridRound.setModel(new SimpleListModel<Game>(round.games));
	gridRound.renderAll();
	gridRound.invalidate();
	binder.loadAll();
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:24,代码来源:SingleRoundComposer.java

示例3: mostrarPropiedadesElemento

import org.zkoss.zk.ui.event.Event; //导入方法依赖的package包/类
/**
 * Seleccion elemento en iframe.
 * 
 * @param event
 *            Par�metro event
 */
public final void onSelect$iframeContenedorHTML(final Event event) {
    final Event origin = ((ForwardEvent) event).getOrigin();
    final String id = (String) origin.getData();
    
    mostrarPropiedadesElemento(id) ;
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:13,代码来源:DisenyoFormularioWModal.java

示例4: onEvent

import org.zkoss.zk.ui.event.Event; //导入方法依赖的package包/类
@Override
public void onEvent(Event event) {
    List<DataTableSelection> coords = new ArrayList<>();
    Object data = event.getData();
    if (data instanceof Object[]) {
        coords.addAll(getCoordinates((Object[]) data));
    } else {
        coords.add(getCoordinates(data));
    }
    Events.sendEvent(new DataTableSelectionEvent(eventName, event.getTarget(), coords));
}
 
开发者ID:connollyst,项目名称:zkgooglecharts,代码行数:12,代码来源:DataTableEventListener.java

示例5: onDeletePlayer

import org.zkoss.zk.ui.event.Event; //导入方法依赖的package包/类
public void onDeletePlayer(Event e){
	Player p = (Player) e.getData();
	Tournament tournament = (Tournament) session.getAttribute("tournament");
	tournament.players.remove(p);
	tournament.playersCount--;
	session.setAttribute("tournament", tournament);
	playersList.renderAll();
	binder.loadAll();
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:10,代码来源:IndexComposer.java


注:本文中的org.zkoss.zk.ui.event.Event.getData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。