cab2bhyperlink.java

来自「Document will be uploaded soon」· Java 代码 · 共 73 行

JAVA
73
字号
package com.component;

import javax.swing.Action;

import org.jdesktop.swingx.JXHyperlink;

/**
 * By Default Cab2bHyperlink is underlined, unlike JXHyperlink,
 * where hyperlinks are underlined only on mouse over.
 * 
 * To get JXHyperlink behaviour in Cab2bHyperlink call Cab2bHyperlink constructors
 * with isHyperlinkUnderlined boolean set to false. 
 * 
 * @author chetan_bh
 *
 */
public class Cab2bHyperlink extends JXHyperlink
{
    /**
     * User object associated with this hyperlink.
     */
    private Object userObject = null;
    
	public Cab2bHyperlink()
	{
		super();
		this.setUI(new Cab2bHyperlinkUI());
	}
	
	public Cab2bHyperlink(boolean isHyperlinkUnderlined)
	{
		super();
		if(isHyperlinkUnderlined)
			this.setUI(new Cab2bHyperlinkUI());
	}
	
	public Cab2bHyperlink(Action action)
	{
		super(action);
		this.setUI(new Cab2bHyperlinkUI());
	}
	
	public Cab2bHyperlink(Action action, boolean isHyperlinkUnderlined)
	{
		super(action);
		if(isHyperlinkUnderlined)
			this.setUI(new Cab2bHyperlinkUI());
	}
	
	/**
	 * Returns user object associated with this hyperlink.
	 */
	public Object getUserObject()
	{
		return userObject;
	}
	
	/**
	 * Sets the user object.
	 */
	public void setUserObject(Object userObject)
	{
		this.userObject = userObject;
	}
	
	
	public static void main(String[] args)
	{
		
	}

}

⌨️ 快捷键说明

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