本文整理汇总了Java中org.jdesktop.swingx.JXHyperlink.setFocusable方法的典型用法代码示例。如果您正苦于以下问题:Java JXHyperlink.setFocusable方法的具体用法?Java JXHyperlink.setFocusable怎么用?Java JXHyperlink.setFocusable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXHyperlink
的用法示例。
在下文中一共展示了JXHyperlink.setFocusable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResearchGroupPanel
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private static JPanel getResearchGroupPanel(ResearchGroup group) {
final JPanel toret = new JPanel();
toret.setLayout(new BoxLayout(toret, BoxLayout.Y_AXIS));
toret.setAlignmentX(CENTER_ALIGNMENT);
toret.setBorder(BorderFactory.createEmptyBorder(7, 7, 7, 7));
final JLabel lblLogo = new JLabel(
group.getLogo(), SwingConstants.CENTER);
final JXHyperlink link = new JXHyperlink(
new URLLinkAction(group.getLink()));
link.setHorizontalAlignment(SwingConstants.CENTER);
link.setFocusable(false);
fixSize(lblLogo, FRAME_WIDTH, IMAGE_HEIGHT);
Stream.of(group.getDescription()).forEach(
label -> fixSize(label, FRAME_WIDTH, LINE_HEIGHT));
fixSize(link, FRAME_WIDTH, LINE_HEIGHT);
toret.add(lblLogo);
Stream.of(group.getDescription()).forEach(toret::add);
toret.add(link);
lblLogo.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
AboutFrame.openURL(group.getLink());
}
});
return toret;
}
示例2: createZoomLink
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private JXHyperlink createZoomLink() {
JXHyperlink zoomOutLink = new JXHyperlink();
Color textColor = new Color(16, 66, 104);
zoomOutLink.setUnclickedColor(textColor);
zoomOutLink.setClickedColor(textColor);
zoomOutLink.setFocusable(false);
return zoomOutLink;
}
示例3: createNavigationButton
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private AbstractButton createNavigationButton() {
JXHyperlink b = new JXHyperlink();
b.setContentAreaFilled(false);
b.setBorder(BorderFactory.createEmptyBorder());
b.setRolloverEnabled(true);
b.setFocusable(false);
return b;
}
示例4: configure
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
@Override
protected void configure(JXHyperlink link)
{
super.configure(link);
link.setForeground(uiSubClassHelper.getColor("TaskPane.titleForeground", link.getForeground()));
link.setFocusable(false);
}
示例5: CollapsiblePanel
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
/**
*
* @param title
*/
public CollapsiblePanel(final String title)
{
final LayoutManager mgr = new VerticalLayout();
setLayout(mgr);
setOpaque(true);
setBackground(Color.WHITE);
final SeparatorBorder separatorBorder = new SeparatorBorder();
setTitleForegroundColor(AdempierePLAF.getColor("black", Color.BLACK));
setTitleBackgroundColor(new Color(248, 248, 248));
setSeparatorColor(new Color(214, 223, 247));
collapsible = new JXCollapsiblePane();
// collapsible.getContentPane().setBackground(AdempierePLAF.getFormBackground());
collapsible.setBorder(new CompoundBorder(separatorBorder, collapsible.getBorder()));
collapsible.setAnimated(UIManager.getBoolean("TaskPane.animate"));
this.toggleAction = collapsible.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION);
// use the collapse/expand icons from the JTree UI
toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager.getIcon("Tree.expandedIcon"));
toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager.getIcon("Tree.collapsedIcon"));
link = new JXHyperlink();
link.setAction(toggleAction);
link.setText(title);
link.setOpaque(true);
link.setBackground(getTitleBackgroundColor());
link.setFocusPainted(false);
link.setFocusable(false); // there is no point to have the link focusable, user will always click on it
link.setUnclickedColor(getTitleForegroundColor());
link.setClickedColor(getTitleForegroundColor());
link.setBorder(new CompoundBorder(separatorBorder, BorderFactory.createEmptyBorder(2, 4, 2, 4)));
link.setBorderPainted(true);
super.add(link);
super.add(collapsible);
}