Note:
Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.
@CodeSet(value="sas.platform")
@SASScope(value="ALL")

Package com.sas

Provides core foundation interfaces and classes for the SAS component framework.

See:
          Description

Interface Summary
ComponentInterface ComponentInterface is the base interface for webAF components.
DesignTimeDropTargetInterface The DesignTimeDropTargetInterface is implemented by visual components which wish to allow models and/or viewers to be dropped in/on them inside webAF.
LinkPropertiesInterface The LinkPropertiesInterface interface allows the values of IDE properties on multiple components to be linked to one another such that when a property value changes, all property values which are linked to it get the new value.
ModelInterface The ModelInterface interface defines all the functionality needed for a component to behave as a model in a model-view connection.
PostInitInterface  
RemoteObjectInterface This represents an object which can be referenced remotely via RMI; it extends ViewDefaultModelInterface ViewDefaultModelInterface should be implemented by viewer components which have a default model which they attach to the component when no other model has been attached.
ViewInterface The ViewInterface interface defines all the functionality needed for a component to behave as a view in a model-view connection.
 

Class Summary
Component Component is the base class for non-visual webAF objects.
ComponentBeanInfo ComponentBeanInfo is a placeholder class used to prevent the JavaBeans Introspector from using the ComponentBeanInfo shipped with AWT as the BeanInfo class for the com.sas.Component class.
ComponentInterfaceSupport The ComponentInterfaceSupport class provides a default implementation of the ComponentInterface interface.
ComponentInterfaceSupportInfo The ComponentInterfaceSupportInfo class provides a place for ComponentInterfaceSupport to store instance data for objects that implement the ComponentInterface using ComponentInterfaceSupport.
DesignTimeDropResult DesignTimeDropResult is a "structure" class which returns data from a component which implements the DesignTimeDropTargetInterface.
LinkPropertiesInfo  
LinkPropertiesInterfaceSupport The LinkPropertiesInterfaceSupport provides a default implementation of the LinkPropertiesInterface.
ModelInterfaceSupport  
ObjectLoader ObjectLoader Purpose: Helper class to load objects from a .ser file and show progress
ObjectLoaderThread  
PropertyChangeInfo PropertyChangeInfo is a class used to hold a ComponentInterface reference and a property name.
PropertyChangeListenerSupport PropertyChangeListenerSupport provides a default implementation for the java.beans.PropertyChangeListener interface.
PropertyLinkAdaptor PropertyLinkAdaptor is the controller which handles a property link between two properties.
PropertyLinkInfo The PropertyLinkInfo is a class which holds information about one link between a property on one component and another property on (another) component.
RemoteObject This represents an object which can be referenced remotely via RMI; it extends RunningObjectTable RunningObjectTable (ie.
ViewInterfaceSupport The ViewInterfaceSupport class provides a default implementation of the ViewInterface interface.
ViewInterfaceSupportInfo The ViewInterfaceSupportInfo class provides a place for ViewInterfaceSupport to store instance data for objects that implement the ViewInterface using ViewInterfaceSupport.
 

Exception Summary
LinkPropertiesException  
PropertySetException  
 

Package com.sas Description

Provides core foundation interfaces and classes for the SAS component framework.

Below is a brief overview of the features defined by the SAS component model. This object model is defined by com.sas.ComponentInterface and as implemented by com.sas.Component.

Model/View
The Model/View framework is a design pattern based on a more general Model/View/Controller (MVC) pattern. Model/View gives objects one of two special roles. The Observer design pattern is another expression of the Model/View framework.

The model acts as a data source for one or more views. Models normally send events when their state has changed. The com.sas tree contains several support classes which simplify the implementation of lists of event listeners within models. Several models are defined in the com.sas.models and com.sas.collection and com.sas.table packages. Models for accessing data on SAS servers are in packages under com.sas.sasserver

The view observes the model, reflecting changes in the model. The view normally keeps track of its models, often adding itself as a listener for events that the model generates. Many visual components which act as views are found in the com.sas.awt and com.sas.visuals packages. A view need not be a visual component.

The ComponentInterface provides a consistent way of identifying these roles. Models implement the com.sas.ModelInterface interface, and views implement the com.sas.ViewInterface interface. The java.util.Observer interface and java.util.Observable base class provide an alternate implementation of Model/View, but one which requires that the models extend from java.util.Observable, rather than simply implement an interface (like com.sas.ModelInterface).

The SAS component model supports dynamic model/view associations. Views have required interfaces, which is a set of interfaces that any model attached to the view must implement. For example, a com.sas.awt.ListBox can act as a view for any model which implements the required interface, com.sas.collection.StaticOrderedCollectionInterface. If the model is altered by adding or removing items, it will fire a ContentsChangedEvent and all views (i.e. the ListBox) will respond to the event by updating their view automatically. Because of the additional behavior provided by the SAS component arhcitecture and the SAS component library, the amount of additional code necessary to build highly functional applications is very small.

The webAF IDE allows you to establish model/view attachements by dropping an icon representing the model onto one or more icons representing views. The base component interface support classes enforce these required interfaces when a model is attached to a view.

Property Linking
Property linking is the ability to establish a link from a property of a source component to a target property of a component, such that when the source property changes, the target property is updated with the value automatically.

An example of property linking is an applet which uses two ListBox components to chose a SAS dataset from a SAS server. The first ListBox displays a list of libraries which exist on the server. (Attach a LibraryListInterface as the model to the first ListBox). The second listbox displays a list of datasets within a specific library. (Attach a DataSetListInterface as the model to the second ListBox). The selectedItem property ListBox is linked to the library property of a DataSetListInterface object. When the user selects a library name in the first ListBox, the string value is automatically assigned to the library property of the list of data sets via its setLibrary method. The data set list then queries the server for the list of data sets in that library and updates itself with the list. Since the data set list is the model for the second ListBox, when the data set list updates itself and fires a change event, the view (the second list box) refreshes with the new list contents: the list of data sets in the selected library. All of this is performed automatically by Property Linking.

If the data types of the source and target properties do not match, a built in set of transforms can convert between Java types (primitive and object types).

The webAF IDE allows direct property linking via the user interface, so such links can be created without writing Java code.

The ComponentInterface also provides the support for implementing bound and constrained properties of Java Beans. ComponentInterface provides the implementation for managing a list of PropertyChangeListeners and for firing PropertyChangeEvents to those listeners.

Property Linking plays a critical role in developing event based or event driven applications. Most modern user interfaces are event based. Java 1.1 and Java Beans provide for and almost demand event based programming. Property Linking integrates well into this application model, allowing consistent application development.

Java Beans
The SAS components follow the Java Beans object model. A great many of the com.sas component properties are bound properties. That is, the component will fire a java.beans.PropertyChangeEvent when the property is changed, either through an explicit assignment via a set method in Java, or indirectly through a user action such as editing text or through property linking.

SAS components are also Serializable as defined by the Java java.io.Serializable interface. ComponentInterface also implements java.io.ObjectInputValidation to assist in deserialization.

Extended Java Beans
SAS components define additional metadata, along with the standard Java Beans beaninfo. This metadata includes required interfaces for views, and static properties such as descriptions and and default input and output properties, which is used for property linking.

Key Interfaces
The following are the most important interfaces in the com.sas package:
  1. com.sas.ComponentInterface combines the smaller interfaces to define a highly functional Java component (object) whcih supports extended Java Beans, property linking, and Model/View frameworks.
  2. com.sas.ModelInterface defines the interface to the model portion of the Model/View framework. A Model is an abstraction for data/service provide which a view, defined by com.sas.ViewInterface, observes.
  3. com.sas.ViewInterface defines the interface to a view, which observes and potentially updates a model. Views are typically, but need not be, visual/graphical components such as user interface controls.
  4. com.sas.LinkPropertiesInterface defines the interface through which property linking is supported.
  5. com.sas.PublicClonable defines an interface to a Java component which can be cloned (copied) via a public clone() method.

Key Classes
The following are the key classes in the com.sas package:
  1. com.sas.Component defines the base class for SAS (or your own) componets which implement the SAS component model. The Component class provides a complete implementation of the com.sas.ComponentInterface interface. Visual classes derived from AWT cannot extend from this base class and instead implement com.sas.ComponentInterface.
  2. com.sas.ComponentInterfaceSupport and com.sas.ComponentInterfaceSupportInfo provide the implementation of much of the functionality defined by ComponentInterface.

Utility Classes
The following classes serve utility roles. They are more useful for internal implementation of other classes, since they may not implement all of the collection or com.sas.Component interfaces
  1. com.sas.LinkPropertiesInterfaceSupport provides implementation support for the com.sas.LinkPropertiesInterface.
  2. com.sas.ComponentInterfaceSupport and com.sas.ComponentInterfaceSupportInfo provide implementation of com.sas.ComponentInterface.
  3. com.sas.ViewInterfaceSupport and com.sas.ViewInterfaceSupportInfo provide implementation of com.sas.ViewInterface.
  4. com.sas.ModelInterfaceSupport provide implementation of com.sas.ModelInterface. The Bean Extension Wizard takes an existing class and adds the ComponentInterface behavior by creating a subclass which uses these helper classes. For example, the Bean Extension Wizard was used to extend the java.awt components as seen in the com.sas.awt package.


Note:
Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.


Copyright © 2009 SAS Institute Inc. All Rights Reserved.