graphcomponent.java

来自「一个java写的加密算法」· Java 代码 · 共 57 行

JAVA
57
字号
/* * $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 + =
减小字号Ctrl + -
显示快捷键?