⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xjbutton.java

📁 OPIAM stands for Open Identity and Access Management. This Suite will provide modules for user & rig
💻 JAVA
字号:
/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.service.services.views.orgchart;

import java.util.Hashtable;

import javax.swing.JButton;
import javax.swing.tree.DefaultMutableTreeNode;


/*
 * Patch 2569 : nettoyage de code
 */

/**
 * This class implements an organization chart node.
 * This is merely a JButton with an associated node.
 */
public class XJButton extends JButton
{
    /** node associated with the button. */
    private DefaultMutableTreeNode node = null;

    /** parent orgchart object. */
    private OrgChartPanel parent;

    /**
     * Creates a new XJButton object.
     *
     * @param anode  Associated node.
     * @param aparent  Associated orgchart.
     */
    public XJButton(final DefaultMutableTreeNode anode,
        final OrgChartPanel aparent)
    {
        node = anode;

        parent = aparent;
        setBorderPainted(false);
    }

    /**
     * Converts the object to a String representation.
     *
     * @return String representation of the object.
     */
    public final String toString()
    {
        Hashtable info = (Hashtable) node.getUserObject();

        return (String) info.get(OrgChartPanel.NAME);
    }

    /**
     * Gets associated node.
     *
     * @return  The associated node.
     */
    public final DefaultMutableTreeNode getNode()
    {
        return node;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -