本文整理汇总了Java中sun.tools.jconsole.Messages类的典型用法代码示例。如果您正苦于以下问题:Java Messages类的具体用法?Java Messages怎么用?Java Messages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Messages类属于sun.tools.jconsole包,在下文中一共展示了Messages类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addMBeanNotificationInfo
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public void addMBeanNotificationInfo(MBeanNotificationInfo mbni) {
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
Messages.MBEAN_NOTIFICATION_INFO);
String text = Messages.NOTIFICATION + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
rowData[0] = Messages.NAME;
rowData[1] = mbni.getName();
tableModel.addRow(rowData);
rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbni.getDescription();
tableModel.addRow(rowData);
rowData[0] = Messages.NOTIF_TYPES;
rowData[1] = Arrays.toString(mbni.getNotifTypes());
tableModel.addRow(rowData);
addDescriptor(mbni.getDescriptor(), text);
tableModel.newDataAvailable(new TableModelEvent(tableModel));
}
示例2: addMBeanParameterInfo
import sun.tools.jconsole.Messages; //导入依赖的package包/类
private void addMBeanParameterInfo(MBeanParameterInfo mbpi, String text) {
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
rowData[0] = Messages.NAME;
rowData[1] = mbpi.getName();
tableModel.addRow(rowData);
rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbpi.getDescription();
tableModel.addRow(rowData);
rowData[0] = Messages.TYPE;
rowData[1] = mbpi.getType();
tableModel.addRow(rowData);
addDescriptor(mbpi.getDescriptor(), text);
tableModel.newDataAvailable(new TableModelEvent(tableModel));
}
示例3: getToolTip
import sun.tools.jconsole.Messages; //导入依赖的package包/类
@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;
}
示例4: print
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public static void print(PrintStream ps) {
printFullVersion(ps);
ps.println(Resources.format(Messages.NAME_AND_BUILD,
System.getProperty("java.runtime.name"),
System.getProperty("java.runtime.version")));
ps.println(Resources.format(Messages.NAME_AND_BUILD,
System.getProperty("java.vm.name"),
System.getProperty("java.vm.version"),
System.getProperty("java.vm.info")));
}
示例5: getToolTip
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public String getToolTip(int row, int col) {
if(col == 1) {
Object value = getModel().getValueAt(row, col);
if (value != null) {
if(isClickableElement(value))
return Messages.DOUBLE_CLICK_TO_VISUALIZE
+ ". " + value.toString();
else
return value.toString();
}
}
return null;
}
示例6: viewed
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public void viewed(XOpenTypeViewer viewer) throws Exception {
if (size == 0)
throw new Exception(Messages.EMPTY_ARRAY);
if (dimension > 1)
throw new Exception(Messages.DIMENSION_IS_NOT_SUPPORTED_COLON +
dimension);
super.viewed(viewer);
}
示例7: toString
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public String toString() {
if (dimension > 1) {
return Messages.DIMENSION_IS_NOT_SUPPORTED_COLON +
dimension;
} else {
return elemType.getTypeName() + "[" + size + "]";
}
}
示例8: performInvokeRequest
import sun.tools.jconsole.Messages; //导入依赖的package包/类
void performInvokeRequest(final JButton button) {
final OperationEntry entryIf = operationEntryTable.get(button);
new SwingWorker<Object, Void>() {
@Override
public Object doInBackground() throws Exception {
return mbean.invoke(button.getText(),
entryIf.getParameters(), entryIf.getSignature());
}
@Override
protected void done() {
try {
Object result = get();
// sends result notification to upper level if
// there is a return value
if (entryIf.getReturnType() != null &&
!entryIf.getReturnType().equals(Void.TYPE.getName()) &&
!entryIf.getReturnType().equals(Void.class.getName())) {
fireChangedNotification(OPERATION_INVOCATION_EVENT, button, result);
} else {
new ThreadDialog(
button,
Messages.METHOD_SUCCESSFULLY_INVOKED,
Messages.INFO,
JOptionPane.INFORMATION_MESSAGE).run();
}
} catch (Throwable t) {
t = Utils.getActualException(t);
if (JConsole.isDebug()) {
t.printStackTrace();
}
new ThreadDialog(
button,
Messages.PROBLEM_INVOKING + " " +
button.getText() + " : " + t.toString(),
Messages.ERROR,
JOptionPane.ERROR_MESSAGE).run();
}
}
}.execute();
}
示例9: getActionLabel
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public static String getActionLabel(int type) {
if(type == ARRAY ||
type == OPEN)
return Messages.VISUALIZE;
if(type == NUMERIC)
return Messages.PLOT;
return Messages.EXPAND;
}
示例10: addMBeanInfo
import sun.tools.jconsole.Messages; //导入依赖的package包/类
public void addMBeanInfo(XMBean mbean, MBeanInfo mbeanInfo) {
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
Messages.MBEAN_INFO);
String text = Messages.INFO + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
rowData[0] = Messages.OBJECT_NAME;
rowData[1] = mbean.getObjectName();
tableModel.addRow(rowData);
rowData[0] = Messages.CLASS_NAME;
rowData[1] = mbeanInfo.getClassName();
tableModel.addRow(rowData);
rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbeanInfo.getDescription();
tableModel.addRow(rowData);
addDescriptor(mbeanInfo.getDescriptor(), text);
// MBeanConstructorInfo
//
int i = 0;
for (MBeanConstructorInfo mbci : mbeanInfo.getConstructors()) {
addMBeanConstructorInfo(mbci,
Messages.CONSTRUCTOR + "-" + i + ":");
// MBeanParameterInfo
//
int j = 0;
for (MBeanParameterInfo mbpi : mbci.getSignature()) {
addMBeanParameterInfo(mbpi,
Messages.PARAMETER + "-" + i + "-" + j + ":");
j++;
}
i++;
}
tableModel.newDataAvailable(new TableModelEvent(tableModel));
}