本文整理汇总了Java中org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer类的典型用法代码示例。如果您正苦于以下问题:Java ZooInspectorNodeViewer类的具体用法?Java ZooInspectorNodeViewer怎么用?Java ZooInspectorNodeViewer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ZooInspectorNodeViewer类属于org.apache.zookeeper.inspector.gui.nodeviewer包,在下文中一共展示了ZooInspectorNodeViewer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ZooInspectorNodeViewersPanel
import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; //导入依赖的package包/类
/**
* @param zooInspectorManager
* - the {@link ZooInspectorManager} for the application
* @param nodeVeiwers
* - the {@link ZooInspectorNodeViewer}s to show
*/
public ZooInspectorNodeViewersPanel(
ZooInspectorNodeManager zooInspectorManager,
List<ZooInspectorNodeViewer> nodeVeiwers) {
this.zooInspectorManager = zooInspectorManager;
this.setLayout(new BorderLayout());
tabbedPane = new JTabbedPane(JTabbedPane.TOP,
JTabbedPane.WRAP_TAB_LAYOUT);
setNodeViewers(nodeVeiwers);
tabbedPane.addChangeListener(this);
this.add(tabbedPane, BorderLayout.CENTER);
reloadSelectedViewer();
}
示例2: setNodeViewers
import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; //导入依赖的package包/类
/**
* @param nodeViewers
* - the {@link ZooInspectorNodeViewer}s to show
*/
public void setNodeViewers(List<ZooInspectorNodeViewer> nodeViewers) {
this.nodeVeiwers.clear();
this.nodeVeiwers.addAll(nodeViewers);
needsReload.clear();
tabbedPane.removeAll();
for (ZooInspectorNodeViewer nodeViewer : nodeVeiwers) {
nodeViewer.setZooInspectorManager(zooInspectorManager);
needsReload.add(true);
tabbedPane.add(nodeViewer.getTitle(), nodeViewer);
}
this.revalidate();
this.repaint();
}
示例3: reloadSelectedViewer
import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; //导入依赖的package包/类
private void reloadSelectedViewer() {
int index = this.tabbedPane.getSelectedIndex();
if (index != -1 && this.needsReload.get(index)) {
ZooInspectorNodeViewer viewer = this.nodeVeiwers.get(index);
viewer.nodeSelectionChanged(selectedNodes);
this.needsReload.set(index, false);
}
}