当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

本文整理汇总了Java中sun.tools.jconsole.inspector.XNodeInfo.Type的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Type类属于sun.tools.jconsole.inspector.XNodeInfo包,在下文中一共展示了Type类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isMBeanNode

import sun.tools.jconsole.inspector.XNodeInfo.Type; //导入依赖的package包/类
public boolean isMBeanNode(DefaultMutableTreeNode node) {
    Object userObject = node.getUserObject();
    if (userObject instanceof XNodeInfo) {
        XNodeInfo uo = (XNodeInfo) userObject;
        return uo.getType().equals(Type.MBEAN);
    }
    return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:XSheet.java

示例2: displayMBeanNotificationsNode

import sun.tools.jconsole.inspector.XNodeInfo.Type; //导入依赖的package包/类
private void displayMBeanNotificationsNode(DefaultMutableTreeNode node) {
    final XNodeInfo uo = (XNodeInfo) node.getUserObject();
    if (!uo.getType().equals(Type.NOTIFICATIONS)) {
        return;
    }
    mbean = (XMBean) uo.getData();
    mbeanNotifications.loadNotifications(mbean);
    updateNotifications();
    invalidate();
    mainPanel.removeAll();
    JPanel borderPanel = new JPanel(new BorderLayout());
    borderPanel.setBorder(BorderFactory.createTitledBorder(
            Messages.NOTIFICATION_BUFFER));
    borderPanel.add(new JScrollPane(mbeanNotifications));
    mainPanel.add(borderPanel, BorderLayout.CENTER);
    // add the subscribe/unsubscribe/clear buttons to the south panel
    southPanel.removeAll();
    southPanel.add(subscribeButton, BorderLayout.WEST);
    southPanel.add(unsubscribeButton, BorderLayout.CENTER);
    southPanel.add(clearButton, BorderLayout.EAST);
    southPanel.setVisible(true);
    subscribeButton.setEnabled(true);
    unsubscribeButton.setEnabled(true);
    clearButton.setEnabled(true);
    validate();
    repaint();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:XSheet.java

示例3: displayMBeanNotificationsNode

import sun.tools.jconsole.inspector.XNodeInfo.Type; //导入依赖的package包/类
private void displayMBeanNotificationsNode(DefaultMutableTreeNode node) {
    final XNodeInfo uo = (XNodeInfo) node.getUserObject();
    if (!uo.getType().equals(Type.NOTIFICATIONS)) {
        return;
    }
    mbean = (XMBean) uo.getData();
    mbeanNotifications.loadNotifications(mbean);
    updateNotifications();
    invalidate();
    mainPanel.removeAll();
    JPanel borderPanel = new JPanel(new BorderLayout());
    borderPanel.setBorder(BorderFactory.createTitledBorder(
            Resources.getText("Notification buffer")));
    borderPanel.add(new JScrollPane(mbeanNotifications));
    mainPanel.add(borderPanel, BorderLayout.CENTER);
    // add the subscribe/unsubscribe/clear buttons to the south panel
    southPanel.removeAll();
    southPanel.add(subscribeButton, BorderLayout.WEST);
    southPanel.add(unsubscribeButton, BorderLayout.CENTER);
    southPanel.add(clearButton, BorderLayout.EAST);
    southPanel.setVisible(true);
    subscribeButton.setEnabled(true);
    unsubscribeButton.setEnabled(true);
    clearButton.setEnabled(true);
    validate();
    repaint();
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:28,代码来源:XSheet.java

示例4: displayMBeanNode

import sun.tools.jconsole.inspector.XNodeInfo.Type; //导入依赖的package包/类
private void displayMBeanNode(final DefaultMutableTreeNode node) {
    final XNodeInfo uo = (XNodeInfo) node.getUserObject();
    if (!uo.getType().equals(Type.MBEAN)) {
        return;
    }
    mbean = (XMBean) uo.getData();
    SwingWorker<MBeanInfo, Void> sw = new SwingWorker<MBeanInfo, Void>() {
        @Override
        public MBeanInfo doInBackground() throws InstanceNotFoundException,
                IntrospectionException, ReflectionException, IOException {
            return mbean.getMBeanInfo();
        }
        @Override
        protected void done() {
            try {
                MBeanInfo mbi = get();
                if (mbi != null) {
                    if (!isSelectedNode(node, currentNode)) {
                        return;
                    }
                    mbeanInfo.addMBeanInfo(mbean, mbi);
                    invalidate();
                    mainPanel.removeAll();
                    mainPanel.add(mbeanInfo, BorderLayout.CENTER);
                    southPanel.setVisible(false);
                    southPanel.removeAll();
                    validate();
                    repaint();
                }
            } catch (Exception e) {
                Throwable t = Utils.getActualException(e);
                if (JConsole.isDebug()) {
                    System.err.println("Couldn't get MBeanInfo for MBean [" +
                            mbean.getObjectName() + "]");
                    t.printStackTrace();
                }
                showErrorDialog(t.toString(),
                        Messages.PROBLEM_DISPLAYING_MBEAN);
            }
        }
    };
    sw.execute();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:XSheet.java

示例5: displayMBeanOperationsNode

import sun.tools.jconsole.inspector.XNodeInfo.Type; //导入依赖的package包/类
private void displayMBeanOperationsNode(final DefaultMutableTreeNode node) {
    final XNodeInfo uo = (XNodeInfo) node.getUserObject();
    if (!uo.getType().equals(Type.OPERATIONS)) {
        return;
    }
    mbean = (XMBean) uo.getData();
    SwingWorker<MBeanInfo, Void> sw = new SwingWorker<MBeanInfo, Void>() {
        @Override
        public MBeanInfo doInBackground() throws InstanceNotFoundException,
                IntrospectionException, ReflectionException, IOException {
            return mbean.getMBeanInfo();
        }
        @Override
        protected void done() {
            try {
                MBeanInfo mbi = get();
                if (mbi != null) {
                    if (!isSelectedNode(node, currentNode)) {
                        return;
                    }
                    mbeanOperations.loadOperations(mbean, mbi);
                    invalidate();
                    mainPanel.removeAll();
                    JPanel borderPanel = new JPanel(new BorderLayout());
                    borderPanel.setBorder(BorderFactory.createTitledBorder(
                            Messages.OPERATION_INVOCATION));
                    borderPanel.add(new JScrollPane(mbeanOperations));
                    mainPanel.add(borderPanel, BorderLayout.CENTER);
                    southPanel.setVisible(false);
                    southPanel.removeAll();
                    validate();
                    repaint();
                }
            } catch (Exception e) {
                Throwable t = Utils.getActualException(e);
                if (JConsole.isDebug()) {
                    System.err.println("Problem displaying MBean " +
                            "operations for MBean [" +
                            mbean.getObjectName() + "]");
                    t.printStackTrace();
                }
                showErrorDialog(t.toString(),
                        Messages.PROBLEM_DISPLAYING_MBEAN);
            }
        }
    };
    sw.execute();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:49,代码来源:XSheet.java


注:本文中的sun.tools.jconsole.inspector.XNodeInfo.Type类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。