本文整理汇总了Java中sun.tools.jconsole.Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE属性的典型用法代码示例。如果您正苦于以下问题:Java Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE属性的具体用法?Java Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE怎么用?Java Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.tools.jconsole.Messages
的用法示例。
在下文中一共展示了Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getToolTip
@Override
public String getToolTip(int row, int column) {
if (isCellError(row, column)) {
return (String) unavailableAttributes.get(getValueName(row));
}
if (isColumnEditable(column)) {
Object value = getValue(row);
String tip = null;
if (value != null) {
tip = value.toString();
if(isAttributeViewable(row, VALUE_COLUMN))
tip = Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE+
". " + tip;
}
return tip;
}
if(column == NAME_COLUMN) {
int index = convertRowToIndex(row);
if (index != -1) {
return attributesInfo[index].getDescription();
}
}
return null;
}
示例2: getCellRenderer
@Override
public synchronized TableCellRenderer getCellRenderer(int row, int column) {
//In case we have a repaint thread that is in the process of
//repainting an obsolete table, just ignore the call.
//It can happen when MBean selection is switched at a very quick rate
if (row >= getRowCount()) {
return null;
}
DefaultTableCellRenderer renderer;
String toolTip = null;
UserDataCell cell = getUserDataCell(row, column);
if (cell != null && cell.isInited()) {
renderer = (DefaultTableCellRenderer) cell.getRenderer();
} else {
renderer =
(DefaultTableCellRenderer) super.getCellRenderer(row, column);
}
if (cell != null) {
toolTip = Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE+
". " + cell.toString();
} else {
Object val =
((DefaultTableModel) getModel()).getValueAt(row, column);
if (val != null) {
toolTip = val.toString();
}
}
renderer.setToolTipText(toolTip);
return renderer;
}