Abstract:
A method, system and program for transforming one or more icons in an object-oriented, graphical environment. The icon transformations entail the changing of an icon from one state to another using drag and drop techniques. The user drops an input object icon onto the transformer object icon. The transformer object removes the input object from the graphical environment, changes its contents and/or attributes, and places the new output icon on the desktop. Icon transformers convert objects in a one-to-one, many-to-one, one-to-many, or many-to-many fashion.

Description:
FIELD OF THE INVENTION 
     This invention generally relates to improvements in computer display systems and more particularly to directly manipulating a graphic display system using icon based actions. 
     BACKGROUND OF THE INVENTION 
     Using icons to organize a display and giving a user the appearance of an electronic desktop first appeared at Xerox Parc in the late 70&#39;s. Early attempts to commercialize a desktop motif were unsuccessful. However, an implementation is disclosed in U.S. Pat. No. 5,060,135, &#34;Apparatus for Manipulating Documents in a Data Processing System Utilizing Reduced Images of Sheets of Information Which Are Movable.&#34; More recently, the IBM OS/2 Workplace Shell desktop motif provides icon manipulation. For example, users can drag a document icon, representing a letter, and drop it on the shredder icon to delete the document. 
     Other examples of icon manipulation include, U.S. Pat. No. 5,021,976 entitled, &#34;Method and System for Generating Dynamic Interactive Visual Representations of Information Structures Within a Computer,&#34; which discloses a knowledge based system that links various mathematical relationships with icons on a graphical display. Visual features of the display assume various conditions (change of color/size) in accordance with the mathematical relationships. 
     However, none of the prior art techniques provide a method for easily and flexibly manipulating the information in an icon from one form to another in accordance with the subject invention. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is a primary object of the present invention to provide a method in which icon transformers can be used in an object-oriented, graphical environment to change the contents of an icon from one state to another using drag and drop techniques. 
     These and other objects are accomplished by creating a transformer object, represented by an icon, that has an associated set of rules stored in an associated data structure. This transformer object modifies the attributes of a dropped icon and changes its contents to a new object, while retaining some of the attributes from the original object, if needed. If a user drops an icon object on a transformer icon and the dropped object does not conform to the input expected by the transformer, the input icon is transformed into a not symbol. 
     For valid input object processing, when the user drops an object on a transformer object, it is removed from the desktop, application window, or container object from which it came. In its place, an output object icon is created next to the icon transformer object. This output object icon&#39;s contents are a modified version of the dropped input object&#39;s contents. The contents are changed in accordance with the rules in the transformer object. 
     Users can also duplicate their input objects and drop them separately or in a group on top of an icon transformer. The transformer changes one or more of the input objects into their output object counterparts based on the number of objects dropped on the transformer. 
     Objects can be changed from one state to another in current application implementations. For example, when importing a text file from word processor X to word processor Y, the latter word processor converts a document from X into one that Y can understand. This technique involves changing the contents of the file and/or its attributes. However, this processing does not address the problem in an object-oriented manner. These actions take place within the application and not outside of it, such as on the desktop or in a window container. Icon transformers can exist where icons can be dragged and dropped to convert objects in a one-to-one, many-to-one, one-to-many, or many-to-many fashion. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a personal computer system in accordance with the subject invention; 
     FIG. 2 illustrates a file input icon and a converted output icon before and after a conversion operation in accordance with the subject invention; 
     FIG. 3 is a data structure representing an icon in accordance with the subject invention; 
     FIG. 4 is a data structure representing a transformation icon in accordance with the subject invention; 
     FIG. 5 is a flowchart of the icon transformation logic in accordance with the subject invention; 
     FIG. 6 is a flowchart of the icon transformation logic in accordance with the subject invention; and 
     FIG. 7 is a flowchart of the transformation logic in accordance with the subject invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The invention is preferably practiced in a representative hardware environment as depicted in FIG. 1, which illustrates a typical hardware configuration of a workstation in accordance with the subject invention having a central processing unit 10, such as a conventional microprocessor, and a number of other units interconnected via a system bus 12. The workstation shown in FIG. 1 includes a Random Access Memory (RAM) 14, Read Only Memory (ROM) 16, an I/O adapter 18 for connecting Peripheral devices such as disk units 20 and tape drives 40 to the bus, a user interface adapter 22 for connecting a keyboard 24, a mouse 26, a speaker 28, a microphone 32, and/oi, other user interface devices such as a touch screen device (not shown) to the bus, a communication adapter 34 for connecting the workstation to a data processing network and a display adapter 36 for connecting the bus to a display device 38. 
     The invention is a method and system for easily changing information associated with an icon from one state to another. For example, a user may require that a document be changed from one word processing format to another (Revisable Form Text (RFT) to WordPerfect). Today, this would be accomplished by invoking a CONVERT program from the command line or from an internal application call and inputing the source and destination file for the conversion. Then, the program would process the source information and convert the file into the destination output file. 
     The subject invention allows a user to convert a file by simply dragging the file icon to an icon representative of a convert operation and dropping the file icon onto the convert icon. This action will invoke a convert operation that transforms the original file associated with the file icon into a converted file associated with a new icon representative of the converted file. FIG. 2 shows the file icon 200 and the convert icon 210 before the conversion operation, and the convert icon 220 and the converted file icon 230 after the convert operation. Note that the shape of the icon has changed. 
     FIG. 3 is a data structure representing the icon. Attribute information 300 contains descriptive information pertaining to the icon similar to a header in a data file. The contents 310 are similar to text in a data file. 
     FIG. 4 is a data structure representing a transformation icon. Attribute information 400 contains descriptive information pertaining to the icon similar to a header in a data file. The contents 410 contain rules associated with a transformation operation that is invoked when an icon is dropped on the transformation icon. 
     FIG. 5 is a flowchart depicting detailed logic in accordance with the subject invention. Processing commences at terminal block 500 and immediately passes to function block 510 where the icon transformer retrieves attributes of an icon dropped on it. Then a test is performed at decision block 512 to determine if the dropped icon has compatible attributes. If compatibility is detected, then the dropped icon is removed from the desktop at function block 514, the transformation code is executed at function block 516 and control passes via label 520 to label 570 where the transformed icon is redisplayed next to the icon transformer as shown in function block 580. The desktop metaphor in this example can be an application window or a container object similar to that found in the OS/2 operating system. 
     If the attributes do not match at decision block 512, then further tests are performed in a similar fashion leading up to decision block 530 to determine if the attributes of the dropped icon match another characteristic that the icon transformer can handle. If so, then the dropped icon is removed from the display at function block 532, transformation code associated with the characteristic is executed at function block 534 and the transformed icon is redisplayed next to the icon transformer at function block 580. If no match is detected between the dropped icon&#39;s attributes and any of the transformer characteristics, then the dropped icon is redisplayed in an error mode (such as turning it into a not symbol) as shown in function block 550. 
     FIG. 6 is a flowchart of the detailed logic in accordance with the subject invention. Processing commences at terminal 600 and control immediately passes to function block 602 where attributes of the icon dropped on the icon transformer are retrieved. Then, at decision block 604 a test is performed to determine if the attributes of the dropped icon match the expected attributes for a document created by a word Processor X. If a match is detected, then the document icon is removed from the desktop as shown in function block 606, the special characters that were imbedded by X are replaced with spaces as set forth in function block 608 and control is passed via label 610 to FIG. 7 at label 720. In FIG. 7 at label 730, the transformed document icon is redisplayed and the information associated with the transformed icon is now an undelimited ASCII file. 
     If the attributes of the dropped icon do not match at decision block 604, then another test is performed at decision block 612 to determine if the attributes of the dropped icon match the expected attributes for a document created on a text processor Y that uses global variables. If so, then the document icon is removed from the desktop at 614, the special characters imbedded by Y are replaced with blank spaces at function block 620 and control is passed via label 622 to label 700 of FIG. 7. In FIG. 7, processing resumes at function block 710 where each global variable is replaced by the value assigned by a user and the transformed icon is redisplayed with its modified underlying contents at function block 730. 
     If no match is detected at decision block 612, then in decision block 630 a test is performed to determine if the attribute of the dropped icon match with a delimited ASCII file. If so, then the document icon is removed at function block 632, the special characters are removed at function block 634, control is passed via label 640 to label 720 and processing is completed at function block 730 as described above. If no match is detected, then the icon is modified to present an error to the user at function block 642 and control is returned at terminal 650. 
     CODE IN ACCORDANCE WITH THE INVENTION 
     The following code was written in Smalltalk/V PM for the OS/2 environment. TransExample (the Transformation Example) is the main class where the open method can be run. Its supporting classes are DragTest class where rendering and target and source transferring methods are stored and the TransItem class which is the parent class for the drag/drop objects involved in the prototype. 
     The TransIFile subclass represents the input file to the transformer (or the object that will be dragged and dropped on the transformer object). The TransoFile subclass represents the output file from the transformer (or the object that is created from an object that was dragged and dropped on the transformer object). The Transformer subclass represents the object icon that transforms the input object to the ##SPC1##output object. It also contains the rules to change the contents of dropped objects. 
     The drag objects were created to represent the input file object (the one to be transformed), the transformer object (the one that performs an action on the contents of the dropped object), and the output file object (the object after it has been transformed). Note that the output file object retains many of the attributes of the input file object, except most notably, the contents of the object changes as well as the shape, size, and or hues of the icon. This visually signifies that the object underwent a transformation. Note that transformations need not take place only on document or text objects. They can also occur on other objects as well, so long as there is a defined process of transformation from the input to the output object. 
     While the invention has been described in terms of a preferred embodiment in a specific system environment, those skilled in the art recognize that the invention can be practiced, with modification, in other and different hardware and software environments within the spirit and scope of the appended claims.