📄 cab2bhyperlink.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -