[Mc4j-cvs] mc4j/src/org/mc4j/console/connection ConnectionNode.java,1.25,1.26
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-04-07 15:40:39
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22877/src/org/mc4j/console/connection Modified Files: ConnectionNode.java Log Message: Made all nodes comparable and started using Children.SortedArray so that all nodes in the explorer are always sorted by their display names. Index: ConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/ConnectionNode.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ConnectionNode.java 7 Apr 2004 03:09:31 -0000 1.25 --- ConnectionNode.java 7 Apr 2004 15:27:35 -0000 1.26 *************** *** 73,77 **** * @version $Revision$($Author$ / $Date$) */ ! public abstract class ConnectionNode extends AbstractNode implements IConnectionNode, PropertyChangeListener { --- 73,77 ---- * @version $Revision$($Author$ / $Date$) */ ! public abstract class ConnectionNode extends AbstractNode implements IConnectionNode, PropertyChangeListener, Comparable { *************** *** 128,131 **** --- 128,136 ---- } + public int compareTo(Object o) { + Node otherNode = (Node) o; + return this.getDisplayName().compareTo(otherNode.getDisplayName()); + } + public void initialize(ConnectionSettings settings) { this.connectionSettings = settings; *************** *** 509,513 **** } ! public String GetConnectionType() { return this.connectionSettings.getConnectionType(); } --- 514,518 ---- } ! public String getConnectionType() { return this.connectionSettings.getConnectionType(); } |