本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例7: initLink
import org.jdesktop.swingx.JXHyperlink; //导入方法依赖的package包/类
private void initLink(JXHyperlink link, String linkText) {
link.setURI(URI.create(linkText));
link.setText(message("lblLearnMore"));
}
示例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;
}