Abstract:
A method and an apparatus for converting the visual appearance) of a program in real time, and more particularly, to a method and an apparatus for converting the visual appearance of a program in real time, by allowing an interface-based program convert a color combination, font, icon and a text position of a component, and an external appearance of the component in real time by adding a new interface to the application programming interface (API) that defines the visual appearance of the program.

Description:
CROSS-REFERENCE TO RELATED APPLICATION  
       [0001]     This application claims priority of Korean Patent Application No. 10-2005-0006800 filed on Jan. 25, 2005 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     Apparatuses and methods consistent with the present invention relate to converting the visual appearance of a Java application program in real time, and more particularly, to a method and an apparatus for converting a visual appearance of the Java application program in real time that allows an interface-based Java application program to convert a color combination, font, icon, text position, and external appearance of a component in real time by adding a new interface that defines the visual appearance of the Java application program to a Java application programming interface (API).  
         [0004]     2. Description of the Related Art  
         [0005]     Java is an object oriented programming language that is platform independent. Here, the platform refers to hardware environment in which a program is executed or a software environment such as an operating system. Java code is compiled to Java byte code by a Java compiler, and the Java byte code is executed by a Java virtual machine (which has been ported to a variety of platforms).  
         [0006]      FIG. 1  illustrates a conventional system in which a Java application program can operate.  
         [0007]     The system comprises a Java application program  11 , a Java application programming interface (API)  12 , a Java virtual machine  13  and a hardware-based platform  14 .  
         [0008]     The Java application program  11  refers to a program written in the Java language, which is compiled into Java byte code using a Java compiler, and the Java byte code is interpreted by the Java virtual machine and then executed. At this time, the Java virtual machine  13  operates as an interpreter with respect to the Java byte codes.  
         [0009]     The Java API  12  as aggregated libraries or classes for developing a Java program; they are provided in packaged units where interrelated classes are bundled.  
         [0010]     The Java application program  11  uses the Java API  12  in order to provide a graphic user interface (hereinafter, referred to as a “GUI”), wherein the Java API  12  outputs a graphic on a screen by using a GUI of the platform  14 .  
         [0011]     The Java API  12  used for providing a GUI is classified into a heavy-weight API and a light-weight API, according to drawing modes. The heavy-weight API is platform-dependent because it writes a GUI in the format supplied by a platform-based GUI. The light-weight API can provide a GUI in the same format in other platforms as it writes the GUI in the format desired by the developer and transmits it to the platform-based GUI.  
         [0012]     Here, the Java Abstract Window Toolkit is the heavy-weight API, and the Java Swing is the light-weight API.  
         [0013]      FIG. 2  illustrates a construction of a class to draw a component through the conventional Java Abstract Window Toolkit.  
         [0014]     The Label component  22  is an extension of a Component class  21  of the Abstract Window Toolkit, which is connected to a LabelPeer class  23  for connection with a platform-based GUI  24 . The LabelPeer class  23  plays a role in connecting the platform-based GUI  24  and the Label component  22 . Owing to this construction, the Abstract Window Toolkit provides a platform dependent GUI.  
         [0015]      FIG. 3  illustrates a construction of a class to draw a component through the conventional Java Swing.  
         [0016]     The Label component of Swing is JLabel, and a JLabel component  33  is an extension of the JComponent class  32 . The JComponent class  32  finally inherits the Component class  31 . The JLabel component  33  has an object  34  called a LabelUI, which draws the JLabel component  33 , and which is not connected with a platform-based GUI. The portions that draw a component are all realized in Java, and they are output on a screen through the Java virtual machine  35 .  
         [0017]     Accordingly, Swing components are output on a screen having the same look, regardless of platforms.  
         [0018]     The visual appearance is a visual property of a component output on a screen; it indicates a color combination, a font and an icon of a component, and the location and external appearance of text.  
         [0019]     As mentioned above, the external appearance of the component changes according to the platform and real-time conversion is not impossible because the Abstract Window Toolkit is platform-dependent.  
         [0020]     However, with Swing the external appearance of the component does not change according to a platform because Swing is platform-independent. However, applying Swing to a program written based on the Abstract Window Toolkit may produce problems.  
         [0021]     The visual appearance of a component is only applicable in the application program unit due to a structural limitation of the light-weight API, and it can not be applied to all the application programs in operation on a platform.  
       SUMMARY OF THE INVENTION  
       [0022]     An aspect of the present invention is to allow an interface-based Java application program to change looks in real time by adding a new interface with the defined looks of the Java application program to a Java API.  
         [0023]     This aspect as well as other aspects, features and advantages of the present invention will become clear to those skilled in the art upon review of the following description.  
         [0024]     According to an aspect of the present invention, there is provided an apparatus for converting a visual appearance of a Java application program in real time comprises a command reception unit which receives a command to convert the visual appearance of the Java application program currently in operation produced based upon the Abstract Window Toolkit, an interface management unit which refers to a stored visual appearance package according to the received command and converts the visual appearance by notifying a component of the Java application program of the visual appearance conversion and a display unit which outputs the Java application program to which the converted visual appearance is applied, on a screen.  
         [0025]     A method for converting a visual appearance of a Java application program in real time comprises receiving a command to convert the visual appearance of the Java application program currently in operation produced based upon the Abstract Window Toolkit, referring to a stored visual appearance package according to the received command and converting the visual appearance by notifying a component of the Java application program of the visual appearance conversion and outputting the Java application program to which the converted visual appearance is applied on a screen. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0026]     The above and other aspects, features and advantages of the present invention will become apparent from the following description of exemplary embodiments given in conjunction with the accompanying drawings, in which:  
         [0027]      FIG. 1  illustrates a system in which the conventional Java application program can operate;  
         [0028]      FIG. 2  illustrates a construction of a class to draw a component through the conventional Java Abstract Window Toolkit;  
         [0029]      FIG. 3  illustrates a construction of a class to draw a component using the conventional Java Swing;  
         [0030]      FIG. 4  is a block diagram illustrating an apparatus for converting the visual appearance of Java application program during run-time according to an exemplary embodiment of the present invention;  
         [0031]      FIG. 5  is a block diagram illustrating an interface management unit according to an exemplary embodiment of the present invention;  
         [0032]      FIG. 6  is a flowchart illustrating a process during which skins of a component of a Java application program are converted according to an exemplary embodiment of the present invention; and  
         [0033]      FIG. 7  is a flowchart illustrating a process during which themes of a component of a Java application program are converted according to an exemplary embodiment of the present invention 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0034]     Advantages and features of the present invention and methods of accomplishing the same may be understood more readily by reference to the following detailed description of exemplary embodiments and the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be constructed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be through and complete and will fully convey the concept of the invention to those skilled in the art, and the present invention will only be defined by the appended claims.  
         [0035]     Exemplary embodiments of the subject application will be described in detail with reference to the accompanying drawings.  
         [0036]      FIG. 4  is a block diagram illustrating an apparatus for converting the visual appearance of a Java application program in run time according to an exemplary embodiment of the present invention.  
         [0037]     Although Swing provides more robust graphic functions than the Abstract Window Toolkit, such devices as electric home appliances, having limited memory, mainly have a graphic user interface written based on the Abstract Window Toolkit, since Swing libraries have to be stored in an apparatus.  
         [0038]     An apparatus according to an exemplary embodiment of the present invention refers to one in which a graphic user&#39;s interface of a Java application program is written using the Abstract Window Toolkit. One of ordinary skill in the art would recognize, however, that the present invention is not limited to a Java application program written using the Abstract Window Toolkit.  
         [0039]     An apparatus according to an embodiment of the present invention comprises an interface management unit  410 , a command reception unit  420  and a display unit  440 .  
         [0040]     The command reception unit  420  receives a command to convert the visual appearance of an Abstract Window Toolkit-based Java application program currently in operation.  
         [0041]     A visual appearance is a visual property of a Java application program such as a color combination, a font and an icon of a component, the location and an external appearance of text; for example, a window and a button.  
         [0042]     A visual appearance conversion command input by a user is transmitted to the control unit  430 , and the control unit  430  directs the interface management unit  410  to notify a component included in the Java application program of the visual appearance conversion by referring to the stored visual appearance package according to the received command, and then performs the visual appearance conversion.  
         [0043]     The stored visual appearance package refers to a bundle of classes relating to a theme and a skin, which includes a skin package which details an external appearance of a component, and a theme package to form a theme by reading out property information relative to a color combination, a font and an icon of a component and the location of text.  
         [0044]     A Java application program in operation applies the stored visual appearance package to its visual appearance and then converts the visual appearance using a newly stored visual appearance package.  
         [0045]     The display unit  440  outputs the Java application program to which the converted visual appearance is applied, and the control unit  430  generally controls the command reception unit  420 , the interface management unit  410  and the display unit  440 .  
         [0046]      FIG. 5  is a block diagram illustrating an interface management unit according to an exemplary embodiment of the present invention.  
         [0047]     The interface management unit  410  comprises an interface control unit  510 , a theme management unit  520  and a skin management unit  530 .  
         [0048]     The theme management unit  520  manages properties of a component according to properties such as a color combination, a font and an icon of a component and a location of text included in a Java application program, using property information of a theme read out from a file. More specifically, theme property information is loaded and stored when the apparatus is initialized, and this information is modified according to a command of the interface control unit  510  in real time and is then re-loaded.  
         [0049]     The skin management unit  530  manages skin properties of a component according to properties of an external appearance of a component included in a Java application program by use of the stored skin package. More specifically, the content of a skin package is loaded and stored when the apparatus is initialized, and the content of a newly registered skin package is loaded in real time, according to a command from the interface control unit  510 .  
         [0050]     The skin management unit  530  confirms the presence of the skin requested by the interface control unit  510 , and delivers the skin to the component if the requested skin exists; if not, the skin management unit  530  creates a new skin and delivers it to the component.  
         [0051]     The interface control unit  510  manages the conversion status of the theme and the skin through general control of the theme management unit  520  and the skin management unit  530  according to a command from the control unit  430 . When a change has occurred, the interface control unit  510  notifies each component of the Java application program of the change in the theme or the skin and allows them to convert their look.  
         [0052]      FIG. 6  is a flowchart illustrating a process of converting a skin of a component of a Java application program according to an exemplary embodiment of the present invention.  
         [0053]     When an apparatus is initialized, the theme management unit  520  and the skin management unit  530  load and store the property information of a theme and the content of a skin package. If the command reception unit  420  receives a command to convert the skin of the Java application program currently in operation from a user S 610 , the received skin conversion command is transmitted to the control unit  430 , and the control unit  430  makes the interface management unit  410  convert the skin of the component.  
         [0054]     The interface control unit  510  of the interface management unit  410  notifies a component of the skin conversion S 620 , and each component requests the new skin from the skin management unit  530 . Accordingly, the skin management unit  530  checks if the skin exists S 630 . If the requested skin exists, the skin management unit  530  applies it to the component S 650 . If not, the skin management unit  530  creates a new skin S 640  and applies it to the component S 650 .  
         [0055]     The Java application program registers its top-level window in the interface control unit  510  when it is initialized. When a command to convert the skin is issued while the Java application program is in operation, the interface control unit  510  notifies each component of the application program of the skin conversion using the registered top-level window. Each component that has been notified of the skin conversion requests the converted skin from the skin management unit  530 , and converts the skin using the transmitted skin.  
         [0056]      FIG. 7  is a flowchart illustrating a process of converting a theme of a component of a Java application program according to an exemplary embodiment of the present invention.  
         [0057]     When an apparatus is initialized, the theme management unit  520  and the skin management unit  530  load and store the property information of a theme and the content of a skin package. When the command reception unit  420  receives a command to convert the theme of a Java application program in operation from a user S 710 , the received command is transmitted to the control unit  430  and the control unit  430  makes the interface management unit  410  convert the theme of a component.  
         [0058]     The interface control unit  510  of the interface management unit  410  notifies a component of the theme conversion S 720 , and checks a skin using the theme property exists S 730 . If the skin exists, the interface control unit  510  notifies a theme conversion of the concerned skin S 740 . The skin management unit  530  converts a theme of a skin using the new theme according to the content of the theme stored in the theme management unit  520  S 750 . When the converted theme is applied to a component, the visual appearance of the component is converted S 760 .  
         [0059]     The Java application program registers its top-level window in the interface control unit  510  when it is initialized. The interface management unit  510  notifies each component of the application program of a theme conversion by using the registered top-level window when a command to convert the theme is issued while the Java application program is in operation S 720 . Each component that has been notified of the theme conversion converts its theme using the theme transmitted from the theme management unit  520  S 740 .  
         [0060]     An apparatus and a method for changing the visual appearance of a Java application in real time, according to the present invention, produce at least one of the following effects.  
         [0061]     First, a new interface whereby the visual appearance of a Java application program is defined is added to the Java API, and the Java application program using this interface can convert the visual appearance in real time.  
         [0062]     Second, since the new interface has a simplified construction, it can be added to an apparatus having limited resources.  
         [0063]     Third, since the theme reads out information from an external property file the Java application program can change the theme property in real time without changing the code.  
         [0064]     Fourth, the skin can be realized by a system dependent module, which improves the speed rate.  
         [0065]     While the present invention has been illustrated and described with respect to exemplary embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form and details may be made therein without departing from the spirit and scope of the invention which should be limited only by the scope of the appended claims. Thus, exemplary embodiments of the invention disclosed above are used in a generic and descriptive sense only and not for purposes of limitation.