You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(32) |
Jul
(20) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Peter W. <pw...@us...> - 2006-07-18 21:32:33
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12556/src/edu/iastate/ato/gui/packageview Modified Files: PackageTreeEditorBasis.java PackageTree.java Log Message: Index: PackageTreeEditorBasis.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeEditorBasis.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PackageTreeEditorBasis.java 15 Jul 2006 22:10:53 -0000 1.4 --- PackageTreeEditorBasis.java 18 Jul 2006 21:32:29 -0000 1.5 *************** *** 49,53 **** return false; } ! else if (!name.matches("[a-zA-Z][\\s\\w\\-._]*")) { return false; --- 49,53 ---- return false; } ! else if (!name.matches("[a-zA-Z0-9][\\s\\w\\-._\\(\\)]*")) { return false; Index: PackageTree.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PackageTree.java 15 Jul 2006 22:10:53 -0000 1.4 --- PackageTree.java 18 Jul 2006 21:32:29 -0000 1.5 *************** *** 150,157 **** // keep a clone at the original place. (for saving purpose) TypedNode oldParent = (TypedNode)selected.getParent() ; ! // move ! //this.moveNode(selected, dropTarget); ! dropTarget.add(selected) ; selected.status = ATOTreeNode.MODIFIED ; --- 150,159 ---- // keep a clone at the original place. (for saving purpose) TypedNode oldParent = (TypedNode)selected.getParent() ; ! //selected.getHomePackageNode().status = PackageNode.MODIFIED; ! // move ! this.moveNode(selected, dropTarget); ! ! //dropTarget.add(selected) ; selected.status = ATOTreeNode.MODIFIED ; |
From: Peter W. <pw...@us...> - 2006-07-18 21:32:32
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12556/src/edu/iastate/ato/gui/dialog Modified Files: SchemaPanel.java Log Message: Index: SchemaPanel.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog/SchemaPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SchemaPanel.java 13 Jun 2006 21:55:25 -0000 1.1 --- SchemaPanel.java 18 Jul 2006 21:32:29 -0000 1.2 *************** *** 66,70 **** --- 66,82 ---- exception.printStackTrace() ; } + + } + + public void setEditable(boolean tog){ + textRelation.setEnabled(tog); + textProperty.setEnabled(tog); + textPolicyDetails.setEnabled(tog); + lstNamingPolicy.setEnabled(tog); + otherPane.setEditable(tog); + btnSave.setEnabled(tog); + btnImportOBO.setEnabled(tog); } + private void jbInit() throws Exception |
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31255/src/edu/iastate/ato/gui/packageview Modified Files: PackageTreeEditorBasis.java PackageTree.java PackageView2Db.java PackageTreeDargDropListener.java PackageTreeEditor.java Log Message: Index: PackageTreeEditor.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeEditor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageTreeEditor.java 29 Jun 2006 22:15:53 -0000 1.3 --- PackageTreeEditor.java 15 Jul 2006 22:10:53 -0000 1.4 *************** *** 366,369 **** --- 366,370 ---- tree.delete(theNode) ; } + theNode.getHomePackageNode().status = PackageNode.MODIFIED; ((PackageTree)tree).modified = true; } *************** *** 457,460 **** --- 458,462 ---- newNode.status = ATOTreeNode.MODIFIED ; + newNode.getHomePackageNode().status = PackageNode.MODIFIED; ((PackageTree)tree).modified = true; } *************** *** 546,557 **** public void quitEditing(PackageNode thePackageNode) { ! UserManager.cancelEditing(db, thePackageNode.getOid(), ! MOEditor.user.name) ; ! thePackageNode.setReadOnly(true) ; ! ! // diseable the property editor if the node is under editing ! MOEditor.theInstance.paneDetails.switchPropertyEditor( ! thePackageNode) ; } --- 548,570 ---- public void quitEditing(PackageNode thePackageNode) { ! int answer = -1; ! if(thePackageNode.status == PackageNode.MODIFIED){ ! //ask to save ! answer = JOptionPane.showConfirmDialog(this.fatherPanel, "Save Changes to "+thePackageNode.getLocalName()+"? "); ! if(answer == JOptionPane.YES_OPTION) ! { ! this.thisTree.savePackage(thePackageNode); ! } ! } ! if(answer != JOptionPane.CANCEL_OPTION || answer == -1){ ! thePackageNode.expanded = false; ! UserManager.cancelEditing(db, thePackageNode.getOid(), ! MOEditor.user.name) ; ! thePackageNode.setReadOnly(true) ; + // diseable the property editor if the node is under editing + MOEditor.theInstance.paneDetails.switchPropertyEditor( + thePackageNode) ; + } } *************** *** 597,601 **** if(node.expanded == false) { ! expandPackage(node) ; } } --- 610,619 ---- if(node.expanded == false) { ! if( node.wasEdited == true){ ! expandPackage(node, false) ; ! }else{ ! expandPackage(node, true) ; ! } ! node.wasEdited = true; } } *************** *** 620,623 **** --- 638,642 ---- { theNode.markDeleted() ; + theNode.getHomePackageNode().status = PackageNode.MODIFIED; tree.getModel().reload(theNode) ; ((PackageTree)tree).modified = true; *************** *** 635,641 **** --- 654,664 ---- } + /* (non-Javadoc) + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { theNode.status = ATOTreeNode.DELETED_UPEDGE ; + theNode.getHomePackageNode().status = PackageNode.MODIFIED; tree.getModel().reload(theNode) ; ((PackageTree)tree).modified = true; *************** *** 668,671 **** --- 691,695 ---- { theNode.markDeleted() ; + ((PackageNode)theNode.getParent()).status = PackageNode.MODIFIED; tree.getModel().reload(theNode.getParent()) ; ((PackageTree)tree).modified = true; *************** *** 676,687 **** class CreateSuperPackageAction extends DefaultInsertParentAction { ! public CreateSuperPackageAction(PackageNode theNode) { super(theNode) ; } protected TypedNode getNewNode() { ! return makeNewPackageNode((PackageNode)theNode, null) ; } } --- 700,719 ---- class CreateSuperPackageAction extends DefaultInsertParentAction { ! public PackageNode newPackageNode = null; ! ! public CreateSuperPackageAction(PackageNode theNode) { super(theNode) ; } + + public void actionPerformed(ActionEvent e){ + super.actionPerformed(e); + editPackage(newPackageNode); + } + protected TypedNode getNewNode() { ! return (newPackageNode = makeNewPackageNode((PackageNode)theNode, null) ); } } *************** *** 689,692 **** --- 721,726 ---- class CreateSubPackageAction extends DeafultCreateSubValueAction { + public PackageNode newPackageNode = null; + public CreateSubPackageAction(PackageNode parent) { *************** *** 694,700 **** } protected TypedNode getNewNode() { ! return makeNewPackageNode((PackageNode)parent, null) ; } } --- 728,739 ---- } + public void actionPerformed(ActionEvent e){ + super.actionPerformed(e); + editPackage(newPackageNode); + } + protected TypedNode getNewNode() { ! return (newPackageNode = makeNewPackageNode((PackageNode)parent, null) ); } } *************** *** 813,816 **** --- 852,860 ---- { theNode.rename(newName.toString()) ; + if( theNode instanceof PackageNode ){ + + }else if(theNode instanceof PackageNode ){ + + } tree.getModel().reload(theNode) ; //TreeNodeRenameEditing action = new TreeNodeRenameEditing( Index: PackageView2Db.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageView2Db.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PackageView2Db.java 29 Jun 2006 22:15:53 -0000 1.4 --- PackageView2Db.java 15 Jul 2006 22:10:53 -0000 1.5 *************** *** 47,55 **** if(atoNode instanceof PackageNode) { ! savePackage((PackageNode)node) ; } else if(node instanceof DbTermNode) { // save a term ! saveTerm((DbTermNode)node) ; } } --- 47,55 ---- if(atoNode instanceof PackageNode) { ! writePackage((PackageNode)node) ; } else if(node instanceof DbTermNode) { // save a term ! writeTerm((DbTermNode)node) ; } } *************** *** 82,90 **** if(atoNode instanceof PackageNode) { ! savePackageEdge((PackageNode)node) ; } else if(node instanceof DbTermNode || node instanceof DBTermCloneNode) { // save a term ! saveTermEdge((DbTermNode)node) ; } //tree.getModel().reload(atoNode); --- 82,90 ---- if(atoNode instanceof PackageNode) { ! writePackageEdge((PackageNode)node) ; } else if(node instanceof DbTermNode || node instanceof DBTermCloneNode) { // save a term ! writeTermEdge((DbTermNode)node) ; } //tree.getModel().reload(atoNode); *************** *** 200,204 **** } ! private void saveTerm(DbTermNode node) { // save node information only if it is not a clone --- 200,204 ---- } ! private void writeTerm(DbTermNode node) { // save node information only if it is not a clone *************** *** 214,218 **** } ! private void saveTermEdge(DbTermNode node) { // save the tree edge --- 214,218 ---- } ! private void writeTermEdge(DbTermNode node) { // save the tree edge *************** *** 229,233 **** } ! private void savePackage(PackageNode node) { // save the package information --- 229,233 ---- } ! private void writePackage(PackageNode node) { // save the package information *************** *** 235,239 **** } ! private void savePackageEdge(PackageNode node) { // save the tree edge, delete the old edge --- 235,239 ---- } ! private void writePackageEdge(PackageNode node) { // save the tree edge, delete the old edge *************** *** 247,250 **** --- 247,314 ---- } + + private void savePackageNode(PackageNode pkg) + { + saveNode(pkg) ; + Vector<DbTermNode> terms = tree.getTermsInPackage(pkg) ; + for(DbTermNode term : terms) + { + saveNode(term) ; + } + } + + private void savePackageEdge(PackageNode pkg){ + saveEdge(pkg) ; + Vector<DbTermNode> terms = PackageTree.getTermsInPackage(pkg) ; + for(DbTermNode term : terms) + { + saveEdge(term) ; + if(!term.isMerged() && term.isChanged()) + { + term.status = ATOTreeNode.UNMODIFIED ; + tree.getModel().reload(term) ; + } + } + pkg.status = ATOTreeNode.UNMODIFIED ; + } + + /** + * Saves an individual package + * @author Peter Wong + * @param pkg + */ + public void savePackage(PackageNode pkg){ + savePackageNode(pkg); + savePackageEdge(pkg); + + // save edge change + Vector<DbTermNode> allMerged = new Vector<DbTermNode>() ; + Vector<DbTermNode> terms = PackageTree.getTermsInPackage(pkg) ; + for(DbTermNode term : terms) + { + if(term.isMerged()) + { + allMerged.add(term) ; + } + } + + for(int i=0; i<pkg.getChildCount();++i){ + if(pkg.getChildAt(i) instanceof PackageNode){ + PackageNode child = (PackageNode) pkg.getChildAt(i); + if(child.status == PackageNode.DELETED_NODE){ + savePackage(child); + } + } + } + + // do merging + for(DbTermNode mergedNode : allMerged) + { + mergedNode.merge(db) ; + mergedNode.status = ATOTreeNode.UNMODIFIED ; + tree.getModel().reload(mergedNode.mergedWith) ; + } + } + public void saveTree() { *************** *** 255,264 **** for(PackageNode pkg : allPackages) { ! saveNode(pkg) ; ! Vector<DbTermNode> terms = tree.getTermsInPackage(pkg) ; ! for(DbTermNode term : terms) ! { ! saveNode(term) ; ! } } // save edge change --- 319,323 ---- for(PackageNode pkg : allPackages) { ! savePackageNode(pkg); } // save edge change *************** *** 266,270 **** for(PackageNode pkg : allPackages) { ! saveEdge(pkg) ; Vector<DbTermNode> terms = PackageTree.getTermsInPackage(pkg) ; for(DbTermNode term : terms) --- 325,330 ---- for(PackageNode pkg : allPackages) { ! savePackageEdge(pkg); ! Vector<DbTermNode> terms = PackageTree.getTermsInPackage(pkg) ; for(DbTermNode term : terms) *************** *** 274,283 **** allMerged.add(term) ; } - saveEdge(term) ; - if(!term.isMerged() && term.isChanged()) - { - term.status = ATOTreeNode.UNMODIFIED ; - tree.getModel().reload(term) ; - } } pkg.status = ATOTreeNode.UNMODIFIED ; --- 334,337 ---- Index: PackageTreeEditorBasis.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeEditorBasis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageTreeEditorBasis.java 29 Jun 2006 22:15:53 -0000 1.3 --- PackageTreeEditorBasis.java 15 Jul 2006 22:10:53 -0000 1.4 *************** *** 87,91 **** --- 87,96 ---- PackageNode newNode = new PackageNode(newPkg) ; newNode.status = ATOTreeNode.MODIFIED ; + + // Peter: Makes sure the parent package asks whether to save or not, when editing is done. + // ((PackageNode)selected.getParent()).status = PackageNode.MODIFIED; + newNode.setViewMode(selected.getViewMode()) ; + newNode.status = PackageNode.MODIFIED; // submit the new package to the database (because we want the oid) *************** *** 100,103 **** --- 105,109 ---- } ((PackageTree)tree).modified = true; + selected.status = PackageNode.MODIFIED; return newNode ; } *************** *** 124,129 **** } // 2005-08-22 load with progress bar ! public void expandPackage(final PackageNode thePackage) { final JStatusBar statusBar = MOEditor.theInstance.statusBar ; --- 130,139 ---- } + public void expandPackage(final PackageNode thePackage){ + expandPackage(thePackage, true); + } + // 2005-08-22 load with progress bar ! public void expandPackage(final PackageNode thePackage, final boolean reload) { final JStatusBar statusBar = MOEditor.theInstance.statusBar ; *************** *** 140,144 **** { // do something here ! thePackage.expand(db, statusBar.getProgressBar(pb)) ; tree.getModel().reload(thePackage) ; } --- 150,154 ---- { // do something here ! thePackage.expand(db, statusBar.getProgressBar(pb), reload) ; tree.getModel().reload(thePackage) ; } *************** *** 235,239 **** --- 245,252 ---- "false") ; DbTermNode newNode = new DbTermNode(t, home) ; + newNode.status = ATOTreeNode.MODIFIED ; + home.status = PackageNode.MODIFIED; + ((PackageTree)tree).modified = true; Index: PackageTree.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageTree.java 29 Jun 2006 22:15:53 -0000 1.3 --- PackageTree.java 15 Jul 2006 22:10:53 -0000 1.4 *************** *** 137,140 **** --- 137,141 ---- newPackage = ((DbTermNode)dropTarget).getHomePackageNode() ; } + newPackage.status = PackageNode.MODIFIED; Enumeration<DbTermNode> en = selected.breadthFirstEnumeration() ; *************** *** 161,165 **** } ! getModel().reload(selected) ; return newPackage ; --- 162,167 ---- } ! getModel().reload(selected); ! getModel().reload(dropTarget); return newPackage ; *************** *** 198,202 **** newNode.showPackageInformation = true ; newNode.setHomePackageNode(dropTarget.getHomePackageNode()) ; ! getModel().insertNodeInto(newNode, dropTarget, 0) ; newNode.status = ATOTreeNode.MODIFIED ; getModel().reload(newNode) ; --- 200,205 ---- newNode.showPackageInformation = true ; newNode.setHomePackageNode(dropTarget.getHomePackageNode()) ; ! ! getModel().insertNodeInto(newNode, dropTarget, 0); newNode.status = ATOTreeNode.MODIFIED ; getModel().reload(newNode) ; *************** *** 283,285 **** --- 286,297 ---- } } + + public void savePackage(PackageNode pkg){ + if(pkg.status == PackageNode.MODIFIED) + { + PackageView2Db tree2db = new PackageView2Db(db, this) ; + tree2db.savePackage(pkg) ; + pkg.status = PackageNode.UNMODIFIED; + } + } } Index: PackageTreeDargDropListener.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeDargDropListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageTreeDargDropListener.java 29 Jun 2006 20:17:22 -0000 1.3 --- PackageTreeDargDropListener.java 15 Jul 2006 22:10:53 -0000 1.4 *************** *** 122,125 **** --- 122,126 ---- { tree.movePackage(sourcePkg, targetPkg) ; + } else if(answer == JOptionPane.NO_OPTION) *************** *** 133,136 **** --- 134,138 ---- tree.getModel().removeNodeFromParent(n) ; tree.getModel().insertNodeInto(n, targetPkg, 0) ; + --i; n.status = ATOTreeNode.MODIFIED ; } *************** *** 138,146 **** --- 140,156 ---- { tree.moveBranch((DbTermNode)n, targetPkg) ; + --i; } } + + tree.getModel().reload(targetPkg); + tree.getModel().reload(sourcePkg); + targetPkg.status = PackageNode.MODIFIED; + //sourcePkg.status = PackageNode.MODIFIED; + // mark the old package as deleted sourcePkg.status = ATOTreeNode.DELETED_NODE ; + ((PackageNode)sourcePkg.getParent()).status = PackageNode.MODIFIED; } |
From: Jie B. <ba...@us...> - 2006-06-29 22:16:02
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/gui Modified Files: MOEditor.java TypedTreePanel.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: MOEditor.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/MOEditor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MOEditor.java 20 Jun 2006 02:45:07 -0000 1.5 --- MOEditor.java 29 Jun 2006 22:15:54 -0000 1.6 *************** *** 17,21 **** import javax.swing.JScrollPane ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.dialog.LoginPanel ; import edu.iastate.ato.gui.dialog.OnlineBuddyPanel ; --- 17,20 ---- *************** *** 38,41 **** --- 37,41 ---- import edu.iastate.utils.io.FileUtils ; import edu.iastate.utils.lang.*; + import edu.iastate.utils.tree.TypedTree; /** Index: TypedTreePanel.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/TypedTreePanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TypedTreePanel.java 20 Jun 2006 02:38:24 -0000 1.2 --- TypedTreePanel.java 29 Jun 2006 22:15:54 -0000 1.3 *************** *** 3,7 **** import javax.swing.JPanel ; ! import edu.iastate.anthill.indus.tree.TypedTree ; /** --- 3,7 ---- import javax.swing.JPanel ; ! import edu.iastate.utils.tree.TypedTree; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:16:00
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/utils/tree In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/utils/tree Added Files: TypedNode.java TypedTreeRender.java TypedTree.java SortTreeModel.java TreeNodeDeleteEditing.java TreeNodeCommentEditing.java TreeNodeRenameEditing.java TreeNodeMoveEditing.java TypedTreeEditor.java TreeNodeInsertEditing.java TreePopupMenuListener.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree --- NEW FILE: TypedTreeRender.java --- package edu.iastate.utils.tree; import java.util.HashMap; import java.util.Map; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import javax.swing.Icon; import javax.swing.JLabel; import javax.swing.JTree; import javax.swing.tree.TreeCellRenderer; import edu.iastate.ato.shared.IndusConstants; public class TypedTreeRender extends JLabel implements TreeCellRenderer { public TypedTreeRender() { icons.put(TypedNode.ROOT + "", IndusConstants.iconRoot); icons.put(TypedNode.PACKAGE + "", IndusConstants.iconPackage); icons.put(TypedNode.CLASS + "", IndusConstants.iconClass); icons.put(TypedNode.PROPERTY + "", IndusConstants.iconProperty); icons.put(TypedNode.INSTANCE + "", IndusConstants.iconInstance); icons.put(TypedNode.ALL_CLASSES + "", IndusConstants.iconAllClasses); icons.put(TypedNode.ALL_PROPERTIES + "", IndusConstants.iconAllProperties); icons.put(TypedNode.ALL_INSTANCES + "", IndusConstants.iconAllInstances); icons.put(TypedNode.ATTRIBUTE + "", IndusConstants.iconSchema); icons.put(TypedNode.AVH + "", IndusConstants.iconAVHValue); icons.put(TypedNode.DB + "", IndusConstants.iconDB); } // static protected Font defaultFont; static public Map<String, Icon> icons = new HashMap(); /** Color to use for the background when selected. */ static protected final Color SelectedBackgroundColor = Color.yellow; /** Whether or not the item that was last configured is selected. */ protected boolean selected; /** * This is messaged from JTree whenever it needs to get the size * of the component or it wants to draw it. * This attempts to set the font based on value, which will be * a TreeNode. */ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { String stringValue = tree.convertValueToText(value, selected, expanded, leaf, row, hasFocus); // Set the text. setText(stringValue); // Tooltips used by the tree. setToolTipText(stringValue); // Set the image. // 2004-10-01 Jie Bao debug: should may sure the type of node if (value instanceof TypedNode) { TypedNode theNode = (TypedNode) value; // 2005-08-23: node may has it's own icon definition Icon icon = theNode.getIcon(); if (icon != null) { setIcon(icon); } else { setIcon( (Icon) icons.get(theNode.getType() + "")); } Color color = theNode.getColor(); if (color != null) { setForeground( (Color) color); } else { setForeground(Color.black); } } // Update the selected flag for the next paint. // } this.selected = selected; return this; } /** /** * paint is subclassed to draw the background correctly. JLabel * currently does not allow backgrounds other than white, and it * will also fill behind the icon. Something that isn't desirable. */ public void paint(Graphics g) { Color bColor; Icon currentI = getIcon(); if (selected) { bColor = SelectedBackgroundColor; } else if (getParent() != null) { /* Pick background color up from parent (which will come from the JTree we're contained in). */ bColor = getParent().getBackground(); } else { bColor = getBackground(); } g.setColor(bColor); if (currentI != null && getText() != null) { int offset = (currentI.getIconWidth() + getIconTextGap()); if (getComponentOrientation().isLeftToRight()) { g.fillRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1); } else { g.fillRect(0, 0, getWidth() - 1 - offset, getHeight() - 1); } } else { g.fillRect(0, 0, getWidth() - 1, getHeight() - 1); } super.paint(g); } } --- NEW FILE: TreeNodeDeleteEditing.java --- package edu.iastate.utils.tree; import edu.iastate.utils.undo.EditingAction; /** * @since 2005-04-20 */ public class TreeNodeDeleteEditing extends EditingAction { TypedNode parent; TypedTree tree; public TreeNodeDeleteEditing(TypedTree tree, TypedNode location, TypedNode parent) { this.tree = tree; this.location = location; this.parent = parent; this.summary = "Delete node '" + location + "' from '" + parent+"'"; } public void undo() { // insert location to parent if ( ( (TypedNode) location).getParent() != null) { tree.getModel().removeNodeFromParent( (TypedNode) location); } tree.getModel().insertNodeInto( (TypedNode) location, parent, parent.getChildCount()); tree.expandNode( (TypedNode) location); } public void redo() { // remove location from parent if (parent.isNodeChild( (TypedNode) location)) { tree.getModel().removeNodeFromParent( (TypedNode) location); } } } --- NEW FILE: TypedTree.java --- package edu.iastate.utils.tree; import java.util.Enumeration; import java.util.Vector; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import edu.iastate.utils.gui.JTreeEx; /** * Generic tree data structure with typed node * * @author Jie Bao * @since 2004-05-01 */ public class TypedTree extends JTreeEx { public TypedTree(DefaultTreeModel model) { super(model); } public TypedTree() { super(); } public TypedTree(TypedNode top) { super(top); this.setTop(top); } public String toString() { return toString(false); } public String toString(boolean toHTML) { //String blank = toHTML ? " " : " "; String endline = "|---"; String line = toHTML ? "| " : "| "; String crlf = toHTML ? "<BR></BR>" : "\n"; if (getTop() == null) { return ""; } String toPrint = ""; Enumeration e = getTop().preorderEnumeration(); while (e.hasMoreElements()) { DefaultMutableTreeNode nn = (DefaultMutableTreeNode) e.nextElement(); String leading = line; if (nn.getLevel() == 0) { leading = ""; } else if (nn.getLevel() == 1) { leading = endline; } else { leading = endline; for (int i = 0; i < nn.getLevel() - 1; i++) { leading = line + leading; } } toPrint += leading + nn + crlf; } if (toHTML) { return toPrint; } else { return toPrint; } } public void setTop(TypedNode top) { getModel().setRoot(top); } public TypedNode getTop() { return (TypedNode) getModel().getRoot(); } public void buildSampleTree() { TypedNode top = new TypedNode("http://semanticWWW.com/indus.owl#USA"); TypedNode iowa = new TypedNode( "http://semanticWWW.com/indus.owl#Iowa"); top.add(iowa); iowa.add(new TypedNode( "http://semanticWWW.com/indus.owl#Ames")); iowa.add(new TypedNode( "http://semanticWWW.com/indus.owl#DesMoines")); TypedNode va = new TypedNode( "http://semanticWWW.com/indus.owl#Virginia"); top.add(va); va.add(new TypedNode( "http://semanticWWW.com/indus.owl#Richmond")); va.add(new TypedNode( "http://semanticWWW.com/indus.owl#Petersberg")); setTop(top); } /** * replace the value of old node to that of the new node. if new node has * children, they will be children of the old node. * @param tree TypedTree * @param node TypedNode * @param newNode TypedNode * @return TypedNode - the old node * @since 2005-03-31 * @author Jie Bao */ public static TypedNode amendNode(TypedTree tree, TypedNode node, TypedNode newNode) { try { DefaultTreeModel model = tree.getModel(); // get the existing children Vector oldSons = new Vector(); int oldSonCount = node.getChildCount(); //System.out.println("node has children " + oldSonCount); for (int j = 0; j < oldSonCount; j++) { TypedNode son = (TypedNode) node.getChildAt(j); oldSons.add(son.getUserObject()); } //System.out.println("oldSons" + oldSons); // add all children of new node to oldNode if it's new Vector newSons = new Vector(); for (Enumeration e = newNode.children(); e.hasMoreElements(); ) { newSons.add(e.nextElement()); } for (Enumeration e = newSons.elements(); e.hasMoreElements(); ) { TypedNode kid = (TypedNode) e.nextElement(); System.out.println(kid); if (!oldSons.contains(kid.getUserObject())) { model.insertNodeInto(kid, node, node.getChildCount()); } //node.add(kid); } //Debug.trace(child + " children moved"); // copy value of new node to old node //if (node.getParent() != null) //{ //TypedNode parent = (TypedNode) node.getParent(); //int index = parent.getIndex(node); //model.removeNodeFromParent(node); //Debug.trace("remove"); //model.insertNodeInto(newNode, parent, index); //Debug.trace("insert"); node.setUserObject(newNode.getUserObject()); node.setComment(newNode.getComment()); //} return node; } catch (Exception ex) { ex.printStackTrace(); return null; } } // for test purpose public static void main(String[] args) { TypedTree t = new TypedTree(); t.buildSampleTree(); JFrame frame = new JFrame(); frame.setSize(800, 600); JEditorPane pane = new JEditorPane(); frame.getContentPane().add(new JScrollPane(pane)); pane.setContentType("text/html"); pane.setText(t.toString(true)); frame.setVisible(true); // System.out.print(t); } } --- NEW FILE: TreePopupMenuListener.java --- package edu.iastate.utils.tree; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.Icon; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.KeyStroke; import javax.swing.tree.TreePath; public abstract class TreePopupMenuListener extends MouseAdapter { public JPanel fatherPanel; public JPopupMenu popup = new JPopupMenu(); public TypedTree tree; public TreePopupMenuListener() { super(); } protected void addMenuItem(String text, Icon icon, ActionListener listener, JPopupMenu menu, String shortKey) { JMenuItem jMenuItem = (icon == null) ? new JMenuItem(text) : new JMenuItem(text, icon); jMenuItem.addActionListener(listener); if (shortKey != null) { jMenuItem.setAccelerator(KeyStroke.getKeyStroke(shortKey)); } menu.add(jMenuItem); } /** * Simplified addMenuItem * @param text String * @param listener ActionListener * @author Jie Bao * @since 2005-03-30 */ protected void addMenuItem(String text, ActionListener listener) { addMenuItem(text, null, listener, popup, null); } protected void addMenuItem(String text, Icon icon, ActionListener listener) { addMenuItem(text, icon, listener, popup, null); } public void mouseReleased(MouseEvent e) { showMenu(e); } public void showMenu(MouseEvent e) { TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); if (e.isPopupTrigger() && selPath != null) { tree.setSelectionPath(selPath); final TypedNode selectedNode = (TypedNode) selPath.getLastPathComponent(); boolean showpopup = false; popup = new JPopupMenu(); buildContextMenu(selectedNode); // show the menu showpopup = true; if (showpopup) { popup.show(e.getComponent(), e.getX(), e.getY()); } } } abstract protected void buildContextMenu(TypedNode selectedNode); } --- NEW FILE: TypedTreeEditor.java --- package edu.iastate.utils.tree; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JOptionPane; import javax.swing.tree.DefaultTreeModel; import edu.iastate.utils.undo.BulkEditingAction; import edu.iastate.utils.undo.EditingAction; import edu.iastate.utils.undo.UndoRedoStack; public abstract class TypedTreeEditor extends TreePopupMenuListener { public TypedTreeEditor() { super(); } /** * update the tree * * @param top MyNode */ protected void updateTree() { tree.repaint(); } abstract protected void changed(TypedNode theNode); // 2005-04-17 /** * @author Jie Bao * @since 1.0 2005-03-31 */ protected class DefaultDeleteAllChildrenAction implements ActionListener { TypedNode theNode; public DefaultDeleteAllChildrenAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { deleteAllChildren(theNode); } } protected void deleteAllChildren(TypedNode theNode) { DefaultTreeModel model = (DefaultTreeModel) tree.getModel(); int child = theNode.getChildCount(); BulkEditingAction bulk = new BulkEditingAction(theNode); bulk.summary = "Delete all children of '" + theNode + "'"; for (int i = 0; i < child; i++) { TypedNode kid = (TypedNode) theNode.getChildAt(0); model.removeNodeFromParent(kid); TreeNodeDeleteEditing action = new TreeNodeDeleteEditing( tree, kid, theNode); bulk.addAction(action); } history.addAction(bulk); changed(theNode); } /** * @author Jie Bao * @since 1.0 2005-03-31 */ protected class DefaultDeleteButKeepChildrenAction implements ActionListener { TypedNode theNode; public DefaultDeleteButKeepChildrenAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { DefaultTreeModel model = (DefaultTreeModel) tree.getModel(); TypedNode parent = (TypedNode) theNode.getParent(); int child = theNode.getChildCount(); BulkEditingAction bulk = new BulkEditingAction(parent); bulk.summary = "Delete '" + theNode + "' and keep its children"; for (int i = 0; i < child; i++) { TypedNode kid = (TypedNode) theNode.getChildAt(0); //model.removeNodeFromParent(kid); model.insertNodeInto(kid, parent, parent.getChildCount()); TreeNodeMoveEditing action = new TreeNodeMoveEditing( tree, kid, theNode, parent); bulk.addAction(action); } model.removeNodeFromParent(theNode); TreeNodeDeleteEditing action = new TreeNodeDeleteEditing(tree, theNode, parent); bulk.addAction(action); history.addAction(bulk); changed(theNode); changed(parent); } } protected class DefaultEditCommentsAction implements ActionListener { TypedNode theNode; public DefaultEditCommentsAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { String oldComments = (String) theNode.getComment(); String newComments = JOptionPane.showInputDialog( "Give comment for the node", oldComments); if (newComments == null) { return; } theNode.setComment(newComments); changed(theNode); TreeNodeCommentEditing action = new TreeNodeCommentEditing( theNode, oldComments, newComments); history.addAction(action); } } /** * @author Jie Bao * @since 1.0 2004-10-08 */ protected class DefaultDeleteAction implements ActionListener { TypedNode theNode; public DefaultDeleteAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { delete(theNode); } /** * DefaultDeleteAction */ public DefaultDeleteAction() { } } protected void delete(TypedNode theNode) { TypedNode parent = (TypedNode) theNode.getParent(); if (parent != null) { tree.getModel().removeNodeFromParent(theNode); changed(theNode); changed(parent); TreeNodeDeleteEditing action = new TreeNodeDeleteEditing( tree, theNode, parent); history.addAction(action); } } protected abstract class DefaultInsertParentAction implements ActionListener { public TypedNode theNode; public DefaultInsertParentAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { TypedNode parent = (TypedNode) theNode.getParent(); if (parent != null) { TypedNode newNode = getNewNode(); if (newNode == null) { return; } DefaultTreeModel model = tree.getModel(); model.insertNodeInto(newNode, parent, parent.getChildCount()); BulkEditingAction bulk = new BulkEditingAction(theNode); bulk.summary = "Insert parent '" + newNode + "' on '" + theNode + "'"; EditingAction action = new TreeNodeInsertEditing( tree, newNode, parent); bulk.addAction(action); model.removeNodeFromParent(theNode); action = new TreeNodeDeleteEditing(tree, theNode, parent); bulk.addAction(action); model.insertNodeInto(theNode, newNode, 0); action = new TreeNodeInsertEditing(tree, theNode, newNode); bulk.addAction(action); history.addAction(bulk); changed(theNode); } } protected abstract TypedNode getNewNode(); } protected abstract class DefaultRenameAction implements ActionListener { public TypedNode theNode; public DefaultRenameAction(TypedNode theNode) { this.theNode = theNode; } public void actionPerformed(ActionEvent e) { Object oldName = theNode.getUserObject(); Object newName = getNewUserObject(); if (newName != null) { theNode.setUserObject(newName); changed(theNode); TreeNodeRenameEditing action = new TreeNodeRenameEditing( theNode, oldName, newName); history.addAction(action); } } protected abstract Object getNewUserObject(); } // 2005-04-20 public class DefaultUndoAction implements ActionListener { public void actionPerformed(ActionEvent e) { undo(); } } public void undo() { if (history.canUndo()) { EditingAction action = history.undo(); changed( (TypedNode) action.location); } } // 2005-04-20 public class DefaultRedoAction implements ActionListener { public void actionPerformed(ActionEvent e) { redo(); } } public void redo() { if (history.canRedo()) { EditingAction action = history.redo(); changed( (TypedNode) action.location); } } protected abstract class DeafultCreateSubValueAction implements ActionListener { public TypedNode parent; public DeafultCreateSubValueAction(TypedNode parent) { this.parent = parent; } public void actionPerformed(ActionEvent e) { TypedNode newNode = getNewNode(); if (newNode != null) { tree.getModel().insertNodeInto(newNode, parent, parent.getChildCount()); tree.expandPath(newNode); tree.setSelectionPath(tree.getPath(newNode)); changed(newNode); EditingAction action = new TreeNodeInsertEditing( tree, newNode, parent); history.addAction(action); } } protected abstract TypedNode getNewNode(); } // 2005-04-20 public UndoRedoStack history = new UndoRedoStack(); public void addHistory(EditingAction action) { history.addAction(action); } } --- NEW FILE: TypedNode.java --- package edu.iastate.utils.tree; import java.awt.Color; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.Icon; /** * Node with a type * @author Jie Bao * @since 1.0 2004-10-02 */ public class TypedNode extends DefaultMutableTreeNode implements Comparable { // type of the node protected short type; protected Object comment; // 2004-10-13 protected Color color; // 2005-04-07 public Object clone() { TypedNode t = new TypedNode(this.getUserObject()); t.type = this.type; t.comment = this.comment; t.color = this.color; return t; } public short getType() { return type; } public void setType(short type) { this.type = type; } public TypedNode(Object userObject) { super(userObject); } /** * Icon of the node * This method should be overloaded in your class * @return Icon * @see TypedTreeRender * @author Jie Bao * @since 2005-08-23 */ public Icon getIcon() { return null; } /** * @param userObject Object * @param type short * @param comment String * @since 2004-10-18 */ public TypedNode(Object userObject, short type, String comment) { super(userObject); setType(type); setComment(comment); } public boolean equals(Object node) { if (node instanceof TypedNode) { return getLocalName().equals( ( (TypedNode) node).getLocalName()); } else { return false; } } /** * Get name of the node * @since 2004-10-13 */ public String getLocalName() { return getUserObject().toString(); } public Object getComment() { return comment; } public Color getColor() { return color; } public void setComment(Object comment) { this.comment = comment; } public void setColor(Color color) { this.color = color; } /** * toXML - plain text only YET * * @return String * @since 2004-10-18 */ public String toXML() { return getUserObject().toString(); } /** * read from XML - plain text only YET * @param xml String * @since 2004-10-18 */ public void fromXML(String xml) { this.setUserObject(xml); } public final static short ROOT = 0; public final static short ALL_CLASSES = 1; public final static short ALL_PROPERTIES = 2; public final static short ALL_INSTANCES = 3; public final static short CLASS = 4; public final static short PROPERTY = 5; public final static short INSTANCE = 6; public final static short PACKAGE = 7; public final static short DOMAIN = 8; // used on INDUS Data source editor public final static short ATTRIBUTE = 9; public final static short AVH = 10; public final static short DB = 11; public final static short TABLE = 12; /** * * @param o Object * @return int * @since 2004-10-18 */ public int compareTo(Object o) { if (o instanceof TypedNode) { return getLocalName().compareTo( ( (TypedNode) o).getLocalName()); } return -2; } /** * TypedNode */ public TypedNode() { } } --- NEW FILE: TreeNodeMoveEditing.java --- package edu.iastate.utils.tree; import edu.iastate.utils.undo.EditingAction; /** * @since 2005-04-20 */ public class TreeNodeMoveEditing extends EditingAction { TypedTree tree; TypedNode oldParent, newParent; public TreeNodeMoveEditing(TypedTree tree, TypedNode location, TypedNode oldParent, TypedNode newParent) { this.tree = tree; this.location = location; this.oldParent = oldParent; this.newParent = newParent; this.summary = "Move node '" + location + "' from '" + oldParent + "' to '" + newParent + "'"; } public void undo() { // remove location from newParent if (newParent.isNodeChild( (TypedNode) location)) { tree.getModel().removeNodeFromParent( (TypedNode) location); } // and insert it to oldParent tree.getModel().insertNodeInto( (TypedNode) location, oldParent, oldParent.getChildCount()); tree.expandNode( (TypedNode) location); } public void redo() { // remove location from oldParent if (oldParent.isNodeChild( (TypedNode) location)) { tree.getModel().removeNodeFromParent( (TypedNode) location); } // insert location to newParent tree.getModel().insertNodeInto( (TypedNode) location, newParent, newParent.getChildCount()); tree.expandNode( (TypedNode) location); } } --- NEW FILE: TreeNodeRenameEditing.java --- package edu.iastate.utils.tree; import edu.iastate.utils.undo.EditingAction; /** * @since 2005-04-20 */ public class TreeNodeRenameEditing extends EditingAction { Object oldValue, newValue; public TreeNodeRenameEditing(TypedNode location, Object oldValue, Object newValue) { this.location = location; this.oldValue = oldValue; this.newValue = newValue; this.summary = "Change node '" + oldValue + "' -> '" + newValue + "'"; } public void undo() { ( (TypedNode) location).setUserObject(oldValue); } public void redo() { ( (TypedNode) location).setUserObject(newValue); } } --- NEW FILE: SortTreeModel.java --- package edu.iastate.utils.tree; // SortTreeModel.java // This class is similar to the DefaultTreeModel, but it keeps // a node's children in alphabetical order. // import java.util.Comparator; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.MutableTreeNode; import javax.swing.tree.TreeNode; /** * http://examples.oreilly.com/jswing2/code/ch17/SortTreeModel.java * * imported and modified 2005-04-21 * @author Jie Bao */ public class SortTreeModel extends DefaultTreeModel { private Comparator comparator; public SortTreeModel(TreeNode root) { super(root); comparator = new TreeStringComparator(); } public SortTreeModel(TreeNode node, Comparator c) { super(node); comparator = c; } public SortTreeModel(TreeNode node, boolean asksAllowsChildren, Comparator c) { super(node, asksAllowsChildren); comparator = c; } public void insertNodeInto(MutableTreeNode child, MutableTreeNode parent) { int index = findIndexFor(child, parent); super.insertNodeInto(child, parent, index); } public void insertNodeInto(MutableTreeNode child, MutableTreeNode par, int i) { // The index is useless in this model, so just ignore it. insertNodeInto(child, par); } // Perform a recursive binary search on the children to find the right // insertion point for the next node. private int findIndexFor(MutableTreeNode child, MutableTreeNode parent) { int cc = parent.getChildCount(); if (cc == 0) { return 0; } if (cc == 1) { return comparator.compare(child, parent.getChildAt(0)) <= 0 ? 0 : 1; } return findIndexFor(child, parent, 0, cc - 1); // First & last index } private int findIndexFor(MutableTreeNode child, MutableTreeNode parent, int i1, int i2) { if (i1 == i2) { return comparator.compare(child, parent.getChildAt(i1)) <= 0 ? i1 : i1 + 1; } int half = (i1 + i2) / 2; if (comparator.compare(child, parent.getChildAt(half)) <= 0) { return findIndexFor(child, parent, i1, half); } return findIndexFor(child, parent, half + 1, i2); } } class TreeStringComparator implements Comparator { public int compare(Object o1, Object o2) { if (! (o1 instanceof DefaultMutableTreeNode && o2 instanceof DefaultMutableTreeNode)) { throw new IllegalArgumentException( "Can only compare DefaultMutableTreeNode objects"); } String s1 = ( (DefaultMutableTreeNode) o1).getUserObject().toString(); String s2 = ( (DefaultMutableTreeNode) o2).getUserObject().toString(); return s1.compareToIgnoreCase(s2); } } --- NEW FILE: TreeNodeInsertEditing.java --- package edu.iastate.utils.tree; import edu.iastate.utils.undo.EditingAction; /** * @since 2005-04-20 */ public class TreeNodeInsertEditing extends EditingAction { TypedNode parent; TypedTree tree; public TreeNodeInsertEditing(TypedTree tree, TypedNode location, TypedNode parent) { this.tree = tree; this.location = location; this.parent = parent; this.summary = "Insert node '" + location + "' under '" + parent+"'"; } public void redo() { // insert location to parent if ( ( (TypedNode) location).getParent() != null) { tree.getModel().removeNodeFromParent( (TypedNode) location); } tree.getModel().insertNodeInto( (TypedNode) location, parent, parent.getChildCount()); tree.expandNode( (TypedNode) location); } public void undo() { // remove location from parent if (parent.isNodeChild( (TypedNode) location)) { tree.getModel().removeNodeFromParent( (TypedNode) location); } } } --- NEW FILE: TreeNodeCommentEditing.java --- package edu.iastate.utils.tree; import edu.iastate.utils.undo.EditingAction; /** * @since 2005-04-20 */ public class TreeNodeCommentEditing extends EditingAction { Object oldValue, newValue; public TreeNodeCommentEditing(TypedNode location, Object oldValue, Object newValue) { this.location = location; this.oldValue = oldValue; this.newValue = newValue; this.summary = "Change node '" + location + "'s comment '" + oldValue + "' -> '" + newValue + "'"; } public void undo() { ( (TypedNode) location).setComment(oldValue); } public void redo() { ( (TypedNode) location).setComment(newValue); } } |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/details In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/gui/details Modified Files: NavigationPanel.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: NavigationPanel.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/details/NavigationPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NavigationPanel.java 20 Jun 2006 02:38:24 -0000 1.2 --- NavigationPanel.java 29 Jun 2006 22:15:54 -0000 1.3 *************** *** 13,18 **** import javax.swing.tree.TreePath ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.gui.TypedTreePanel ; --- 13,16 ---- *************** *** 24,27 **** --- 22,27 ---- import edu.iastate.ato.tree.MetaTreeNode ; import edu.iastate.ato.tree.Term2Tree ; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTree; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/tree In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/tree Modified Files: Term2Tree.java ATOTreeRender.java PackageNode.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: Term2Tree.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/tree/Term2Tree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Term2Tree.java 24 Jun 2006 12:19:25 -0000 1.2 --- Term2Tree.java 29 Jun 2006 22:15:54 -0000 1.3 *************** *** 6,14 **** import java.util.Vector ; - import edu.iastate.anthill.indus.tree.TypedNode ; import edu.iastate.ato.po.DbPackage ; import edu.iastate.ato.po.DbTerm ; import edu.iastate.ato.po.OntologyQuerier ; import edu.iastate.ato.shared.LongTask ; /** --- 6,14 ---- import java.util.Vector ; import edu.iastate.ato.po.DbPackage ; import edu.iastate.ato.po.DbTerm ; import edu.iastate.ato.po.OntologyQuerier ; import edu.iastate.ato.shared.LongTask ; + import edu.iastate.utils.tree.TypedNode; /** Index: PackageNode.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/tree/PackageNode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PackageNode.java 13 Jun 2006 21:55:24 -0000 1.1 --- PackageNode.java 29 Jun 2006 22:15:54 -0000 1.2 *************** *** 10,14 **** import javax.swing.JProgressBar ; - import edu.iastate.anthill.indus.tree.TypedNode ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.gui.packageview.PackageTree ; --- 10,13 ---- *************** *** 19,22 **** --- 18,22 ---- import edu.iastate.utils.Debug ; import edu.iastate.utils.lang.StopWatch ; + import edu.iastate.utils.tree.TypedNode; /** Index: ATOTreeRender.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/tree/ATOTreeRender.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ATOTreeRender.java 13 Jun 2006 21:55:24 -0000 1.1 --- ATOTreeRender.java 29 Jun 2006 22:15:54 -0000 1.2 *************** *** 1,6 **** package edu.iastate.ato.tree ; - import edu.iastate.anthill.indus.tree.TypedTreeRender ; import edu.iastate.ato.shared.IconLib ; /** --- 1,6 ---- package edu.iastate.ato.tree ; import edu.iastate.ato.shared.IconLib ; + import edu.iastate.utils.tree.TypedTreeRender; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:59
|
Update of /cvsroot/cob/COBEditor In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692 Modified Files: onteditor.xml Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: onteditor.xml =================================================================== RCS file: /cvsroot/cob/COBEditor/onteditor.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** onteditor.xml 20 Jun 2006 02:50:50 -0000 1.4 --- onteditor.xml 29 Jun 2006 22:15:54 -0000 1.5 *************** *** 1 **** ! <?xml version="1.0" encoding="UTF-8"?><Config><SelectedOntology>ato</SelectedOntology><AllOntologies><Ontology><name>may28</name><url>jdbc:postgresql://localhost:5432/may28</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>may28</user><password>120_-100_-53_77_-84_52_-78_0_0_5_-79_1_-78_</password></Ontology><Ontology><name>Animal</name><url>jdbc:postgresql://animalgenome.org:5432/ato</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>baojie</user><password>120_-100_75_74_-52_55_53_48_48_52_0_0_11_68_2_41_</password></Ontology><Ontology><name>ato</name><url>jdbc:postgresql://localhost:5432/ato</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>ato</user><password>120_-100_75_44_-55_7_0_2_125_1_69_</password></Ontology></AllOntologies></Config> --- 1 ---- ! <?xml version="1.0" encoding="UTF-8"?><Config><SelectedOntology>may28</SelectedOntology><AllOntologies><Ontology><name>may28</name><url>jdbc:postgresql://localhost:5432/may28</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>may28</user><password>120_-100_-53_77_-84_52_-78_0_0_5_-79_1_-78_</password></Ontology><Ontology><name>Animal</name><url>jdbc:postgresql://animalgenome.org:5432/ato</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>baojie</user><password>120_-100_75_74_-52_55_53_48_48_52_0_0_11_68_2_41_</password></Ontology><Ontology><name>ato</name><url>jdbc:postgresql://localhost:5432/ato</url><driver>org.postgresql.Driver</driver><type>POSTGRE</type><user>ato</user><password>120_-100_75_44_-55_7_0_2_125_1_69_</password></Ontology></AllOntologies></Config> |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/gui/dialog Modified Files: LoginPanel.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: LoginPanel.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog/LoginPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LoginPanel.java 29 Jun 2006 20:41:18 -0000 1.2 --- LoginPanel.java 29 Jun 2006 22:15:54 -0000 1.3 *************** *** 237,240 **** --- 237,242 ---- MessageMap.mapAction(this.btnOK, this, "onOK") ; + + // Peter Wong 2006-06-29: login with "Enter" MessageMap.mapAction(this.passTxt, this, "onOK") ; MessageMap.mapAction(this.userTxt, this, "onOK") ; |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/po In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/po Modified Files: DataSourceNode.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: DataSourceNode.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/DataSourceNode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DataSourceNode.java 13 Jun 2006 21:55:24 -0000 1.1 --- DataSourceNode.java 29 Jun 2006 22:15:54 -0000 1.2 *************** *** 1,5 **** package edu.iastate.ato.po; ! import edu.iastate.anthill.indus.tree.TypedNode; /** --- 1,5 ---- package edu.iastate.ato.po; ! import edu.iastate.utils.tree.TypedNode; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:58
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/relationview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/gui/relationview Modified Files: RelationView.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: RelationView.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/relationview/RelationView.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RelationView.java 20 Jun 2006 02:38:24 -0000 1.3 --- RelationView.java 29 Jun 2006 22:15:54 -0000 1.4 *************** *** 9,14 **** import javax.swing.tree.TreePath ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.gui.TypedTreePanel ; --- 9,12 ---- *************** *** 20,23 **** --- 18,23 ---- import edu.iastate.ato.tree.MetaTreeNode ; import edu.iastate.ato.tree.Term2Tree ; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTree; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:58
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/anthill/indus/tree In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/anthill/indus/tree Removed Files: SortTreeModel.java TypedNode.java TreeNodeRenameEditing.java TreeNodeCommentEditing.java TreeNodeDeleteEditing.java TypedTree.java TreeNodeInsertEditing.java TypedTreeRender.java TreeNodeMoveEditing.java TypedTreeEditor.java TreePopupMenuListener.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree --- TypedTreeRender.java DELETED --- --- TreeNodeDeleteEditing.java DELETED --- --- TypedTree.java DELETED --- --- TreePopupMenuListener.java DELETED --- --- TypedTreeEditor.java DELETED --- --- TypedNode.java DELETED --- --- TreeNodeMoveEditing.java DELETED --- --- TreeNodeRenameEditing.java DELETED --- --- SortTreeModel.java DELETED --- --- TreeNodeInsertEditing.java DELETED --- --- TreeNodeCommentEditing.java DELETED --- |
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7692/src/edu/iastate/ato/gui/packageview Modified Files: PackageView.java Package2Tree.java PackageTreeEditorBasis.java PackageTreeEditor.java PackageView2Db.java PackageTree.java Log Message: Jie 2006-jun-29 renamed indus.tree package to utils.tree Index: PackageTree.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageTree.java 17 Jun 2006 13:49:28 -0000 1.2 --- PackageTree.java 29 Jun 2006 22:15:53 -0000 1.3 *************** *** 5,10 **** import java.util.Vector ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.po.OntologyQuerier ; --- 5,8 ---- *************** *** 14,17 **** --- 12,17 ---- import edu.iastate.ato.tree.DbTermNode ; import edu.iastate.ato.tree.PackageNode ; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTree; /** Index: PackageTreeEditorBasis.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeEditorBasis.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageTreeEditorBasis.java 20 Jun 2006 02:38:24 -0000 1.2 --- PackageTreeEditorBasis.java 29 Jun 2006 22:15:53 -0000 1.3 *************** *** 9,14 **** import javax.swing.JOptionPane ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTreeEditor ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.po.DbPackage ; --- 9,12 ---- *************** *** 25,28 **** --- 23,28 ---- import java.util.* ; import edu.iastate.utils.lang.StopWatch ; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTreeEditor; public abstract class PackageTreeEditorBasis extends TypedTreeEditor Index: PackageTreeEditor.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageTreeEditor.java 16 Jun 2006 22:44:13 -0000 1.2 --- PackageTreeEditor.java 29 Jun 2006 22:15:53 -0000 1.3 *************** *** 10,15 **** import javax.swing.JSeparator ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTreeEditor ; import edu.iastate.ato.agent.ChatPanel ; import edu.iastate.ato.agent.MoAgent ; --- 10,13 ---- *************** *** 33,36 **** --- 31,36 ---- import edu.iastate.utils.gui.GUIUtils ; import edu.iastate.utils.net.EmailTools ; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTreeEditor; /** Index: PackageView2Db.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageView2Db.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageView2Db.java 17 Jun 2006 13:49:28 -0000 1.3 --- PackageView2Db.java 29 Jun 2006 22:15:53 -0000 1.4 *************** *** 4,8 **** import java.util.Vector ; - import edu.iastate.anthill.indus.tree.TypedNode ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.po.OntologyEdit ; --- 4,7 ---- *************** *** 12,15 **** --- 11,15 ---- import edu.iastate.ato.tree.PackageNode ; import edu.iastate.utils.Debug; + import edu.iastate.utils.tree.TypedNode; /** Index: Package2Tree.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/Package2Tree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Package2Tree.java 20 Jun 2006 02:38:23 -0000 1.2 --- Package2Tree.java 29 Jun 2006 22:15:53 -0000 1.3 *************** *** 7,11 **** import javax.swing.JScrollPane ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.gui.OntologyServerInfo ; --- 7,10 ---- *************** *** 18,21 **** --- 17,21 ---- import edu.iastate.utils.Debug ; import edu.iastate.utils.sql.LocalDBConnection ; + import edu.iastate.utils.tree.TypedTree; /** Index: PackageView.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageView.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PackageView.java 29 Jun 2006 22:09:47 -0000 1.4 --- PackageView.java 29 Jun 2006 22:15:53 -0000 1.5 *************** *** 14,19 **** import javax.swing.tree.TreePath ; - import edu.iastate.anthill.indus.tree.TypedNode ; - import edu.iastate.anthill.indus.tree.TypedTree ; import edu.iastate.ato.gui.MOEditor ; import edu.iastate.ato.gui.TypedTreePanel ; --- 14,17 ---- *************** *** 27,30 **** --- 25,30 ---- import edu.iastate.utils.gui.JStatusBar; import edu.iastate.utils.lang.*; + import edu.iastate.utils.tree.TypedNode; + import edu.iastate.utils.tree.TypedTree; /** |
From: Jie B. <ba...@us...> - 2006-06-29 22:15:50
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/utils/tree In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7683/src/edu/iastate/utils/tree Log Message: Directory /cvsroot/cob/COBEditor/src/edu/iastate/utils/tree added to the repository |
From: Jie B. <ba...@us...> - 2006-06-29 22:09:51
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5116/src/edu/iastate/ato/gui/packageview Modified Files: PackageView.java Log Message: Index: PackageView.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageView.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PackageView.java 29 Jun 2006 20:17:22 -0000 1.3 --- PackageView.java 29 Jun 2006 22:09:47 -0000 1.4 *************** *** 134,139 **** { onSave() ; ! } } } --- 134,140 ---- { onSave() ; ! } } + tree.modified = false; } |
From: Jie B. <ba...@us...> - 2006-06-29 22:09:51
|
Update of /cvsroot/cob/COBEditor/images In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5116/images Removed Files: attachment_big.png attachment_small.png Log Message: --- attachment_small.png DELETED --- --- attachment_big.png DELETED --- |
From: Jie B. <ba...@us...> - 2006-06-29 22:09:51
|
Update of /cvsroot/cob/COBEditor/document/log In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5116/document/log Modified Files: baojie-log2006.txt Log Message: Index: baojie-log2006.txt =================================================================== RCS file: /cvsroot/cob/COBEditor/document/log/baojie-log2006.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** baojie-log2006.txt 20 Jun 2006 04:14:48 -0000 1.6 --- baojie-log2006.txt 29 Jun 2006 22:09:47 -0000 1.7 *************** *** 62,65 **** --- 62,73 ---- * LaRon has done the "ExportText" programming + 2006-06-23(Fri) + * Peter's user manual done + + 2006-06-28(Wed) + * Meet with Laron and Peter: bug list + + 2006-06-29(Thu) + * Put bug list on SF \ No newline at end of file |
From: Jie B. <ba...@us...> - 2006-06-29 22:09:51
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/naming In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5116/src/edu/iastate/ato/po/naming Modified Files: BasicNamingPolicy.java Log Message: Index: BasicNamingPolicy.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/naming/BasicNamingPolicy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicNamingPolicy.java 13 Jun 2006 21:55:24 -0000 1.1 --- BasicNamingPolicy.java 29 Jun 2006 22:09:47 -0000 1.2 *************** *** 20,24 **** * @param baseName String * @return String ! * @todo Implement this edu.iastate.ato.ui.naming.NamingPolicy method */ public String makeNameWhenCreating(String baseName) --- 20,24 ---- * @param baseName String * @return String ! * @todo Implement this edu.iastate.anthill.cob.ui.naming.NamingPolicy method */ public String makeNameWhenCreating(String baseName) |
From: Peter W. <pw...@us...> - 2006-06-29 20:41:35
|
Update of /cvsroot/cob/COBEditor/document/log In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3445/document/log Added Files: pwwong-log2006.txt Log Message: --- NEW FILE: pwwong-log2006.txt --- 2005-06-29(THU): BUG Fixes * Dragging a package onto another brought up a dialogue box asking "merge or don't merge?", the user has 3 options "yes", "no", and "cancel". Selecting the "cancel" and "no" did the same thing. Selecting "cancel" now does not affect the ontology. * Hitting enter in either the Username or Password field, will be equivalent to hitting the "OK" button. Features Implemented * Selecting a term or package, the querying will be run on a seperate thread. Also a progress bar will be displayed. |
From: Peter W. <pw...@us...> - 2006-06-29 20:41:23
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3036/src/edu/iastate/ato/gui/dialog Modified Files: LoginPanel.java Log Message: Hitting enter in either the Username or Password field, will be equivalent to hitting the "OK" button. Index: LoginPanel.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/dialog/LoginPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LoginPanel.java 13 Jun 2006 21:55:25 -0000 1.1 --- LoginPanel.java 29 Jun 2006 20:41:18 -0000 1.2 *************** *** 234,239 **** MessageMap.mapAction(this.btnGuest, this, "onGuest") ; MessageMap.mapAction(this.btnRegister, this, "onRegister") ; ! MessageMap.mapAction(this.btnCancel, this, "onCancel") ; MessageMap.mapAction(this.btnOK, this, "onOK") ; } catch(Exception ex) --- 234,242 ---- MessageMap.mapAction(this.btnGuest, this, "onGuest") ; MessageMap.mapAction(this.btnRegister, this, "onRegister") ; ! MessageMap.mapAction(this.btnCancel, this, "onCancel"); ! MessageMap.mapAction(this.btnOK, this, "onOK") ; + MessageMap.mapAction(this.passTxt, this, "onOK") ; + MessageMap.mapAction(this.userTxt, this, "onOK") ; } catch(Exception ex) |
From: Peter W. <pw...@us...> - 2006-06-29 20:17:26
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26233/src/edu/iastate/ato/gui/packageview Modified Files: PackageView.java PackageTreeDargDropListener.java Log Message: Index: PackageTreeDargDropListener.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageTreeDargDropListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageTreeDargDropListener.java 17 Jun 2006 13:49:28 -0000 1.2 --- PackageTreeDargDropListener.java 29 Jun 2006 20:17:22 -0000 1.3 *************** *** 118,126 **** int answer = JOptionPane.showConfirmDialog(null, "Move here (NO to merge)? ") ; if(answer == JOptionPane.YES_OPTION) { tree.movePackage(sourcePkg, targetPkg) ; } ! else { // merge two packages --- 118,127 ---- int answer = JOptionPane.showConfirmDialog(null, "Move here (NO to merge)? ") ; + if(answer == JOptionPane.YES_OPTION) { tree.movePackage(sourcePkg, targetPkg) ; } ! else if(answer == JOptionPane.NO_OPTION) { // merge two packages *************** *** 141,145 **** --- 142,150 ---- // mark the old package as deleted sourcePkg.status = ATOTreeNode.DELETED_NODE ; + } + + + // If Cancel is selected, nothing is done } } Index: PackageView.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/gui/packageview/PackageView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageView.java 20 Jun 2006 02:38:23 -0000 1.2 --- PackageView.java 29 Jun 2006 20:17:22 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- import edu.iastate.ato.tree.PackageNode ; import edu.iastate.ato.tree.Term2Tree ; + import edu.iastate.utils.gui.JStatusBar; import edu.iastate.utils.lang.*; *************** *** 164,172 **** if(e.getClickCount() == 1) { ! StopWatch w = new StopWatch(); ! w.start(); ! MOEditor.theInstance.paneDetails.update(selectedNode) ; ! w.stop(); ! System.out.println(w.print()); } else if(e.getClickCount() == 2) --- 165,192 ---- if(e.getClickCount() == 1) { ! final JStatusBar statusBar = MOEditor.theInstance.statusBar ; ! Thread t = new Thread() ! { ! public void run() ! { ! int pb = statusBar.addProgressBar(true, 0, 0) ; ! String termOrPackage=""; ! if(selectedNode instanceof DbTermNode){ ! termOrPackage= "Term"; ! }else if(selectedNode instanceof DbTermNode){ ! termOrPackage= "Package"; ! } ! statusBar.updateProgressBar(pb,"Loading "+termOrPackage+": "+selectedNode.getLocalName()); ! ! StopWatch w = new StopWatch(); ! w.start(); ! MOEditor.theInstance.paneDetails.update(selectedNode) ; ! w.stop(); ! System.out.println(w.print()); ! ! statusBar.removeProgressBar(pb); ! } ! } ; ! t.start() ; } else if(e.getClickCount() == 2) |
From: Jie B. <ba...@us...> - 2006-06-29 02:40:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/utils/log In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3936/src/edu/iastate/utils/log Removed Files: Config.jbx Log Message: --- Config.jbx DELETED --- |
From: Jie B. <ba...@us...> - 2006-06-29 02:40:59
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/utils/sql In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3936/src/edu/iastate/utils/sql Removed Files: SQLPanel.jbx LocalDBConnection.jbx DBPanel.jbx Log Message: --- LocalDBConnection.jbx DELETED --- --- SQLPanel.jbx DELETED --- --- DBPanel.jbx DELETED --- |
From: Jie B. <ba...@us...> - 2006-06-29 02:40:57
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/po In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3936/src/edu/iastate/ato/po Removed Files: LongTask.jbx Log Message: --- LongTask.jbx DELETED --- |
From: Jie B. <ba...@us...> - 2006-06-29 02:40:57
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/utils/string In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3936/src/edu/iastate/utils/string Removed Files: TaggedText.jbx Log Message: --- TaggedText.jbx DELETED --- |