|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.awt.ComponentVisualComponent
public abstract class ComponentVisualComponent
| Constructor Summary | |
|---|---|
ComponentVisualComponent()
|
|
| Method Summary | |
|---|---|
void |
addLink(java.lang.String property,
com.sas.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(com.sas.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. |
java.awt.Dimension |
computePreferredSize()
The default implementation of this method calls super.getPreferredSize(). |
void |
detachModel(com.sas.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.awt.Color |
getBackgroundColor()
Returns the background color of the component. |
BorderInterface |
getBorder()
Returns the border drawn around the component. |
java.lang.String |
getComponentDescription()
This method returns the description of the component. |
com.sas.ComponentInterfaceSupportInfo |
getComponentSupportInfo(boolean createIfNecessary)
Internal framework method. |
java.lang.reflect.Method |
getEventMethod(java.lang.reflect.Method listenerMethod)
Get the method used to check the value of the event. |
java.lang.String[] |
getEventValues(java.lang.reflect.Method listenerMethod)
Get the possible values for the listenerInterface method the event is sent to. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about the component. |
java.awt.Font |
getFont()
Returns the font used by the component to display text. |
java.awt.Color |
getForegroundColor()
Returns the foreground color of the component. |
int |
getHeight()
This method returns the vertical size of the component in pixels. |
int |
getHorizontalPosition()
This method returns the horizontal starting position of the component in pixels. |
com.sas.LinkPropertiesInfo |
getLinkInfo()
Internal framework method. |
java.awt.Dimension |
getMinimumSize()
Overrides the java.awt.Component getMinimumSize method to return a minimum size of 5,5 for components which do not have a peer. |
com.sas.ModelInterface |
getModelInterface()
|
java.awt.Rectangle |
getPageBounds(java.awt.Graphics g,
int pageNumber,
int pageWidth,
int pageHeight)
Returns the bounds of a given page. |
java.awt.Dimension |
getPreferredSize()
|
com.sas.visuals.PainterInterface |
getPrePainter()
Returns the painter used to draw over the background of the component. |
java.awt.Panel |
getPrintOptionsPanel()
Returns a gui for setting any print-specific properties of the component. |
java.util.Vector |
getRequiredInterfaces()
The get method for the requiredInterfaces attribute. |
int |
getVerticalPosition()
This method returns the vertical starting position of the component in pixels. |
com.sas.ViewInterfaceSupportInfo |
getViewInterfaceSupportInfo()
Internal framework method. |
VisualInterfaceSupportInfo |
getVisualInterfaceSupportInfo()
This method is not intended to be called by users. |
int |
getWidth()
This method returns the width of the component in pixels. |
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 |
isEnabled()
Returns whether the component is currently enabled. |
boolean |
isFocus()
isFocus returns whether the component currently has focus. |
boolean |
isLinked(java.lang.String property,
com.sas.ComponentInterface linked_component,
java.lang.String linked_property)
isLinked() determines if property on this component is linked to source_property on source_component. |
boolean |
isTransparent()
Returns whether the background is not filled with the backgroundColor. |
boolean |
isVisible()
Returns whether the component is currently visible. |
boolean |
pageExists(int pageNumber)
Determines if a given page exists. |
void |
paint(java.awt.Graphics g)
|
void |
print(java.awt.Graphics g,
int pageNumber,
int pageWidth,
int pageHeight)
Prints the requested page. |
void |
printFinalize()
Notification that printing is complete. |
void |
printInitialize(java.awt.Graphics g)
Notification that printing is about to begin. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Handles any property links on this component from the source component. |
com.sas.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. |
com.sas.PropertyLinkInfo[] |
queryLinks(java.lang.String property)
queryLinks() returns an array of PropertyLinkInfo objects containing information about the links to the specified property. |
void |
refresh(com.sas.ModelInterface model)
Updates the view based on updates in the model. |
void |
removeAllLinks()
removeAllLinks() removes all the links on this component. |
void |
removeInterfaceTraps(com.sas.ModelInterface model)
|
void |
removeLink(java.lang.String property,
com.sas.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 |
setBackgroundColor(java.awt.Color color)
Sets the background color of the component. |
void |
setBorder(BorderInterface border)
Sets the border drawn around the component. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setComponentDescription(java.lang.String description)
This method sets the description of the component. |
void |
setComponentSupportInfo(com.sas.ComponentInterfaceSupportInfo info)
Internal framework method. |
void |
setDefaultValues()
This method sets the initial property values to their default values. |
void |
setEnabled(boolean enabled)
setEnabled() is the set accessor method for the Enabled attribute. |
void |
setFocus(boolean focus)
setFocus sets focus to the component or away from the component. |
void |
setFont(java.awt.Font font)
Sets the font to be used by the component for displaying text. |
void |
setForegroundColor(java.awt.Color color)
Sets the foreground color of the component. |
void |
setHeight(int height)
This method sets the height of the component in pixels. |
void |
setHorizontalPosition(int horizontalPosition)
This method sets the horizontal starting position of the component in pixels. |
void |
setLinkInfo(com.sas.LinkPropertiesInfo info)
Internal framework method. |
void |
setModelInterface(com.sas.ModelInterface model)
Calling setModelInterface will detach the previous model (if any) and will call attachModel to attach the model to this view. |
void |
setPreferredSize(java.awt.Dimension preferredSize)
This method allows the user to set the Dimension returned by getPreferredSize. |
void |
setPrePainter(com.sas.visuals.PainterInterface painter)
Sets the painter used to draw over the background of the component. |
void |
setRequiredInterfaces(java.util.Vector interfaces)
The set method for the requiredInterfaces attribute. |
void |
setTransparent(boolean transparent)
Sets whether the background of the component is filled with the backgroundColor. |
void |
setVerticalPosition(int verticalPosition)
This method sets the vertical starting position of the component in pixels. |
void |
setViewInterfaceSupportInfo(com.sas.ViewInterfaceSupportInfo info)
Internal framework method. |
void |
setVisible(boolean visible)
setVisible() is the set accessor method for the Visible attribute. |
void |
setVisualInterfaceSupportInfo(VisualInterfaceSupportInfo info)
This method is not intended to be called by users. |
void |
setWidth(int width)
This method sets the width of the component in pixels. |
java.awt.Font |
superGetFont()
This method is not intended to be used by users. |
java.awt.Dimension |
superGetMinimumSize()
This method is not intended to be used by users. |
java.awt.Dimension |
superGetPreferredSize()
This method is not intended to be used by users. |
boolean |
superIsEnabled()
This method is not intended to be used by users. |
boolean |
superIsVisible()
This method is not intended to be used by users. |
void |
superPaint(java.awt.Graphics g)
This method is not intended to be used by users. |
void |
superSetBounds(int x,
int y,
int width,
int height)
This method is not intended to be used by users. |
void |
superSetEnabled(boolean enabled)
This method is not intended to be used by users. |
void |
superSetFont(java.awt.Font font)
This method is not intended to be used by users. |
void |
superSetVisible(boolean visible)
This method is not intended to be used by users. |
void |
superUpdate(java.awt.Graphics g)
This method is not intended to be used by users. |
boolean |
supportsListenerInterface(java.lang.Class listenerInterface)
Determines if a listenerInterface class is supported by the implementing class. |
boolean |
supportsRequiredInterfaces(com.sas.ModelInterface model)
Checks a potential model to this view to see if it supports the required interfaces of this view. |
void |
trapInterfaceEvents(com.sas.ModelInterface model)
|
void |
update(java.awt.Graphics g)
|
void |
validateObject()
|
| Constructor Detail |
|---|
public ComponentVisualComponent()
| 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(com.sas.ModelInterface model)
trapInterfaceEvents in interface com.sas.ViewInterfaceViewInterface.trapInterfaceEvents(com.sas.ModelInterface)public void removeInterfaceTraps(com.sas.ModelInterface model)
removeInterfaceTraps in interface com.sas.ViewInterfaceViewInterface.removeInterfaceTraps(com.sas.ModelInterface)public java.util.Vector getRequiredInterfaces()
ViewInterface
getRequiredInterfaces in interface com.sas.ViewInterfaceViewInterface.getRequiredInterfaces()public void setRequiredInterfaces(java.util.Vector interfaces)
ViewInterface
setRequiredInterfaces in interface com.sas.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(com.sas.ModelInterface model)
ViewInterface
attachModel in interface com.sas.ViewInterfacemodel - Model to attach toViewInterface.attachModel(com.sas.ModelInterface)public void detachModel(com.sas.ModelInterface model)
ViewInterface
detachModel in interface com.sas.ViewInterfacemodel - Model to detachViewInterface.detachModel(com.sas.ModelInterface)public void refresh(com.sas.ModelInterface model)
ViewInterface
refresh in interface com.sas.ViewInterfacemodel - Model that has just been updatedViewInterface.refresh(com.sas.ModelInterface)public boolean supportsRequiredInterfaces(com.sas.ModelInterface model)
ViewInterface
supportsRequiredInterfaces in interface com.sas.ViewInterfacemodel - Model to check for the required interfaces
ViewInterface.supportsRequiredInterfaces(com.sas.ModelInterface)public com.sas.ModelInterface getModelInterface()
getModelInterface in interface com.sas.ViewInterfaceViewInterface.getModelInterface()public void setModelInterface(com.sas.ModelInterface model)
ViewInterface
setModelInterface in interface com.sas.ViewInterfacemodel - The new model for this viewViewInterface.setModelInterface(com.sas.ModelInterface)public com.sas.ViewInterfaceSupportInfo getViewInterfaceSupportInfo()
getViewInterfaceSupportInfo in interface com.sas.ViewInterfaceViewInterface.getViewInterfaceSupportInfo()public void setViewInterfaceSupportInfo(com.sas.ViewInterfaceSupportInfo info)
setViewInterfaceSupportInfo in interface com.sas.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 com.sas.ModelInterfaceModelInterface.attachView()public void detachView()
ModelInterface
detachView in interface com.sas.ModelInterfaceModelInterface.detachView()
public void addLink(java.lang.String property,
com.sas.ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterfaceAdding a link that already exists does nothing.
addLink in interface com.sas.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,
com.sas.ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterface
removeLink in interface com.sas.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 com.sas.LinkPropertiesInterfaceLinkPropertiesInterface.removeAllLinks()public com.sas.PropertyLinkInfo[] queryLinks(java.lang.String property)
LinkPropertiesInterface
queryLinks in interface com.sas.LinkPropertiesInterfaceproperty - The property to return the list of links for.
LinkPropertiesInterface.queryLinks(java.lang.String)public com.sas.PropertyLinkInfo[] queryLinks()
LinkPropertiesInterface
queryLinks in interface com.sas.LinkPropertiesInterfaceLinkPropertiesInterface.queryLinks(java.lang.String)
public boolean isLinked(java.lang.String property,
com.sas.ComponentInterface linked_component,
java.lang.String linked_property)
LinkPropertiesInterface
isLinked in interface com.sas.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 com.sas.LinkPropertiesInfo getLinkInfo()
getLinkInfo in interface com.sas.LinkPropertiesInterfaceLinkPropertiesInterfaceSupportpublic void setLinkInfo(com.sas.LinkPropertiesInfo info)
setLinkInfo in interface com.sas.LinkPropertiesInterfaceLinkPropertiesInterfaceSupportpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
ComponentInterface
addPropertyChangeListener in interface com.sas.beans.PropertyChangeSourceaddPropertyChangeListener in interface com.sas.ComponentInterfaceaddPropertyChangeListener in class java.awt.Componentlistener - 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 com.sas.ComponentInterfaceremovePropertyChangeListener in class java.awt.Componentlistener - 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 com.sas.ComponentInterfacefirePropertyChange in class java.awt.ComponentpropertyName - 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 com.sas.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 com.sas.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 com.sas.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 com.sas.ComponentInterfaceComponentInterface.isDesignTime()public void dumpComponent()
ComponentInterface
dumpComponent in interface com.sas.ComponentInterfaceComponentInterface.dumpComponent()public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
ComponentInterface
addVetoableChangeListener in interface com.sas.beans.VetoableChangeSourceaddVetoableChangeListener in interface com.sas.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 com.sas.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 com.sas.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 com.sas.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 com.sas.ComponentInterfaceComponentInterface.initialize()public void initializeComponent()
ComponentInterface
initializeComponent in interface com.sas.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 VisualInterfacesetDefaultValues in interface com.sas.ComponentInterfaceComponentInterface.setDefaultValues()public void validateObject()
validateObject in interface java.io.ObjectInputValidationComponentInterfaceSupport.validateObject(com.sas.ComponentInterface)public com.sas.ComponentInterfaceSupportInfo getComponentSupportInfo(boolean createIfNecessary)
getComponentSupportInfo in interface com.sas.ComponentInterfacecreateIfNecessary - Whether to create the ComponentInterfaceSupportInfo object if
it does not already exist.
public void setComponentSupportInfo(com.sas.ComponentInterfaceSupportInfo info)
setComponentSupportInfo in interface com.sas.ComponentInterfaceinfo - An instance of ComponentInterfaceSupportInfo holding the information used
by the ComponentSupport class to implement the ComponentInterface.public boolean supportsListenerInterface(java.lang.Class listenerInterface)
MultipleValueEventSourceInterface
supportsListenerInterface in interface MultipleValueEventSourceInterfacelistenerInterface - the class of the listenerInterface of the event sent out
MultipleValueEventSourceInterfaceSupport.supportsListenerInterface(java.lang.Object, java.lang.Class)public java.lang.reflect.Method getEventMethod(java.lang.reflect.Method listenerMethod)
MultipleValueEventSourceInterface
getEventMethod in interface MultipleValueEventSourceInterfacelistenerMethod - the listenerInterface method the event is sent to.
MultipleValueEventSourceInterfaceSupport.getEventMethod(java.lang.Object, java.lang.reflect.Method)public java.lang.String[] getEventValues(java.lang.reflect.Method listenerMethod)
MultipleValueEventSourceInterface
getEventValues in interface MultipleValueEventSourceInterfacelistenerMethod - the listenerInterface method the event is sent to.
MultipleValueEventSourceInterfaceSupport.getEventValues(java.lang.Object, java.lang.reflect.Method)public java.awt.Dimension computePreferredSize()
VisualInterfaceThis method should not be called directly since it is called from getPreferredSize when setPreferredSize has not been called with a non-null value.
computePreferredSize in interface VisualInterfaceVisualInterface.computePreferredSize()public java.awt.Dimension getPreferredSize()
getPreferredSize in interface VisualInterfacegetPreferredSize in class java.awt.ComponentVisualInterface.getPreferredSize()public void setPreferredSize(java.awt.Dimension preferredSize)
VisualInterface
setPreferredSize in interface VisualInterfacesetPreferredSize in class java.awt.ComponentpreferredSize - The size to return when getPreferredSize is called on the
component.VisualInterface.setPreferredSize(java.awt.Dimension)public com.sas.visuals.PainterInterface getPrePainter()
VisualInterface
getPrePainter in interface VisualInterfaceVisualInterface.getPrePainter()public void setPrePainter(com.sas.visuals.PainterInterface painter)
VisualInterface
setPrePainter in interface VisualInterfacepainter - The object to use to draw prior to calling paint() on the
component.VisualInterface.setPrePainter(com.sas.visuals.PainterInterface)
public void setBounds(int x,
int y,
int width,
int height)
setBounds in interface VisualInterfacesetBounds in class java.awt.ComponentVisualInterface.setBounds(int, int, int, int)public java.awt.Color getForegroundColor()
VisualInterfaceIf you override getForegroundColor, users which treat the component as a java.awt.Component by calling getForeground will not get your behavior changes. So, it would be advisable to override getForeground instead.
getForegroundColor in interface VisualInterfaceVisualInterface.getForegroundColor()public void setForegroundColor(java.awt.Color color)
VisualInterfaceIf you override setForegroundColor, users which treat the component as a java.awt.Component by calling setForeground will not get your behavior changes. So, it would be advisable to override setForeground instead.
setForegroundColor in interface VisualInterfacecolor - The foreground color of the component.VisualInterface.setForegroundColor(java.awt.Color)public java.awt.Color getBackgroundColor()
VisualInterfaceIf you override getBackgroundColor, users which treat the component as a java.awt.Component by calling getBackground will not get your behavior changes. So, it would be advisable to override getBackground instead.
getBackgroundColor in interface VisualInterfaceVisualInterface.getBackgroundColor()public void setBackgroundColor(java.awt.Color color)
VisualInterfaceIf you override setBackgroundColor, users which treat the component as a java.awt.Component by calling setBackground will not get your behavior changes. So, it would be advisable to override setBackground instead.
setBackgroundColor in interface VisualInterfacecolor - The background color of the component.VisualInterface.setBackgroundColor(java.awt.Color)public java.awt.Font getFont()
VisualInterface
getFont in interface VisualInterfacegetFont in interface java.awt.MenuContainergetFont in class java.awt.ComponentVisualInterface.getFont()public void setFont(java.awt.Font font)
VisualInterface
setFont in interface VisualInterfacesetFont in class java.awt.Componentfont - the font to be used by the component for displaying text.VisualInterface.setFont(java.awt.Font)public int getWidth()
VisualInterface
getWidth in interface VisualInterfacegetWidth in class java.awt.ComponentVisualInterface.getWidth()public void setWidth(int width)
VisualInterface
setWidth in interface VisualInterfacewidth - the new widthVisualInterface.setWidth(int)public int getHeight()
VisualInterface
getHeight in interface VisualInterfacegetHeight in class java.awt.ComponentVisualInterface.getHeight()public void setHeight(int height)
VisualInterface
setHeight in interface VisualInterfaceheight - The new heightVisualInterface.setHeight(int)public int getHorizontalPosition()
VisualInterface
getHorizontalPosition in interface VisualInterfaceVisualInterface.getHorizontalPosition()public void setHorizontalPosition(int horizontalPosition)
VisualInterface
setHorizontalPosition in interface VisualInterfacehorizontalPosition - the new horizontal starting positionVisualInterface.setHorizontalPosition(int)public int getVerticalPosition()
VisualInterface
getVerticalPosition in interface VisualInterfaceVisualInterface.getVerticalPosition()public void setVerticalPosition(int verticalPosition)
VisualInterface
setVerticalPosition in interface VisualInterfaceverticalPosition - the new vertical starting positionVisualInterface.setVerticalPosition(int)public BorderInterface getBorder()
VisualInterface
getBorder in interface VisualInterfaceVisualInterface.getBorder()public void setBorder(BorderInterface border)
VisualInterface
setBorder in interface VisualInterfaceborder - The border object.VisualInterface.setBorder(com.sas.visuals.BorderInterface)public boolean isEnabled()
VisualInterface
isEnabled in interface VisualInterfaceisEnabled in class java.awt.ComponentVisualInterface.isEnabled()public void setEnabled(boolean enabled)
VisualInterface
setEnabled in interface VisualInterfacesetEnabled in class java.awt.Componentenabled - Whether the component should be enabled.VisualInterface.setEnabled(boolean)public boolean isTransparent()
VisualInterface
isTransparent in interface VisualInterfaceVisualInterface.isTransparent()public void setTransparent(boolean transparent)
VisualInterfaceThe default implementation of the VisualInterface in VisualInterfaceSupport throws a java.lang.IllegalStateException if setTransparent(true) is called on a heavyweight component.
setTransparent in interface VisualInterfacetransparent - whether the background of the component is filled with the backgroundColor.VisualInterface.setTransparent(boolean)public boolean isFocus()
VisualInterface
isFocus in interface VisualInterfaceVisualInterface.isFocus()public void setFocus(boolean focus)
VisualInterface
setFocus in interface VisualInterfacefocus - true if the component should request focus, false if
the component should give up focus.VisualInterface.setFocus(boolean)public boolean isVisible()
VisualInterface
isVisible in interface VisualInterfaceisVisible in class java.awt.ComponentVisualInterface.isVisible()public void setVisible(boolean visible)
VisualInterface
setVisible in interface VisualInterfacesetVisible in class java.awt.Componentvisible - Whether the component should be visible.VisualInterface.setVisible(boolean)public java.awt.Dimension getMinimumSize()
VisualInterface
getMinimumSize in interface VisualInterfacegetMinimumSize in class java.awt.ComponentVisualInterface.getMinimumSize()public VisualInterfaceSupportInfo getVisualInterfaceSupportInfo()
VisualInterfaceReturns the info object which holds instance data for objects implementing the VisualInterface interface.
getVisualInterfaceSupportInfo in interface VisualInterfaceVisualInterface.getVisualInterfaceSupportInfo()public void setVisualInterfaceSupportInfo(VisualInterfaceSupportInfo info)
VisualInterfaceSets the info object which holds instance data for objects implementing the VisualInterface interface.
setVisualInterfaceSupportInfo in interface VisualInterfaceinfo - The instance of VisualInterfaceSupportInfo for the component.VisualInterface.setVisualInterfaceSupportInfo(com.sas.awt.VisualInterfaceSupportInfo)public void update(java.awt.Graphics g)
update in class java.awt.ComponentVisualInterfaceSupport.update(com.sas.ComponentInterface, com.sas.awt.VisualInterface, java.awt.Component, java.awt.Graphics)public void paint(java.awt.Graphics g)
paint in class java.awt.ComponentVisualInterfaceSupport.paint(com.sas.ComponentInterface, com.sas.awt.VisualInterface, java.awt.Component, java.awt.Graphics)public final java.awt.Dimension superGetPreferredSize()
Calls the superclasses getPreferredSize() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superGetPreferredSize in interface VisualInterfacegetPreferredSize()public final void superPaint(java.awt.Graphics g)
Calls the superclasses paint() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superPaint in interface VisualInterfacepaint(java.awt.Graphics)public final void superUpdate(java.awt.Graphics g)
Calls the superclasses update() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superUpdate in interface VisualInterfaceupdate(java.awt.Graphics)
public final void superSetBounds(int x,
int y,
int width,
int height)
Calls the superclasses setBounds() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superSetBounds in interface VisualInterfacesetBounds(int, int, int, int)public final java.awt.Dimension superGetMinimumSize()
Calls the superclasses getMinimumSize() method and returns the result. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superGetMinimumSize in interface VisualInterfacegetMinimumSize()public final boolean superIsVisible()
Calls the superclasses isVisible() method and returns the result. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superIsVisible in interface VisualInterfaceVisualInterface.superIsVisible()public final void superSetVisible(boolean visible)
Calls the superclasses setVisible() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superSetVisible in interface VisualInterfacevisible - Whether the component is visible.VisualInterface.superSetVisible(boolean)public final boolean superIsEnabled()
Calls the superclasses isEnabled() method and returns the result. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superIsEnabled in interface VisualInterfaceVisualInterface.superIsEnabled()public void superSetEnabled(boolean enabled)
Calls the superclasses setEnabled() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superSetEnabled in interface VisualInterfaceVisualInterface.superSetEnabled(boolean)public final java.awt.Font superGetFont()
Calls the superclasses getFont() method and returns the result. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superGetFont in interface VisualInterfaceVisualInterface.superGetFont()public void superSetFont(java.awt.Font font)
Calls the superclasses setFont() method. This is used to avoid an infinite recursive loop in VisualInterfaceSupport.
superSetFont in interface VisualInterfaceVisualInterface.superSetEnabled(boolean)
public void print(java.awt.Graphics g,
int pageNumber,
int pageWidth,
int pageHeight)
throws com.sas.awt.print.PrintException
This implementation temporarily resizes the component via
setSize(pageWidth, pageHeight)
and calls the standard print method, print(g).
Therefore, subclasses should make sure that their paint method, which
is called by the default implementation of standard print, is
synchronized, as print is here, to guard against an independent call to
paint, due to a window refresh for example, inadvertently using this
size change.
Subclasses with multiple pages will have to override
pageExists() since it returns false for
page numbers other than one which will cause the implementation of this
method to throw an IndexOutOfBoundsException. Such subclasses will
also need to override this method in order to change pages.
print in interface com.sas.awt.print.PrintableInterfaceg - The graphics context to use for printing.pageNumber - The one-based index of the page to be printed.pageWidth - The width of the page (in pixels) being printed to.pageHeight - The height of the page (in pixels) being printed to.
com.sas.awt.print.PrintException - Thrown if a failure occurred while printing.
java.lang.IndexOutOfBoundsException - Thrown if pageExists(pageNumber) is
false.PrintableInterface.print(java.awt.Graphics, int, int, int)
public void printInitialize(java.awt.Graphics g)
throws com.sas.awt.print.PrintException
This implementation is simply a method stub, so subclasses that require print-specific resources should create them in an override.
printInitialize in interface com.sas.awt.print.PrintableInterfaceg - A graphics context for the device being printed to.
com.sas.awt.print.PrintException - Thrown if a failure occurred while initializing.PrintableInterface.printInitialize(java.awt.Graphics)public void printFinalize()
This implementation is simply a method stub, so subclasses that have print-specific resources should free them in an override.
printFinalize in interface com.sas.awt.print.PrintableInterfacePrintableInterface.printFinalize()public boolean pageExists(int pageNumber)
Subclasses with multiple pages must override this method to be fully printable.
pageExists in interface com.sas.awt.print.PrintableInterfacepageNumber - The one-based index of the page to verify.
true if pageNumber equals one, and
false otherwise.PrintableInterface.pageExists(int)
public java.awt.Rectangle getPageBounds(java.awt.Graphics g,
int pageNumber,
int pageWidth,
int pageHeight)
Subclasses that don't completely fill a given page should override this method to indicate that.
getPageBounds in interface com.sas.awt.print.PrintableInterfaceg - The graphics context to use for printing.pageNumber - The one-based index of the page to measure.pageWidth - The width of the page (in pixels) being printed to.pageHeight - The height of the page (in pixels) being printed to.
PrintableInterface.getPageBounds(java.awt.Graphics, int, int, int)public java.awt.Panel getPrintOptionsPanel()
Subclasses that have print-specific properities should override this method to provide a gui for setting them. For example, a table view component might allow a row or column major print order to be specified.
getPrintOptionsPanel in interface com.sas.awt.print.PrintableInterfacenull.PrintableInterface.getPrintOptionsPanel()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||