Node node = yoshikoder.getSelectedNode();
if (node != null){
if (node instanceof CategoryNode) {
CategoryNode n = (CategoryNode)node;
JDialog dia =
new EditCategoryDialog(yoshikoder, (CategoryNode)n.getParent(), n);
dia.show();
} else if (node instanceof PatternNode) {
PatternNode n = (PatternNode)node;
JDialog dia =
new EditPatternDialog(yoshikoder, (CategoryNode)n.getParent(), n);
dia.show();
}
}
}