com.sas.awt
Class VisualInterfaceSupport

com.sas.awt.VisualInterfaceSupport
All Implemented Interfaces:
java.io.Serializable

public class VisualInterfaceSupport
implements java.io.Serializable

VisualInterfaceSupport provides a default implementation for the VisualInterface interface. It provides a set of static methods which are called from methods in VisualInterfaceImpl.ji. This is so that visual components do not each need to provide the implementation for the VisualInterface. All of the methods in this class take three parameters in addition to the method parameters in the corresponding VisualInterface method. The first param is a ComponentInterface reference. This is used to call ComponentInterface methods. The second param is a VisualInterface referenece. This is used to call methods on the VisualInterface like getVisualInterfaceSupportInfo(). The third param is a java.awt.Component reference. It is used to call methods like size(), and bounds() on the component. Based on the three parameters that are passed in to the methods of this support class, only java.awt.Component subclasses which implement the ComponentInterface and VisualInterface can use VisualInterfaceSupport to help implement the VisualInterface.

See Also:
Serialized Form

Field Summary
static java.lang.String[][][] propertyMetadata
           
 
Constructor Summary
VisualInterfaceSupport()
           
 
Method Summary
static void clone(VisualInterface sourceComponent, VisualInterface destComponent)
          This is a helper method meant to be called by subclasses.
