本文整理汇总了Java中org.jdesktop.swingx.JXHyperlink.setClickedColor方法的典型用法代码示例。如果您正苦于以下问题:Java JXHyperlink.setClickedColor方法的具体用法?Java JXHyperlink.setClickedColor怎么用?Java JXHyperlink.setClickedColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXHyperlink
的用法示例。
在下文中一共展示了JXHyperlink.setClickedColor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: installDefaults
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
@Override
protected void installDefaults(AbstractButton b) {
super.installDefaults(b);
JXHyperlink link = (JXHyperlink) b;
LookAndFeel.installProperty(b, "opaque", false);
if (SwingXUtilities.isUIInstallable(link.getUnclickedColor())) {
link.setUnclickedColor(UIManager.getColor("Hyperlink.linkColor"));
}
if (SwingXUtilities.isUIInstallable(link.getClickedColor())) {
link.setClickedColor(UIManager.getColor("Hyperlink.visitedColor"));
}
b.setBorderPainted(false);
b.setRolloverEnabled(true);
if (SwingXUtilities.isUIInstallable(b.getBorder())) {
b.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 1, 0, 0)));
}
dashedRectGapX = UIManager.getInt("ButtonUI.dashedRectGapX");
dashedRectGapY = UIManager.getInt("ButtonUI.dashedRectGapY");
dashedRectGapWidth = UIManager.getInt("ButtonUI.dashedRectGapWidth");
dashedRectGapHeight = UIManager.getInt("ButtonUI.dashedRectGapHeight");
focusColor = UIManager.getColor("ButtonUI.focus");
b.setHorizontalAlignment(SwingConstants.LEADING);
}
示例3: TodayPanel
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
TodayPanel() {
super(new FlowLayout());
//setDrawGradient(true);
//setGradientPaint(new GradientPaint(0, 0, new Color(238, 238, 238), 0, 1, Color.WHITE));
JXHyperlink todayLink = new JXHyperlink(new TodayAction());
Color textColor = new Color(16, 66, 104);
todayLink.setUnclickedColor(textColor);
todayLink.setClickedColor(textColor);
add(todayLink);
}
示例4: 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);
}