Browse a Class

View a Class Graph Tutorial Contents View a Call Graph

To get a detailed look at the methods and variables in a class, you can view it in the Class card.

  1. In the Overview card, double-click the QuickMenu class to display it in the Class card.

    In the left panel of the Class card, you see the contents of the class: both inherited and locally defined methods and variables. The contents are separated into the Java access categories: public, default, protected and private. In the right panel, you see relations between the displayed class and other classes. The Base classes section displays the classes that QuickMenu inherits from.

    You can change the Class Contents list to view only those methods and variables that are defined locally in a class:

  2. Choose View > Show Inherited Fields to toggle off inherited methods and variables.

    You can use the Class card to perform queries about the relations between classes. To find out what methods in QuickMenu call methods in the QMenuLink class:

  3. In the Class Relations list, scroll down to the USES section and select QMenuLink.

  4. From the right-mouse-button menu, choose What Uses > Calling Methods.

    This highlights all the methods in the QuickMenu Class Contents list that use methods in the QMenuLink class. The scroll bar indicates the location of the methods using horizontal marks. You can view the methods by middle-clicking on the horizontal marks.

    <PIC> highlighted methods in Class Contents list.

  5. Double-click paint to display the method in the Source panel.

  6. Take a look at the code for paint.

    The paint method in the QuickMenu class makes calls to several methods in the java.awt.Graphics class.

    View a Class Graph Tutorial Contents View a Call Graph

    Guide to the Cosmo Code Development Environment
    12-96*153