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


Java JXHyperlink.setText方法代码示例

本文整理汇总了Java中org.jdesktop.swingx.JXHyperlink.setText方法的典型用法代码示例。如果您正苦于以下问题:Java JXHyperlink.setText方法的具体用法?Java JXHyperlink.setText怎么用?Java JXHyperlink.setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jdesktop.swingx.JXHyperlink的用法示例。


在下文中一共展示了JXHyperlink.setText方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openSurveyNotes

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private void openSurveyNotes(File file) {
	if (file == null || !file.exists()) {
		JXHyperlink searchDirsLink = new JXHyperlink(editSurveyScanPathsAction);
		searchDirsLink.setText("search directories");

		JPanel message = new JPanel(new FlowLayout());
		message.add(new JLabel("Couldn't find the file '" + file + "' in any of your "));
		message.add(searchDirsLink);
		message.add(new JLabel("(note: Breakout only searches " + SCANNED_NOTES_SEARCH_DEPTH +
				" levels deep)."));

		JOptionPane.showMessageDialog(mainPanel, message, "Can't find file", JOptionPane.ERROR_MESSAGE);

		return;
	}
	try {
		Desktop.getDesktop().open(file);
	} catch (Exception e) {
		logger.log(Level.SEVERE, "Failed to open survey notes", e);
		JOptionPane.showMessageDialog(mainPanel, "Failed to open file '" + file + "': " + e,
				"Error", JOptionPane.ERROR_MESSAGE);
	}
}
 
开发者ID:jedwards1211,项目名称:breakout,代码行数:24,代码来源:BreakoutMainView.java

示例2: RowsCountComponent

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
public RowsCountComponent() {
    LC lc = new LC();
    lc.hideMode(2);
    lc.insetsAll("2");

    layout = new MigLayout(lc);
    if (LayoutAdapter.isDebug()) {
        lc.debug(1000);
    }
    setLayout(layout);

    firstButton = new JButton("<<");
    add(firstButton);
    firstButton.setPreferredSize(size);
    firstButton.setMinimumSize(size);

    prevButton = new JButton("<");
    add(prevButton);
    prevButton.setPreferredSize(size);
    prevButton.setMinimumSize(size);

    label = new JLabel();
    label.setMinimumSize(size);
    add(label);

    countButton = new JXHyperlink();
    countButton.setText("[?]");
    add(countButton);

    nextButton = new JButton(">");
    add(nextButton);
    nextButton.setPreferredSize(size);
    nextButton.setMinimumSize(size);

    lastButton = new JButton(">>");
    add(lastButton);
    lastButton.setPreferredSize(size);
    lastButton.setMinimumSize(size);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:40,代码来源:DesktopRowsCount.java

示例3: createHistoryLink

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private JXHyperlink createHistoryLink(final DataBean data) {
	JXHyperlink link = new JXHyperlink();
	link.setText("Analysis history");
	link.addActionListener(new ActionListener() {		
		@Override
		public void actionPerformed(ActionEvent e) {				
			application.showHistoryScreenFor(data);
		}
	});
	return link;		
}
 
开发者ID:chipster,项目名称:chipster,代码行数:12,代码来源:DataDetails.java

示例4: createLink

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
public static JXHyperlink createLink(String text, Action action) {
	JXHyperlink link = new JXHyperlink();
	link.setBorder(null);
	link.setMargin(new Insets(0, 0, 0, 0));
	link.setAction(action);
	link.setText(text); // must be after setAction
	return link;
}
 
开发者ID:chipster,项目名称:chipster,代码行数:9,代码来源:LinkUtil.java

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

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

示例6: initLink

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private void initLink(JXHyperlink link, String linkText, String linkName) {
    link.setURI(URI.create(linkText));
    link.setText(linkName);
}
 
开发者ID:Microsoft,项目名称:Azure-Toolkit-for-IntelliJ,代码行数:5,代码来源:ApplicationInsightsPanel.java

示例7: initLink

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private void initLink(JXHyperlink link, String linkText) {
    link.setURI(URI.create(linkText));
    link.setText(message("lblLearnMore"));
}
 
开发者ID:Microsoft,项目名称:Azure-Toolkit-for-IntelliJ,代码行数:5,代码来源:KeyFeaturesStep.java

示例8: createVisualisations

import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private Component createVisualisations() {
	JPanel panel = getPanelBase("wrap 1");
	
	List<VisualisationMethod> visualisations = VisualisationToolBar.getMethodsFor(datas);
		
	for (VisualisationMethod method : visualisations) {

		JXHyperlink link = new JXHyperlink();
		
		link.setBackground(new Color(0.95f, 0.95f, 0.95f));					
		
		link.addMouseListener(new LinkMouseListener(link));
		//hide focus border because it doesn't obey component size
		link.setFocusPainted(false);

		link.setIcon(method.getIcon());
		link.setIconTextGap(16);
		link.addActionListener(new VisualisationStarter(method, Session.getSession().getApplication()));
		link.setText(method.getName());
		
		panel.add(link, "width 300!, height 50!");
		
		focusableLinks.add(link);
	}
	
	return panel;
}
 
开发者ID:chipster,项目名称:chipster,代码行数:28,代码来源:DataDetails.java


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