Class ViewProxy
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ViewProxy

public class netscape.constructor.ViewProxy
    extends netscape.application.View
    implements netscape.application.Target,
               netscape.util.Codable
{
    /* Fields
     */
    public final static String CLASS_NAME_KEY;
    public final static String COMMANDS_KEY;
    public final static String VIEWPROXY_CLASS_NAME;

    /* Constructors
     */
    public ViewProxy(int, int, int, int);

    /* Methods
     */
    public String[] commands();
    public void setAttributesToReplacingView(View);
    public void setCommands(String[]);
    public void setViewClassName(String);
    public String viewClassName();
}
A ViewProxy is an object that in stored in a Constructor document that represents a View object that is unavailable at build time. The ViewProxy object can have commands added to it's description while in Constructor. This allows you to define arbitrary commands for the object and connect these commands to specific events in the application. Additionally, like all Constructor objects, they can be named. The purpose of these ViewProxies is to represent some actual View that responds to these commands, during the build process, and then replace them with new objects during unarchiving. When a .plan file is loaded, the ViewProxy will attempt to create a view named viewClassName and set its attributes equal to its own.

You normally will not need to create a ViewProxy outside of Constructor.
See Also:
Plan

Fields

CLASS_NAME_KEY

  public final static String CLASS_NAME_KEY
Key used to store view class name in the archive. Used by the encode/decode methods.

COMMANDS_KEY

  public final static String COMMANDS_KEY
Key used to store commands in the archive. Used by the encode/decode methods.

VIEWPROXY_CLASS_NAME

  public final static String VIEWPROXY_CLASS_NAME
Default class name.

Constructors

.ViewProxy

  public ViewProxy(int x,
                   int y,
                   int width,
                   int height)

Methods

.setViewClassName

  public void setViewClassName(String viewName)
Sets the class name of the View that this object represents.

.viewClassName

  public String viewClassName()
Returns the class name of the View that this object represents.

.setCommands

  public void setCommands(String values[])
Sets the commands that this ViewProxy is supposed to be able to perform.

.commands

  public String[] commands()
Returns the commands that this ViewProxy is supposed to be able to perform.

.setAttributesToReplacingView

  public void setAttributesToReplacingView(View realView)
This method is called during the finishDecoding() method to properly get the values out of the ViewProxy and set them on the realView object that has replaced it in the Plan. The current implementation sets the bounds, resize instructions, buffered setting, and moves the subviews to realView.

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Oct 1997