home *** CD-ROM | disk | FTP | other *** search
- Save Format v2.3(19971110)
- @begin ClassFile "StringLengthSort"
-
- @begin Object "Powersoft Java AWT 1.02::powersoft.painter.Class"
- DesignName StringLengthSort;
- @begin ClassProperties
- Exported 1;
- @begin-code BaseClassList
-
- extends Object implements CompareRoutine
-
- @end-code;
- @begin CPMethod "compare"
- @begin CPPrototype "Prototype for compareMethod"
- @begin-code SourceCode "Prototype for compareMethod"
-
- // Not used for Java classes
-
- @end-code;
- @end;
- @begin CPDefinition "compareMethod"
- @begin-code SourceCode "compareMethod"
-
- //
- // compareMethod
- //
-
- public int compare(Object a, Object b)
- {
- return ((String) a).length() - ((String) b).length();
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin CodeBlocks
- @begin CodeBlock "HppPrefix"
- FunctionScope 1;
- @begin-code SourceCode "Imports()"
-
- // add your custom import statements here
- import powersoft.powerj.util.*;
-
-
- // This class was created to implement a new compare routine
- // for the SortableVector. The compare method is defined in the
- // CompareRoutine interface and must return an integer.
- //
- // compare returns:
- // a negative number if a < b
- // zero if a == b
- // a positive number if a > b
-
- @end-code;
- @end;
- @begin CodeBlock "ClassContents"
- FunctionScope 1;
- @begin-code SourceCode "Data Members()"
-
- // add your data members here
-
- @end-code;
- @end;
- @begin CodeBlock "GeneratedClassContents"
- FunctionScope 1;
- @begin-code SourceCode "GeneratedClassContents()"
-
-
- @end-code;
- @end;
- @begin CodeBlock "CppPrefix"
- FunctionScope 6;
- GeneratedFunction 1;
- @begin-code SourceCode "Not Applicable for Java()"
-
-
- @end-code;
- @end;
- @end;
- @end;
- @end;
-