    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface ncsa.horizon.awt.LayoutRearrangeable

public interface LayoutRearrangeable
extends Object

This interface provides two common methods which user can overwrite to customize a container's layout. This interface should be implemented by a Container. If the two methods are overwritten, they should be called explicitly. A sample to call these methods is:

    public ZoomControl()
    {
      // instantiate all the components
      init();
      // make sure every component is instantiated, because
      // this method(ZoomControl constructor) is always called as default
      // by a subclass. We don't want layoutComponents() be called
      // before some new components are instantiated.
      if(getClass().getName().compareTo("ncsa.horizon.control.ZoomControl") == 0)
        layoutComponents();
    }

##

layoutComponents()
  This method should always be : { layoutComponents(this); } as default.
layoutComponents(Container)
  This method layouts some components that already created.

##

layoutComponents

      public abstract void layoutComponents()

  This method should always be : { layoutComponents(this); } as default. User can overwrite it giving a wanted container instead of "this".

layoutComponents

      public abstract void layoutComponents(Container parent)

  This method layouts some components that already created. The components' reference should be protected. A figure should be provided to the user explaining the name of each component.
  Parameters:
    parent - the container in which components are to be layouted.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index