本文整理了Java中javax.swing.JTextArea.setToolTipText()
方法的一些代码示例,展示了JTextArea.setToolTipText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setToolTipText()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setToolTipText
暂无
代码示例来源:origin: geotools/geotools
public boolean validate() {
WKTReader reader = new WKTReader();
String wkt = text.getText();
if (wkt.length() == 0) {
return true;
}
try {
Geometry geom = reader.read(wkt);
if (parameter.type.isInstance(geom)) {
text.setToolTipText(null);
text.setForeground(Color.BLACK);
return true;
} else {
text.setToolTipText("Could not use " + geom.getClass() + " as " + parameter.type);
text.setForeground(Color.RED);
return false;
}
} catch (Throwable eek) {
text.setToolTipText(eek.getLocalizedMessage());
text.setForeground(Color.RED);
return false;
}
}
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
public void customise(JTable table, JTextArea component, String value, int rowIndex, int colIndex) {
component.setToolTipText(value);
}
}
代码示例来源:origin: bcdev/beam
@Override
public void customise(JTable table, JTextArea component, String value, int rowIndex, int colIndex) {
component.setToolTipText(value);
}
}
代码示例来源:origin: org.apache.jmeter/jorphan
/**
* Registers the text to display in a tool tip.
* The text displays when the cursor lingers over the component.
* @param text the string to display; if the text is null,
* the tool tip is turned off for this component
*/
@Override
public void setToolTipText(String text) {
mTextArea.setToolTipText(text);
}
代码示例来源:origin: protegeproject/protege
private void displayErrorMessage(String message) {
messageLabel.setText(message);
messageLabel.setForeground(Color.RED);
annotationContent.setToolTipText(message);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
private void displayErrorMessage(String message) {
messageLabel.setText(message);
messageLabel.setForeground(Color.RED);
annotationContent.setToolTipText(message);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
private void clearErrorMessage() {
messageLabel.setText("");
messageLabel.setForeground(null);
annotationContent.setToolTipText(null);
annotationContent.setForeground(null);
}
代码示例来源:origin: protegeproject/protege
private void clearErrorMessage() {
messageLabel.setText("");
messageLabel.setForeground(null);
annotationContent.setToolTipText(null);
annotationContent.setForeground(null);
}
代码示例来源:origin: RPTools/maptool
private void initCommandTextArea() {
// Need to get rid of the tooltip, but abeille can't set it back to null, so we'll do it manually
getCommandTextArea().setToolTipText(null);
}
代码示例来源:origin: LibraryOfCongress/bagger
private JScrollPane createConsoleArea() {
serializedArea = new JTextArea();
serializedArea.setToolTipText(ApplicationContextUtil.getMessage("consolepane.msg.help"));
serializedArea.setEditable(false);
serializedArea.setLineWrap(true);
serializedArea.setBackground(textBackground);
serializedArea.setWrapStyleWord(true);
serializedArea.setAutoscrolls(true);
serializedArea.setBorder(BorderFactory.createLineBorder(Color.black));
return new JScrollPane(serializedArea);
}
代码示例来源:origin: otros-systems/otroslogviewer
private void addTooltips() {
file.setToolTipText("File used to store this marker");
name.setToolTipText("Name of this marker, will be displayed in menus, list etc..");
type.setToolTipText("Choose if you want to mark events based on simple test for containing string or more sophisticated with regular expressions.");
description.setToolTipText("Description will be used as tooltip for this marker.");
groups.setToolTipText("Enter comma sperated groups name, markers will be grouped in menus.");
colors.setToolTipText("Marker will highlight event with selected color.");
ignoreCase.setToolTipText("String/regex matching will be case insensitive.");
stringMatcherConditionM.setToolTipText("String to look for.");
stringConditionInclude.setToolTipText("Will match events that message contains or does not contain this string.");
regexMatcherCondition.setToolTipText("Regular expression to match.");
regexPreCondition
.setToolTipText("Part of string from regular expression for increase performance. For example if you regular exrepssion is \".*return: \\d+\" set precondition to \"return\".");
regexPreConditionInclude.setToolTipText("Disable if you want to mark rows that does not contains precondition value.");
for (JTextArea aTestStringTextArea : testStringTextArea) {
aTestStringTextArea.setToolTipText("Enter part of log message to test if marker works as you want.");
}
}
代码示例来源:origin: org.geotools/gt-widgets-swing-pending
public boolean validate() {
String txt = text.getText();
if (txt.length() == 0) {
return true;
}
Object value = Converters.convert(txt, parameter.type);
if (value == null) {
text.setToolTipText( "Could not create "+parameter.type );
text.setForeground(Color.RED);
return false;
} else {
text.setToolTipText(null);
text.setForeground(Color.BLACK);
return true;
}
}
代码示例来源:origin: org.geotools/gt-swing
public boolean validate() {
WKTReader reader = new WKTReader();
String wkt = text.getText();
if (wkt.length() == 0) {
return true;
}
try {
Geometry geom = reader.read(wkt);
if (parameter.type.isInstance(geom)) {
text.setToolTipText(null);
text.setForeground(Color.BLACK);
return true;
} else {
text.setToolTipText("Could not use " + geom.getClass() + " as " + parameter.type);
text.setForeground(Color.RED);
return false;
}
} catch (Throwable eek) {
text.setToolTipText(eek.getLocalizedMessage());
text.setForeground(Color.RED);
return false;
}
}
代码示例来源:origin: org.geotools/gt-widgets-swing-pending
public boolean validate() {
WKTReader reader = new WKTReader();
String wkt = text.getText();
if( wkt.length() == 0 ){
return true;
}
try {
Geometry geom = reader.read( wkt );
if( parameter.type.isInstance( geom )){
text.setToolTipText( null );
text.setForeground( Color.BLACK );
return true;
}
else {
text.setToolTipText( "Could not use "+geom.getClass()+" as "+parameter.type );
text.setForeground( Color.RED );
return false;
}
}
catch (Throwable eek ){
text.setToolTipText( eek.getLocalizedMessage() );
text.setForeground( Color.RED );
return false;
}
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
customPopupCode.setRows(5);
customPopupCode.setText("// this script will be executed when the popup menu item was chosen\n// this code could as well be executed using the console\n// here is a number of code snippets to give you a start\n\np = new PathParser(\n\tgetActiveGraph(),\n\tnew DelimitedFileReader(\"D:/workspace/core/data/importdata/Uniprot2AGI.tab\", \" \"));\np.newConceptPrototype(\n\tdefCC(\"Protein\"),\n\tdefAccession(0, \"UNIPROTKB\"),\n\tdefAccession(1, \"TAIR\"));\np.setProcessingOptions();\n\n// receive the set of selected nodes and edges and read their GDS\nconcept = getPickedConcepts().toArray()[0];\nname = getActiveGraph().getMetaData().getAttributeName(\"TAXID\");\nconcept.getGDS(name.unwrap()).getValue();"); // NOI18N
customPopupCode.setToolTipText("Use JavaScript. See scripting_ref.htm for a reference.");
customPopupCode.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
代码示例来源:origin: senbox-org/snap-desktop
private JPanel createFreeSearchPanel() {
final JPanel freeSearchPanel = new JPanel(new GridBagLayout());
freeSearchPanel.setBorder(BorderFactory.createTitledBorder("Metadata SQL Query"));
final GridBagConstraints gbc = DialogUtils.createGridBagConstraints();
freeSearchPanel.add(metadataNameCombo, gbc);
metadataNameCombo.setPrototypeDisplayValue("123456789012");
final String[] metadataNames = MetadataTable.getAllMetadataNames();
for (String name : metadataNames) {
metadataNameCombo.insertItemAt(name, metadataNameCombo.getItemCount());
}
gbc.gridx = 1;
freeSearchPanel.add(metdataValueField, gbc);
metdataValueField.setColumns(10);
gbc.gridx = 2;
freeSearchPanel.add(addMetadataButton, gbc);
gbc.gridy++;
gbc.gridx = 0;
gbc.gridwidth = 2;
freeSearchPanel.add(metadataArea, gbc);
metadataArea.setBorder(new LineBorder(Color.BLACK));
metadataArea.setLineWrap(true);
metadataArea.setRows(4);
metadataArea.setToolTipText("Use AND,OR,NOT and =,<,>,<=,>-");
gbc.gridx = 2;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
DialogUtils.fillPanel(freeSearchPanel, gbc);
return freeSearchPanel;
}
代码示例来源:origin: comtel2000/fx-experience
public void init() {
KeyBoardWindow window =
KeyBoardWindowBuilder.create().initLocale(Locale.forLanguageTag("en")).addIRobot(new AWTRobotHandler()).layer(DefaultLayer.NUMBLOCK).build();
KeyboardUIManagerTool.installKeyboardDefaults(window);
JPanel panel = new JPanel();
panel.setPreferredSize(new Dimension(800, 400));
FlowLayout layout = new FlowLayout(FlowLayout.LEADING, 20, 20);
panel.setLayout(layout);
panel.add(new JTextField(70));
JTextField numbers = new JTextField("0-9", 70);
numbers.setToolTipText("0-9");
// set numeric kb type
numbers.getDocument().putProperty(VK_TYPE, VK_TYPE_NUMERIC);
panel.add(numbers);
panel.add(new JPasswordField(70));
JTextArea area = new JTextArea(4, 70);
area.setToolTipText("switch to Locale 'de'");
// set text area to german locale
area.getDocument().putProperty(VK_LOCALE, VK_LOCALE_DE);
panel.add(area);
panel.add(new JEditorPane());
panel.add(new JSeparator());
panel.add(new JButton("Ok"));
panel.add(new JButton("Cancel"));
setLayout(new BorderLayout());
add(panel, BorderLayout.CENTER);
}
代码示例来源:origin: kaikramer/keystore-explorer
jtaFingerprint.setToolTipText(MessageFormat.format(
res.getString("DViewCertificateFingerprint.jtaFingerprint.tooltip"), fingerprintAlg.friendly()));
代码示例来源:origin: kaikramer/keystore-explorer
jtaPolicy.setToolTipText(res.getString("DViewJcePolicy.jtaPolicy.tooltip"));
代码示例来源:origin: realXuJiang/bigtable-sql
"ColumnDetailsDialog.columnCommentToolTip",
dbName);
commentTextArea.setToolTipText(noColumnSupportMsg);
} else {
commentTextArea.setEditable(true);
commentTextArea.setToolTipText(null);
内容来源于网络,如有侵权,请联系作者删除!