本文整理汇总了Java中org.jdesktop.swingx.JXHyperlink.setOpaque方法的典型用法代码示例。如果您正苦于以下问题:Java JXHyperlink.setOpaque方法的具体用法?Java JXHyperlink.setOpaque怎么用?Java JXHyperlink.setOpaque使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXHyperlink
的用法示例。
在下文中一共展示了JXHyperlink.setOpaque方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
/**
* Configures internally used hyperlink on new action creation and on every call to
* <code>updateUI()</code>.
* @param link Configured hyperlink.
*/
protected void configure(JXHyperlink link) {
link.setOpaque(false);
link.setBorderPainted(false);
link.setFocusPainted(true);
link.setForeground(UIManager.getColor("TaskPane.titleForeground"));
}
示例2: 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);
}