uiutils

Low-level utility functions for manipulating the user interface.
UIUtils.findComponentByName( parent, name ) static
UIUtils.printTree( parent ) static

Low-level utility functions for manipulating the user interface.

This library defines an object, UIUtils that can be used to modify user interface components in a window such as a component editor.

UIUtils.findComponentByName( parent, name ) static

Returns the child component of parent with the specified name (or parent itself if it matches). If no child component matches the name, returns null.

Example:

 var parent = UIUtils.findComponentByName( Eons, "fileMenu" );
 var menuItem = new swing.JMenuItem( "Now You See Me" );
 menuItem.toolTipText = "Choose me to remove me from the menu";
 menuItem.addActionListener( function( event ) {
     parent.remove( menuItem );
 });
 parent.add( menuItem );

parent the root of the component tree to search
name the name to search for

returns the subcomponent of parent with the specified name, or null

UIUtils.printTree( parent ) static

Prints the tree of components with the root parent to the console. For each component, the component's name is printed (or <?> if it has no name), followed by a colon and the component's class name.

Example:

 UIUtils.printTree( Editor.contentPane );

parent the root of the component tree to print

prints a component tree

Index    Contents