static java.awt.Dimension computePreferredSize(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static java.awt.Color getBackgroundColor(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static BorderInterface getBorder(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
           
static java.awt.Font getFont(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static java.awt.Color getForegroundColor(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static int getHeight(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static int getHorizontalPosition(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static java.awt.Dimension getMinimumSize(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static java.awt.Dimension getPreferredSize(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static com.sas.visuals.PainterInterface getPrePainter(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static int getVerticalPosition(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static int getWidth(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static boolean isEnabled(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static boolean isFocus(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
protected static boolean isHeavyWeightComponent(java.awt.Component awtComponentInstance)
           
static boolean isTransparent(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static boolean isVisible(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static void paint(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Graphics g)
           
static void paintHandles(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Graphics g)
           
static void readObject(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.io.ObjectInputStream stream)
          readObject is a helper method.
static void setBackgroundColor(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Color color)
           
static void setBorder(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, BorderInterface border)
           
static void setBounds(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, int x, int y, int width, int height)
           
static void setDefaultValues(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance)
           
static void setEnabled(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, boolean enabled)
           
static void setFocus(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, boolean focus)
           
static void setFont(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Font font)
           
static void setForegroundColor(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Color color)
           
static void setHeight(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, int verticalSize)
           
static void setHorizontalPosition(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, int horizontalPosition)
           
static void setPreferredSize(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Dimension preferredSize)
           
static void setPrePainter(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, com.sas.visuals.PainterInterface painter)
           
static void setTransparent(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, boolean transparent)
           
static void setVerticalPosition(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, int verticalPosition)
           
static void setVisible(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, boolean visible)
           
static void setWidth(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, int horizontalSize)
           
static void update(com.sas.ComponentInterface componentInstance, VisualInterface visualInstance, java.awt.Component awtComponentInstance, java.awt.Graphics g)
           
 

Field Detail

propertyMetadata

public static final java.lang.String[][][] propertyMetadata
Constructor Detail

VisualInterfaceSupport

public VisualInterfaceSupport()
Method Detail

readObject

public static void readObject(com.sas.ComponentInterface componentInstance,
                              VisualInterface visualInstance,
                              java.awt.Component awtComponentInstance,
                              java.io.ObjectInputStream stream)
readObject is a helper method. It converts the old "border" field over to the new borderInterface field. It creates the change listener if neceesary and sets up property change listeners on the border object.


getPreferredSize

public static java.awt.Dimension getPreferredSize(com.sas.ComponentInterface componentInstance,
                                                  VisualInterface visualInstance,
                                                  java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getPreferredSize()

computePreferredSize

public static java.awt.Dimension computePreferredSize(com.sas.ComponentInterface componentInstance,
                                                      VisualInterface visualInstance,
                                                      java.awt.Component awtComponentInstance)
See Also:
VisualInterface.computePreferredSize()

setPreferredSize

public static void setPreferredSize(com.sas.ComponentInterface componentInstance,
                                    VisualInterface visualInstance,
                                    java.awt.Component awtComponentInstance,
                                    java.awt.Dimension preferredSize)
See Also:
VisualInterface.setPreferredSize(java.awt.Dimension)

setDefaultValues

public static void setDefaultValues(com.sas.ComponentInterface componentInstance,
                                    VisualInterface visualInstance,
                                    java.awt.Component awtComponentInstance)
See Also:
VisualInterface.setDefaultValues()

setBounds

public static void setBounds(com.sas.ComponentInterface componentInstance,
                             VisualInterface visualInstance,
                             java.awt.Component awtComponentInstance,
                             int x,
                             int y,
                             int width,
                             int height)

getPrePainter

public static com.sas.visuals.PainterInterface getPrePainter(com.sas.ComponentInterface componentInstance,
                                                             VisualInterface visualInstance,
                                                             java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getForegroundColor()

setPrePainter

public static void setPrePainter(com.sas.ComponentInterface componentInstance,
                                 VisualInterface visualInstance,
                                 java.awt.Component awtComponentInstance,
                                 com.sas.visuals.PainterInterface painter)
See Also:
VisualInterface.setForegroundColor(java.awt.Color)

getForegroundColor

public static java.awt.Color getForegroundColor(com.sas.ComponentInterface componentInstance,
                                                VisualInterface visualInstance,
                                                java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getForegroundColor()

setForegroundColor

public static void setForegroundColor(com.sas.ComponentInterface componentInstance,
                                      VisualInterface visualInstance,
                                      java.awt.Component awtComponentInstance,
                                      java.awt.Color color)
See Also:
VisualInterface.setForegroundColor(java.awt.Color)

getBackgroundColor

public static java.awt.Color getBackgroundColor(com.sas.ComponentInterface componentInstance,
                                                VisualInterface visualInstance,
                                                java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getBackgroundColor()

setBackgroundColor

public static void setBackgroundColor(com.sas.ComponentInterface componentInstance,
                                      VisualInterface visualInstance,
                                      java.awt.Component awtComponentInstance,
                                      java.awt.Color color)
See Also:
VisualInterface.setBackgroundColor(java.awt.Color)

getWidth

public static int getWidth(com.sas.ComponentInterface componentInstance,
                           VisualInterface visualInstance,
                           java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getWidth()

setWidth

public static void setWidth(com.sas.ComponentInterface componentInstance,
                            VisualInterface visualInstance,
                            java.awt.Component awtComponentInstance,
                            int horizontalSize)
See Also:
VisualInterface.setWidth(int)

getHeight

public static int getHeight(com.sas.ComponentInterface componentInstance,
                            VisualInterface visualInstance,
                            java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getHeight()

setHeight

public static void setHeight(com.sas.ComponentInterface componentInstance,
                             VisualInterface visualInstance,
                             java.awt.Component awtComponentInstance,
                             int verticalSize)
See Also:
VisualInterface.setHeight(int)

getHorizontalPosition

public static int getHorizontalPosition(com.sas.ComponentInterface componentInstance,
                                        VisualInterface visualInstance,
                                        java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getHorizontalPosition()

setHorizontalPosition

public static void setHorizontalPosition(com.sas.ComponentInterface componentInstance,
                                         VisualInterface visualInstance,
                                         java.awt.Component awtComponentInstance,
                                         int horizontalPosition)
See Also:
VisualInterface.setHorizontalPosition(int)

getVerticalPosition

public static int getVerticalPosition(com.sas.ComponentInterface componentInstance,
                                      VisualInterface visualInstance,
                                      java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getVerticalPosition()

setVerticalPosition

public static void setVerticalPosition(com.sas.ComponentInterface componentInstance,
                                       VisualInterface visualInstance,
                                       java.awt.Component awtComponentInstance,
                                       int verticalPosition)
See Also:
VisualInterface.setVerticalPosition(int)

getFont

public static java.awt.Font getFont(com.sas.ComponentInterface componentInstance,
                                    VisualInterface visualInstance,
                                    java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getFont()

setFont

public static void setFont(com.sas.ComponentInterface componentInstance,
                           VisualInterface visualInstance,
                           java.awt.Component awtComponentInstance,
                           java.awt.Font font)
See Also:
VisualInterface.setFont(java.awt.Font)

getBorder

public static BorderInterface getBorder(com.sas.ComponentInterface componentInstance,
                                        VisualInterface visualInstance,
                                        java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getBorder()

setBorder

public static void setBorder(com.sas.ComponentInterface componentInstance,
                             VisualInterface visualInstance,
                             java.awt.Component awtComponentInstance,
                             BorderInterface border)
See Also:
VisualInterface.setBorder(com.sas.visuals.BorderInterface)

isTransparent

public static boolean isTransparent(com.sas.ComponentInterface componentInstance,
                                    VisualInterface visualInstance,
                                    java.awt.Component awtComponentInstance)
See Also:
VisualInterface.isTransparent()

isHeavyWeightComponent

protected static boolean isHeavyWeightComponent(java.awt.Component awtComponentInstance)

setTransparent

public static void setTransparent(com.sas.ComponentInterface componentInstance,
                                  VisualInterface visualInstance,
                                  java.awt.Component awtComponentInstance,
                                  boolean transparent)
See Also:
VisualInterface.setTransparent(boolean)

isEnabled

public static boolean isEnabled(com.sas.ComponentInterface componentInstance,
                                VisualInterface visualInstance,
                                java.awt.Component awtComponentInstance)
See Also:
VisualInterface.isEnabled()

setEnabled

public static void setEnabled(com.sas.ComponentInterface componentInstance,
                              VisualInterface visualInstance,
                              java.awt.Component awtComponentInstance,
                              boolean enabled)
See Also:
VisualInterface.setEnabled(boolean)

isFocus

public static boolean isFocus(com.sas.ComponentInterface componentInstance,
                              VisualInterface visualInstance,
                              java.awt.Component awtComponentInstance)
See Also:
VisualInterface.isFocus()

setFocus

public static void setFocus(com.sas.ComponentInterface componentInstance,
                            VisualInterface visualInstance,
                            java.awt.Component awtComponentInstance,
                            boolean focus)
See Also:
VisualInterface.setFocus(boolean)

isVisible

public static boolean isVisible(com.sas.ComponentInterface componentInstance,
                                VisualInterface visualInstance,
                                java.awt.Component awtComponentInstance)
See Also:
VisualInterface.isVisible()

setVisible

public static void setVisible(com.sas.ComponentInterface componentInstance,
                              VisualInterface visualInstance,
                              java.awt.Component awtComponentInstance,
                              boolean visible)
See Also:
VisualInterface.setVisible(boolean)

getMinimumSize

public static java.awt.Dimension getMinimumSize(com.sas.ComponentInterface componentInstance,
                                                VisualInterface visualInstance,
                                                java.awt.Component awtComponentInstance)
See Also:
VisualInterface.getMinimumSize()

update

public static void update(com.sas.ComponentInterface componentInstance,
                          VisualInterface visualInstance,
                          java.awt.Component awtComponentInstance,
                          java.awt.Graphics g)
See Also:
Component.update(java.awt.Graphics)

paint

public static void paint(com.sas.ComponentInterface componentInstance,
                         VisualInterface visualInstance,
                         java.awt.Component awtComponentInstance,
                         java.awt.Graphics g)
See Also:
Component.paint(java.awt.Graphics)

paintHandles

public static void paintHandles(com.sas.ComponentInterface componentInstance,
                                VisualInterface visualInstance,
                                java.awt.Component awtComponentInstance,
                                java.awt.Graphics g)

clone

public static void clone(VisualInterface sourceComponent,
                         VisualInterface destComponent)
                  throws java.lang.CloneNotSupportedException
This is a helper method meant to be called by subclasses. It copies the state from one VisualInterface to another.

Throws:
java.lang.CloneNotSupportedException - if one of the property values cannot be cloned.

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.