|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.awt.ColorComponent
public abstract class ColorComponent
A ColorComponent class.
| Constructor Summary | |
|---|---|
ColorComponent()
|
|
ColorComponent(float r,
float g,
float b)
|
|
ColorComponent(int rgb)
|
|
ColorComponent(int r,
int g,
int b)
|
|
| Method Summary | |
|---|---|
void |
addLink(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
addLink() adds a link between property on this component and source_property on source_component. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the component. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener to the component. |
boolean |
anyPropertyChangeListeners()
Return true if there are any PropertyChangeEvent listeners. |
void |
attachModel(ModelInterface model)
Attaches the specified model to this view. |
boolean |
attachView()
attachView is called on the model during an attachModel call on the view. |
java.lang.Object |
clone()
Return a clone of the object. |
void |
detachModel(ModelInterface model)
Detaches the specified model from this view. |
void |
detachView()
detachView is called on the model during an detachModel call on the view. |
void |
dumpComponent()
This method prints debugging information about the component. |
void |
firePropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Report a bound property update to any registered listeners. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Report a bound property update to any registered listeners. |
void |
fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Report a constrained property update to any registered listeners. |
java.lang.String |
getComponentDescription()
This method returns the description of the component. |
ComponentInterfaceSupportInfo |
getComponentSupportInfo(boolean createIfNecessary)
Internal framework method. |
java.lang.reflect.Method |
getEventMethod(java.lang.reflect.Method listenerMethod)
|
java.lang.String[] |
getEventValues(java.lang.reflect.Method listenerMethod)
|
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about the component. |
LinkPropertiesInfo |
getLinkInfo()
Internal framework method. |
ModelInterface |
getModelInterface()
|
java.util.Vector |
getRequiredInterfaces()
The get method for the requiredInterfaces attribute. |
ViewInterfaceSupportInfo |
getViewInterfaceSupportInfo()
Internal framework method. |
void |
initialize()
The initialize() method was designed to be a synchronization point after the constructor for the object has completed and a number of methods have been called on the component. |
void |
initializeComponent()
Called by the default constructor. |
boolean |
isDesignTime()
This method returns whether the component is in design mode or in run mode. |
boolean |
isLinked(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
isLinked() determines if property on this component is linked to source_property on source_component. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Handles any property links on this component from the source component. |
PropertyLinkInfo[] |
queryLinks()
queryLinks() returns an array of PropertyLinkInfo objects containing information about properties on this component which are linked to properties on this or other components. |
PropertyLinkInfo[] |
queryLinks(java.lang.String property)
queryLinks() returns an array of PropertyLinkInfo objects containing information about the links to the specified property. |
void |
refresh(ModelInterface model)
Updates the view based on updates in the model. |
void |
removeAllLinks()
removeAllLinks() removes all the links on this component. |
void |
removeInterfaceTraps(ModelInterface model)
|
void |
removeLink(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
removeLink() removes a link between property on this component and source_property on source_component. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the component. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener from the component. |
void |
setComponentDescription(java.lang.String description)
This method sets the description of the component. |
void |
setComponentSupportInfo(ComponentInterfaceSupportInfo info)
Internal framework method. |
void |
setDefaultValues()
This method sets the initial property values to their default values. |
void |
setLinkInfo(LinkPropertiesInfo info)
Internal framework method. |
void |
setModelInterface(ModelInterface model)
Calling setModelInterface will detach the previous model (if any) and will call attachModel to attach the model to this view. |
void |
setRequiredInterfaces(java.util.Vector interfaces)
The set method for the requiredInterfaces attribute. |
void |
setViewInterfaceSupportInfo(ViewInterfaceSupportInfo info)
Internal framework method. |
boolean |
supportsListenerInterface(java.lang.Class listenerInterface)
|
boolean |
supportsRequiredInterfaces(ModelInterface model)
Checks a potential model to this view to see if it supports the required interfaces of this view. |
void |
trapInterfaceEvents(ModelInterface model)
|
void |
validateObject()
|
| Constructor Detail |
|---|
public ColorComponent()
public ColorComponent(int r,
int g,
int b)
public ColorComponent(int rgb)
public ColorComponent(float r,
float g,
float b)
| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the model attached to the component being cloned
will not allow the clone to attach.public void trapInterfaceEvents(ModelInterface model)
trapInterfaceEvents in interface ViewInterfaceViewInterface.trapInterfaceEvents(com.sas.ModelInterface)public void removeInterfaceTraps(ModelInterface model)
removeInterfaceTraps in interface ViewInterfaceViewInterface.removeInterfaceTraps(com.sas.ModelInterface)public java.util.Vector getRequiredInterfaces()
ViewInterface
getRequiredInterfaces in interface ViewInterfaceViewInterface.getRequiredInterfaces()public void setRequiredInterfaces(java.util.Vector interfaces)
ViewInterface
setRequiredInterfaces in interface ViewInterfaceinterfaces - Vector of interface information for each required interface
Each element in the vector contains the required interface name followed by attribute name
to method pairings for each attribute in the model which the view will set
up event handlers for. For example, this view requires
the StringListInterface and handles two attribute changed event
notifications from the model.
Vector requiredInterfaces = new Vector();
String[] requiredInterfacesString = { "com.sas.util.StaticStringListInterface", "items", "refresh", "listName", "setTitle" };
requiredInterfaces.addElement(requiredInterfacesString);
this.setRequiredInterfaces( requiredInterfaces );
ViewInterface.setRequiredInterfaces(java.util.Vector)public void attachModel(ModelInterface model)
ViewInterface
attachModel in interface ViewInterfacemodel - Model to attach toViewInterface.attachModel(com.sas.ModelInterface)public void detachModel(ModelInterface model)
ViewInterface
detachModel in interface ViewInterfacemodel - Model to detachViewInterface.detachModel(com.sas.ModelInterface)public void refresh(ModelInterface model)
ViewInterface
refresh in interface ViewInterfacemodel - Model that has just been updatedViewInterface.refresh(com.sas.ModelInterface)public boolean supportsRequiredInterfaces(ModelInterface model)
ViewInterface
supportsRequiredInterfaces in interface ViewInterfacemodel - Model to check for the required interfaces
ViewInterface.supportsRequiredInterfaces(com.sas.ModelInterface)public ModelInterface getModelInterface()
getModelInterface in interface ViewInterfaceViewInterface.getModelInterface()public void setModelInterface(ModelInterface model)
ViewInterface
setModelInterface in interface ViewInterfacemodel - The new model for this viewViewInterface.setModelInterface(com.sas.ModelInterface)public ViewInterfaceSupportInfo getViewInterfaceSupportInfo()
getViewInterfaceSupportInfo in interface ViewInterfaceViewInterface.getViewInterfaceSupportInfo()public void setViewInterfaceSupportInfo(ViewInterfaceSupportInfo info)
setViewInterfaceSupportInfo in interface ViewInterfaceinfo - A reference to an instance of ViewInterfaceSupportInfo which holds
information needed by ViewInterfaceSupport to implement the ViewInterface.ViewInterface.setViewInterfaceSupportInfo(com.sas.ViewInterfaceSupportInfo)public boolean attachView()
ModelInterface
attachView in interface ModelInterfaceModelInterface.attachView()public void detachView()
ModelInterface
detachView in interface ModelInterfaceModelInterface.detachView()
public void addLink(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterfaceAdding a link that already exists does nothing.
addLink in interface LinkPropertiesInterfaceproperty - The property to be linked to source_property on source_component.linked_component - The component with source_property.linked_property - The property on source_component.LinkPropertiesInterface.addLink(java.lang.String, com.sas.ComponentInterface, java.lang.String)
public void removeLink(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterface
removeLink in interface LinkPropertiesInterfaceproperty - The property currently linked to source_property on source_component.linked_component - The component with source_property.linked_property - The property on source_component.LinkPropertiesInterface.removeLink(java.lang.String, com.sas.ComponentInterface, java.lang.String)public void removeAllLinks()
LinkPropertiesInterface
removeAllLinks in interface LinkPropertiesInterfaceLinkPropertiesInterface.removeAllLinks()public PropertyLinkInfo[] queryLinks(java.lang.String property)
LinkPropertiesInterface
queryLinks in interface LinkPropertiesInterfaceproperty - The property to return the list of links for.
LinkPropertiesInterface.queryLinks(java.lang.String)public PropertyLinkInfo[] queryLinks()
LinkPropertiesInterface
queryLinks in interface LinkPropertiesInterfaceLinkPropertiesInterface.queryLinks(java.lang.String)
public boolean isLinked(java.lang.String property,
ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterface
isLinked in interface LinkPropertiesInterfaceproperty - The property potentially linked to source_property on source_component.linked_component - The component with source_property.linked_property - The property on source_component.
LinkPropertiesInterface.queryLinks(java.lang.String)public LinkPropertiesInfo getLinkInfo()
getLinkInfo in interface LinkPropertiesInterfaceLinkPropertiesInterfaceSupportpublic void setLinkInfo(LinkPropertiesInfo info)
setLinkInfo in interface LinkPropertiesInterfaceLinkPropertiesInterfaceSupportpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
ComponentInterface
addPropertyChangeListener in interface com.sas.beans.PropertyChangeSourceaddPropertyChangeListener in interface ComponentInterfacelistener - The PropertyChangeListener to receive PropertyChangeEvents.ComponentInterface.addPropertyChangeListener(java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
ComponentInterface
removePropertyChangeListener in interface com.sas.beans.PropertyChangeSourceremovePropertyChangeListener in interface ComponentInterfacelistener - The PropertyChangeListener to stop receiving PropertyChangeEvents.ComponentInterface.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
ComponentInterface
firePropertyChange in interface ComponentInterfacepropertyName - The name of the property that was changed. null may be passed in to
indicate that a generic change to the component (and not a specific property) was made.oldValue - The old value of the property. null may be passed in to indicate that the
old value is unknown.newValue - The new value of the property. null may be passed in to indicate that the
new value is unknown.ComponentInterface.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)public void firePropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
ComponentInterface
firePropertyChange in interface ComponentInterfacepropertyChangeEvent - A previously constructed property change eventComponentInterface.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)public java.lang.String getComponentDescription()
ComponentInterface
getComponentDescription in interface ComponentInterfaceComponentInterface.getComponentDescription()public void setComponentDescription(java.lang.String description)
ComponentInterfaceApplication writers may want to set unique componentDescriptions on components so that they can be distinquished properly in a testing environment.
setComponentDescription in interface ComponentInterfacedescription - The new description for the component.ComponentInterface.setComponentDescription(java.lang.String)public boolean isDesignTime()
ComponentInterfaceComponentInterface.isDesignTime should be used instead of java.beans.Beans.isDesignTime since java.beans.Beans.isDesignTime is not thread safe and changes the status of all JavaBeans at the same time.
isDesignTime in interface ComponentInterfaceComponentInterface.isDesignTime()public void dumpComponent()
ComponentInterface
dumpComponent in interface ComponentInterfaceComponentInterface.dumpComponent()public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
ComponentInterface
addVetoableChangeListener in interface com.sas.beans.VetoableChangeSourceaddVetoableChangeListener in interface ComponentInterfacelistener - The VetoableChangeListener to receive PropertyChangeEvents.ComponentInterface.addVetoableChangeListener(java.beans.VetoableChangeListener)public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
ComponentInterface
removeVetoableChangeListener in interface com.sas.beans.VetoableChangeSourceremoveVetoableChangeListener in interface ComponentInterfacelistener - The VetoableChangeListener to stop receiving PropertyChangeEvents.ComponentInterface.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
throws java.beans.PropertyVetoException
ComponentInterface
fireVetoableChange in interface ComponentInterfacepropertyName - The name of the property that was changed.oldValue - The old value of the property. null may be passed in to indicate that the
new value is unknown.newValue - The new value of the property. null may be passed in to indicate that the
new value is unknown.
java.beans.PropertyVetoException - The listener vetoed the set of this constrained propertyComponentInterface.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)public boolean anyPropertyChangeListeners()
anyPropertyChangeListeners in interface ComponentInterfacepublic void initialize()
ComponentInterfaceinitialize() should be called on a component after is it constructed :
ListBox listBox = new ListBox();
listBox.initialize();
container.add( listBox );
Overriding initialize is now discouraged since it is generally better to override setDefaultValues and readObject to perform initialization.
By default (in the ComponentInterface implementation), initialize() does nothing. However, various components override initialize() to perform operations, and it should be called.
Although use of initialize() is now discouraged, initialize() is also called by the validateObject method after a component is deserialized. This allows components which need processing during creation and deserialization to have a common place to perform operations. Adding event handlers to subcomponents is a typical use of the initialize method.
initialize in interface ComponentInterfaceComponentInterface.initialize()public void initializeComponent()
ComponentInterface
initializeComponent in interface ComponentInterfaceComponentInterface.initializeComponent()public void setDefaultValues()
ComponentInterfaceNote that the designTime property is not initialized when setDefaultValues is called, so initialization which depends on the value of designTime should take place in initializeComponent.
setDefaultValues in interface ComponentInterfaceComponentInterface.setDefaultValues()public void validateObject()
validateObject in interface java.io.ObjectInputValidationComponentInterfaceSupport.validateObject(com.sas.ComponentInterface)public ComponentInterfaceSupportInfo getComponentSupportInfo(boolean createIfNecessary)
getComponentSupportInfo in interface ComponentInterfacecreateIfNecessary - Whether to create the ComponentInterfaceSupportInfo object if
it does not already exist.
public void setComponentSupportInfo(ComponentInterfaceSupportInfo info)
setComponentSupportInfo in interface ComponentInterfaceinfo - An instance of ComponentInterfaceSupportInfo holding the information used
by the ComponentSupport class to implement the ComponentInterface.public boolean supportsListenerInterface(java.lang.Class listenerInterface)
MultipleValueEventSourceInterfaceSupport.supportsListenerInterface(java.lang.Object, java.lang.Class)public java.lang.reflect.Method getEventMethod(java.lang.reflect.Method listenerMethod)
MultipleValueEventSourceInterfaceSupport.getEventMethod(java.lang.Object, java.lang.reflect.Method)public java.lang.String[] getEventValues(java.lang.reflect.Method listenerMethod)
MultipleValueEventSourceInterfaceSupport.getEventValues(java.lang.Object, java.lang.reflect.Method)
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||