本文整理了Java中javax.swing.JTable.setToolTipText()
方法的一些代码示例,展示了JTable.setToolTipText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setToolTipText()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setToolTipText
暂无
代码示例来源:origin: stackoverflow.com
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column)
{
Point pointInTable = MouseInfo.getPointerInfo().getLocation();
SwingUtilities.convertPointFromScreen(pointInTable, table);
Rectangle r = table.getCellRect(row, column, false);
Point p = new Point(pointInTable.x - r.x, pointInTable.y - r.y);
table.setToolTipText(p.toString());
return renderer;
}
代码示例来源:origin: Baralga/baralga
@Override
public void valueChanged(final ListSelectionEvent event) {
if (table.getSelectedRows() == null) {
table.setToolTipText(null);
}
double duration = 0;
for (int i : table.getSelectedRows()) {
try {
duration += model.getActivitiesList().get(i).getDuration();
} catch (IndexOutOfBoundsException e) {
// Exception occurs when user has selected entries and then the filter changes.
// Therefore we can safely ignore the exception and keep going.
}
}
table.setToolTipText(textBundle.textFor("AllActivitiesPanel.tooltipDuration", new DurationFormat().format(duration))); //$NON-NLS-1$
}
代码示例来源:origin: hneemann/Digital
/**
* Called if dialog shows data from running model and model had stopped.
*/
public void detachFromRunningModel() {
table.setForeground(Color.BLUE);
table.setToolTipText(Lang.get("msg_dataNotUpdatedAnymore"));
table.setEnabled(false);
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
public void mouseMoved(MouseEvent e) {
int rowIndex = placemarkTable.rowAtPoint(e.getPoint());
if (rowIndex != _rowIndex) {
_rowIndex = rowIndex;
if (_rowIndex >= 0 && _rowIndex < placemarkTable.getRowCount()) {
GeoPos geoPos = getPlacemarkAt(placemarkTable.convertRowIndexToModel(_rowIndex)).getGeoPos();
if (geoPos != null) {
placemarkTable.setToolTipText(geoPos.getLonString() + " / " + geoPos.getLatString());
}
}
}
}
代码示例来源:origin: org.jdtaus.editor/jdtaus-editor-client-application
directoryTable.setToolTipText(tooltip.toString());
bankleitzahlTextField.setText(selectedBank.getBankCode().
format(Bankleitzahl.LETTER_FORMAT));
directoryTable.setToolTipText(null);
bankleitzahlTextField.setText(null);
okButton.setEnabled(false);
代码示例来源:origin: cytoscape/application
attributeTable.setToolTipText("Select multiple attributes to save. Modify \"Filename\" field to specify filename");
attributeTable.setCellSelectionEnabled(false);
代码示例来源:origin: org.opentcs/opentcs-plantoverview-panel-loadgenerator
doTable.setToolTipText(bundle.getString("Drive_orders_in_selected_transport_order")); // NOI18N
doTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
driveOrdersScrollPane.setViewportView(doTable);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
jScrollPaneTabelaMensagens = new javax.swing.JScrollPane();
tabelaMensagens = new javax.swing.JTable();
setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 8, 8));
setFocusable(false);
setOpaque(false);
setLayout(new java.awt.BorderLayout());
jScrollPaneTabelaMensagens.setBorder(null);
jScrollPaneTabelaMensagens.setFocusable(false);
jScrollPaneTabelaMensagens.setName("scrollMensagensCompilador"); // NOI18N
jScrollPaneTabelaMensagens.setOpaque(false);
tabelaMensagens.setBackground(new java.awt.Color(245, 245, 245));
tabelaMensagens.setToolTipText("");
tabelaMensagens.setFillsViewportHeight(true);
tabelaMensagens.setName("tabelaMensagensCompilador"); // NOI18N
tabelaMensagens.setOpaque(false);
tabelaMensagens.setRequestFocusEnabled(false);
tabelaMensagens.setRowHeight(24);
tabelaMensagens.setSelectionBackground(new java.awt.Color(0, 84, 148));
tabelaMensagens.setShowHorizontalLines(false);
tabelaMensagens.setShowVerticalLines(false);
jScrollPaneTabelaMensagens.setViewportView(tabelaMensagens);
add(jScrollPaneTabelaMensagens, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
final JTable table = new JTable(tableModel);
table
.setToolTipText("Move: PgUp/PgDown; Edit: Double-Click or Insert/Delete");
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_http
tableRequest.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableRequest.addMouseListener(new TextBoxDoubleClick(tableRequest));
tableParams.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableParams.addMouseListener(new TextBoxDoubleClick(tableParams));
TableColumn column = tableParams.getColumnModel().getColumn(0);
tableHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableHeaders.addMouseListener(new TextBoxDoubleClick(tableHeaders));
setFirstColumnPreferredAndMaxWidth(tableHeaders);
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_components
tableResult.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableResult.addMouseListener(new TextBoxDoubleClick(tableResult));
setFirstColumnPreferredSize(tableResult);
tableResHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableResHeaders.addMouseListener(new TextBoxDoubleClick(tableResHeaders));
setFirstColumnPreferredSize(tableResHeaders);
tableResFields.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$
tableResFields.addMouseListener(new TextBoxDoubleClick(tableResFields));
setFirstColumnPreferredSize(tableResFields);
代码示例来源:origin: FellowTraveler/otapij
jTable8.setToolTipText(resourceMap.getString("jTable8.toolTipText")); // NOI18N
jTable8.setName("jTable8"); // NOI18N
jTable8.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
jTable10.setToolTipText(resourceMap.getString("jTable10.toolTipText")); // NOI18N
jTable10.setName("jTable10"); // NOI18N
jTable10.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
jTable15.setToolTipText(resourceMap.getString("jTable15.toolTipText")); // NOI18N
jTable15.setName("jTable15"); // NOI18N
jTable15.addMouseListener(new java.awt.event.MouseAdapter() {
jTable17.setToolTipText(resourceMap.getString("jTable17.toolTipText")); // NOI18N
jTable17.setName("jTable17"); // NOI18N
jTable17.addMouseListener(new java.awt.event.MouseAdapter() {
jTable18.setToolTipText(resourceMap.getString("jTable18.toolTipText")); // NOI18N
jTable18.setName("jTable18"); // NOI18N
jTable18.addMouseListener(new java.awt.event.MouseAdapter() {
jTable16.setToolTipText(resourceMap.getString("jTable16.toolTipText")); // NOI18N
jTable16.setName("jTable16"); // NOI18N
jTable16.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
代码示例来源:origin: hltfbk/Excitement-Open-Platform
toolTipText = "Classification score for search";
cpe.getExistingTreesTable().setToolTipText(GuiUtils.htmlizeToolTipText(toolTipText));
代码示例来源:origin: Baralga/baralga
/**
* This method initializes projectList.
* @return javax.swing.JList
*/
private JTable getProjectTable() {
if (projectTable == null) {
projectTableModel = new EventTableModel<>(model.getAllProjectsList(), new ProjectListTableFormat(model));
projectTable = new JHighligthedTable(projectTableModel);
TableComparatorChooser.install(
projectTable,
model.getAllProjectsList(),
TableComparatorChooser.MULTIPLE_COLUMN_MOUSE
);
projectTable.setToolTipText(textBundle.textFor("ManageProjectsDialog.ProjectList.ToolTipText")); //$NON-NLS-1$
projectTable.getColumn(projectTable.getColumnName(1)).setCellRenderer(new BooleanCellRenderer());
projectTable.getColumn(projectTable.getColumnName(1)).setCellEditor(new JXTable.BooleanEditor());
}
return projectTable;
}
内容来源于网络,如有侵权,请联系作者删除!