📄 graphcomponent.java
字号:
/* * $Id: GraphComponent.java,v 1.3 2004/11/14 07:33:13 tcfujii Exp $ *//* * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */package components.components;import components.model.Graph;import components.model.Node;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import javax.faces.component.UICommand;import javax.faces.context.FacesContext;import javax.faces.event.ActionEvent;/** * Component wrapping a {@link Graph} object that is pointed at by the * a value binding reference expression. This component supports * the processing of a {@link ActionEvent} that will toggle the expanded * state of the specified {@link Node} in the {@link Graph}. */public class GraphComponent extends UICommand { private static Log log = LogFactory.getLog(GraphComponent.class); public GraphComponent() { // set a default actionListener to expand or collapse a node // when a node is clicked. Class signature[] = {ActionEvent.class}; setActionListener(FacesContext.getCurrentInstance().getApplication() .createMethodBinding( "#{GraphBean.processGraphEvent}", signature)); } /** * <p>Return the component family for this component.</p> */ public String getFamily() { return ("Graph"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -