当前位置: 首页>>代码示例>>Java>>正文


Java JXHyperlink.setClickedColor方法代码示例

本文整理汇总了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;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:9,代码来源:BasicCalendarHeaderHandler.java

示例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);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:32,代码来源:BasicHyperlinkUI.java

示例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);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:11,代码来源:DateRangeDatePicker.java

示例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);

}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:46,代码来源:CollapsiblePanel.java


注:本文中的org.jdesktop.swingx.JXHyperlink.setClickedColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。