MagicDraw UML and SysML Plugin eSchool
Motto: "Learn good ways to work with MagicDraw UML and its SysML Plugin !"
About the eSchool
UML2 in MagicDraw
MagicDraw UML tips
MagicDraw SysML Plugin
MagicDraw for Java
MagicDraw for XML
Advanced UML and SysML Training

Showing the Generalization supplier in a "focus" class diagram

It is useful to show the immediate Generalization supplier(s) of a given Class in a hyperlinked "focus" class diagram.

(In Java a class can only extend at most 1 Java class, so there is always at most one Generalization supplier in the UML reverse.)

The supplier javax.swing.JDialog was generated for JavaDesktopAboutBox in the diagram above using Display Elements > Display Related Elements. The owner (javax.swing) of JDialog has been shown, and the attributes and operations compartments are open; thet are empty, suggesting that JDialog has not been reverse engineered. If we examine the code we see that JavaDesktopAboutBox relies on methods inherited from JDialog. So we will now reverse JDialog from bytecode and we'll display (only) some of the operations used by JavaDesktopAboutBox using Edit Compartments ..


/*
* JavaDesktopAboutBox.java
*/
package javadesktopapplication;
import org.jdesktop.application.Action;
public class JavaDesktopAboutBox extends javax.swing.JDialog {
public JavaDesktopAboutBox(java.awt.Frame parent) {
super(parent);
initComponents();
getRootPane().setDefaultButton(closeButton);
}
@Action public void closeAboutBox() {
setVisible(false);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
//
private void initComponents() {
..
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
..
getContentPane().setLayout(layout);
..
pack();
}
// Variables declaration - do not modify                     
private javax.swing.JButton closeButton;
// End of variables declaration                       
} 


 
Image: 
Search
MagicDraw UML for Java software engineering