/**
*
*/
public NodeViewerData() {
this.setLayout(new BorderLayout());
this.dataArea = new JTextPane();
this.toolbar = new JToolBar();
this.toolbar.setFloatable(false);
JScrollPane scroller = new JScrollPane(this.dataArea);
scroller
.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.add(scroller, BorderLayout.CENTER);
this.add(this.toolbar, BorderLayout.NORTH);
JButton saveButton = new JButton(ZooInspectorIconResources
.getSaveIcon());
saveButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (selectedNode != null) {
if (JOptionPane.showConfirmDialog(NodeViewerData.this,
"Are you sure you want to save this node?"
+ " (this action cannot be reverted)",
"Confirm Save", JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
zooInspectorManager.setData(selectedNode, dataArea
.getText());
}
}
}
});
this.toolbar.add(saveButton);
}
NodeViewerData.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:ZooKeeper
作者:
评论列表
文章目录