|
In This Issue
Welcome to the Java Technology Fundamentals Newsletter This monthly newsletter provides a way for you to learn the basics of the Java programming language, discover new resources, and keep up-to-date on the latest additions to Sun Developer Network's New to Java Center. The Java Technology Fundamentals Newsletter is now available in a blog format. Content will appear throughout the month and include extras. Start reading the Java Technology Fundamentals Blog today! Note: For the code in this issue of Fundamentals to compile, use the JDK 6 software.
Basic Java Technology Programming
by John Zukowski
In last month's column on Generating UML From the NetBeans IDE,
you generated a sequence diagram for the First, here's the diagram again:
And here is the source code behind the method:
Going back to the original system design, this sequence diagram maps
to what would have been the New Contact use case. It essentially
says to clear and show the contact editor, with a slight nuance of
automatic documentation of anonymous inner classes. Normally, those
would not go in the original design, but because the diagram was
reverse engineered, you get the
Although this is a simple diagram, it includes all the different
pieces to provide an explanation. Overall, the diagram represents
the sequence of messages that the Along the top of the diagram, you see the set of objects that are necessary to perform the task.
Each of these boxes represents an object or process involved. The
doubling of
Normally, you see only the type of object involved in the box at the
top, as in : The horizontal arrows in the sequence diagram represent the messages exchanged between the involved objects. They are shown in a time sequence, so an arrow higher up the sequence diagram would happen earlier in the execution of events of the use case.
So for this set of two messages, clear happens before set editable. Had this been an original sequence diagram, and not one that was reverse engineered, the first message would have more likely been the word clear alone and not shown like a method name. And the second would have been something like make editable. Although all the messages of this sequence diagram start at the object on the far left and immediately return, it is not uncommon for a sequence diagram to include messages between other objects.
The
But because the call is inside the There really is not much to a sequence diagram: just the objects involved and a timed sequence of the messages sent between them. Auto generation isn't always perfect, but when you're trying to get a handle on a large-scale project without sufficient documentation, it certainly provides a good starting point from which to understand the system. For some pointers on creating your own diagrams, see an Introduction to UML 2 Sequence Diagrams by Scott Ambler.
The
Why create a If the file does exist, a program can examine its attributes and perform various operations on the file, such as renaming it, deleting it, or changing its permissions. A File Has Many Names
A
Suppose a program creates a
The program invokes a number of methods to obtain different versions
of the file name. The program is then run both on a Microsoft
Windows system (in directory Desktop Java Platform Development
What Is a NetBeans IDE Module?
A NetBeans IDE module is group of Java classes that provides an
application with a specific feature. For example, the feature
provided by the Java classes in the NetBeans Google Toolbar Module
Tutorial provides a Google search toolbar. The Java classes use the
manifest file to declare the module and the NetBeans IDE 5.0 introduced wizards and templates that help you develop NetBeans modules. NetBeans IDE 5.5 Beta 2 provides several enhancements, including many new wizards and templates, such as a wizard for extending the Options window and a wizard for providing a JavaHelp help set. The same enhancements are also available for NetBeans IDE 5.0. Just download Module Development Update 1 from the NetBeans IDE 5.0 Update Center, which is found in the menu under Tools within the IDE itself. When you have developed a NetBeans module, you can install it in NetBeans IDE or in an application created on top the NetBeans platform. The NetBeans platform is the NetBeans application framework, which allows you to quickly prototype and develop your own Swing applications, using the IDE's popular GUI Builder to design your user interface. By developing your own NetBeans modules, you can extend an application's functionality with new features. For example, you can write modules that make your favorite cutting-edge technologies available to the NetBeans IDE. Alternatively, you might miss some low-level functionality in the Source Editor and create a module to provide it. On a higher level, you can use the core of NetBeans as a platform on top of which you develop rich-client Swing applications, out of NetBeans modules. You can save a lot of development time by reusing features readily available in the platform. Getting Started The following two tutorials assume that you have no background in NetBeans module development at all. The first shows you how to build a NetBeans module, which is a basic building block for building a rich-client application on the NetBeans platform. The tutorial that follows shows you how to create your first rich-client application out of NetBeans modules.
This tutorial shows how to download a component module from the NetBeans Visual Web Pack 5.5 Update Center and import the module into the IDE. The instructions are specific to downloading the sample BluePrints Ajax Component module for the first time. If you are downloading another component module, simply substitute the module name. Contents
| |||||||||||||
|
| ||||||||||||