FACTOID # 146: Canadians drink more fruit juice than the citizens of any other nation - more than one litre for each person, every week.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

Encyclopedia > CookSwing

CookSwing is an open source Java library that converts an XML document into Java Swing GUI at runtime. It is a tag library for CookXml, a general purpose XML parser. It was developed to be fast, extensible, and simple to use. Open source refers to projects that are open to the public and which draw on other projects that are freely available to the general public. ... The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language that supports a wide variety of applications. ... Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. ... Example Swing widgets in Java 5. ... GUI can refer to the following: GUI is short for graphical user interface, a term used to describe a type of interface in computing. ... In computer science, run time (with a space, though often its spelled without one) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). ... CookXml is a unique XML data binding engine that focuses on the unmarshaling aspect in Java. ...

Contents

Reasons to Describe GUI using XML

In General

  • Simple internationalization. CookSwing offers an easy mechanism to load strings from resource bundles.
  • Simple localization. One could use different XML layouts for a component depending on the target platform.
  • CookSwing provides a centralized place to configure the look-n-feel of components. For instance, one could change the meaning of <toolbar> from a regular JToolBar to a custom toolbar which supports 3D look and feel and possibly docking.
  • Being in XML allows tools such XSLT to transform from one look-n-feel to another. For example, one initially uses <dialog> for certain windows. Later, switching to a docking framework would requires the use a <docking-window>. With XSLT, one could translate <dialog> to <docking-window> for select windows, all without changing the Java code.

Internationalization and localization are means of adapting products such as publications or software for non-native environments, especially other nations and cultures. ... Localization can mean any of the following: Generally, localization is the determination of the locality (position) of an object. ... Look and feel refers to design aspects of a graphical user interface - in terms of both colours, shapes, layout, typefaces, etc (the look); and, the behaviour of dynamic elements such as buttons, boxes, and menus (the feel). It is used in reference to both software and websites. ... ...

Comparing to Java code

  • Clear separation of presentation from business logic. Although good programmers can do good jobs with Java code alone, using CookSwing strengthens such separation.
  • GUI layout is inheritantly hierarchical, which is a perfect fit for XML. On the other hand, it is much harder to visualize layout from hundreds of lines of Java code and one could easily get lost with numerous temporary variables.
  • There is little performance penalty in generating GUI layout using XML.

Business Logic is a non-technical term generally used to describe the functional algorithms which handle information exchange between a database and a user interface. ...

Comparing to visual GUI design tools

  • Pixel-precise and cross-platform layouts. What you see on your screen is not what you get on a different platform. One has to use layout managers to deal with issues considering alignment, font, resolution, resizing, etc, which are the focus of CookSwing.
  • Faster to do the layout for experts. Instead of point-n-clicking a field and then modify a property, switching from mouse to keyboard and back, experts who know components by heart can just type the property and its the appropriate values. Cut-n-paste and/or use of templates further speed up the layout.
  • Not tied to a particular IDE. If one uses NetBeans' Form Designer, using Eclipse IDE becomes problematic.

Layout managers, used in Widget toolkit, are software components which have the ability to layout widgets by their relative positions without using distance units. ... Binomial name Leuciscus idus Linnaeus, 1758 The Ide or Orfe, Leuciscus idus, is a freshwater fish of the family Cyprinidae found across northern Europe and Asia. ... NetBeans refers to both a platform for the development of Java desktop applications, and an integrated development environment (IDE) developed using the NetBeans Platform. ... Eclipse is an open source platform-independent software framework for delivering what the project calls rich-client applications, as opposed to thin client browser-based applications. ...

Main Features

CookSwing is intended to be a complete solution for creating Swing GUI with XML.

  • All Swing components can be configured. Complex input field constraints can all be specified in XML.
  • All layouts, including GridBagLayout, SpringLayout, and JGoodies Forms layout, can be used.
  • All listeners can be attached to any components that support them. It is also easy to add custom listener types.
  • All Swing Border classes, including complex *CompoundBorder* can be created.
  • Include other XML documents.
  • Support Locale and ResourceBundle. So it is easy to internationalize the software.
  • Go beyond Swing. Various containers (Vector, LinkedList, Map, Set and such), String, Integer, Icon, etc can all be configured within CookSwing.
  • Scripting support can be added with other CookXml tag library extensions.

One of the reason why CookSwing goes beyond just Swing is because many settings in Swing inevitably require objects that are not part of Swing. Going too much back-n-forth between Java and XML defeats the purpose of using an XML->Swing toolkit. In computing, locale is a set of parameters that defines the users language, country and any special variant preferences that the user wants to see in their user interface. ...


In addition, it is the heavy emphasis of CookSwing to be extensible because Java developers create new GUI classes all the time.


Links

CookXml is a unique XML data binding engine that focuses on the unmarshaling aspect in Java. ...

External links


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your location
Your comments
Please enter the 5-letter protection code


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.