|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
public interface VisualInterface
VisualInterface defines added behavior of webAF visual components. It contains functionality such as retrieving and setting component size and position, retrieving and setting foreground and background colors, retrieving and setting the font used by the component, retrieving and setting the border displayed around the component, retrieving and setting whether the component is visible, and retrieving and setting whether the component is enabled.
A default implementation of VisualInterface is supplied by com.sas.visuals.VisualInterfaceSupport. The Bean Extension Wizard can subclass a java.awt.Component derived class and add an implementation of the VisualInterface.
| Method Summary | |
|---|---|
abstract java.awt.Dimension |
computePreferredSize()
The default implementation of this method calls super.getPreferredSize(). |
abstract java.awt.Color |
getBackgroundColor()
Returns the background color of the component. |
abstract BorderInterface |
getBorder()
Returns the border drawn around the component. |
abstract java.awt.Font |
getFont()
Returns the font used by the component to display text. |
abstract java.awt.Color |
getForegroundColor()
Returns the foreground color of the component. |
abstract int |
getHeight()
This method returns the vertical size of the component in pixels. |
abstract int |
getHorizontalPosition()
This method returns the horizontal starting position of the component in pixels. |
abstract 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. |
abstract java.awt.Dimension |
getPreferredSize()
|
abstract com.sas.visuals.PainterInterface |
getPrePainter()
Returns the painter used to draw over the background of the component. |
abstract int |
getVerticalPosition()
This method returns the vertical starting position of the component in pixels. |
abstract VisualInterfaceSupportInfo |
getVisualInterfaceSupportInfo()
This method is not intended to be called by users. |
abstract int |
getWidth()
This method returns the width of the component in pixels. |
abstract boolean |
isEnabled()
Returns whether the component is currently enabled. |
abstract boolean |
isFocus()
isFocus returns whether the component currently has focus. |
abstract boolean |
isTransparent()
Returns whether the background is not filled with the backgroundColor. |
abstract boolean |
isVisible()
Returns whether the component is currently visible. |
abstract void |
setBackgroundColor(java.awt.Color color)
Sets the background color of the component. |
abstract void |
setBorder(BorderInterface border)
Sets the border drawn around the component. |
abstract void |
setBounds(int x,
int y,
int width,
int height)
|
abstract void |
setDefaultValues()
|
abstract void |
setEnabled(boolean enabled)
setEnabled() is the set accessor method for the Enabled attribute. |
abstract void |
setFocus(boolean focus)
setFocus sets focus to the component or away from the component. |
abstract void |
setFont(java.awt.Font font)
Sets the font to be used by the component for displaying text. |
abstract void |
setForegroundColor(java.awt.Color color)
Sets the foreground color of the component. |
abstract void |
setHeight(int height)
This method sets the height of the component in pixels. |
abstract void |
setHorizontalPosition(int horizontalPosition)
This method sets the horizontal starting position of the component in pixels. |
abstract void |
setPreferredSize(java.awt.Dimension preferredSize)
This method allows the user to set the Dimension returned by getPreferredSize. |
abstract void |
setPrePainter(com.sas.visuals.PainterInterface painter)
Sets the painter used to draw over the background of the component. |
abstract void |
setTransparent(boolean transparent)
Sets whether the background of the component is filled with the backgroundColor. |
abstract void |
setVerticalPosition(int verticalPosition)
This method sets the vertical starting position of the component in pixels. |
abstract void |
setVisible(boolean visible)
setVisible() is the set accessor method for the Visible attribute. |
abstract void |
setVisualInterfaceSupportInfo(VisualInterfaceSupportInfo info)
This method is not intended to be called by users. |
abstract void |
setWidth(int width)
This method sets the width of the component in pixels. |
abstract java.awt.Font |
superGetFont()
|
abstract java.awt.Dimension |
superGetMinimumSize()
|
abstract java.awt.Dimension |
superGetPreferredSize()
|
abstract boolean |
superIsEnabled()
|
abstract boolean |
superIsVisible()
|
abstract void |
superPaint(java.awt.Graphics g)
|
abstract void |
superSetBounds(int x,
int y,
int width,
int height)
|
abstract void |
superSetEnabled(boolean enabled)
|
abstract void |
superSetFont(java.awt.Font font)
|
abstract void |
superSetVisible(boolean visible)
|
abstract void |
superUpdate(java.awt.Graphics g)
|
| Method Detail |
|---|
void setDefaultValues()
ComponentInterface.setDefaultValues()java.awt.Dimension getPreferredSize()
Component.getPreferredSize()
void setBounds(int x,
int y,
int width,
int height)
Component.setBounds(int, int, int, int)java.awt.Color getForegroundColor()
If 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.
Component.getForeground(),
setForegroundColor(java.awt.Color),
getBackgroundColor()void setForegroundColor(java.awt.Color color)
If 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.
color - The foreground color of the component.Component.setForeground(java.awt.Color),
setForegroundColor(java.awt.Color),
setBackgroundColor(java.awt.Color)java.awt.Color getBackgroundColor()
If 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.
Component.getBackground(),
getForegroundColor()void setBackgroundColor(java.awt.Color color)
If 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.
color - The background color of the component.Component.setBackground(java.awt.Color),
setBackgroundColor(java.awt.Color),
setForegroundColor(java.awt.Color)java.awt.Font getFont()
Component.getFont(),
setFont(java.awt.Font)void setFont(java.awt.Font font)
font - the font to be used by the component for displaying text.Component.setFont(java.awt.Font),
getFont()boolean isVisible()
Component.isVisible(),
setVisible(boolean)void setVisible(boolean visible)
visible - Whether the component should be visible.isVisible()boolean isEnabled()
Component.isEnabled(),
setEnabled(boolean)void setEnabled(boolean enabled)
enabled - Whether the component should be enabled.isEnabled()boolean isFocus()
void setFocus(boolean focus)
focus - true if the component should request focus, false if
the component should give up focus.java.awt.Dimension getMinimumSize()
Component.getMinimumSize()java.awt.Dimension superGetPreferredSize()
Component.getPreferredSize()void superPaint(java.awt.Graphics g)
Component.paint(java.awt.Graphics)void superUpdate(java.awt.Graphics g)
Component.update(java.awt.Graphics)
void superSetBounds(int x,
int y,
int width,
int height)
Component.setBounds(int, int, int, int)boolean superIsVisible()
Component.isVisible()void superSetVisible(boolean visible)
Component.setVisible(boolean)boolean superIsEnabled()
Component.isEnabled()void superSetEnabled(boolean enabled)
Component.setEnabled(boolean)java.awt.Font superGetFont()
Component.getFont()void superSetFont(java.awt.Font font)
Component.setFont(java.awt.Font)java.awt.Dimension superGetMinimumSize()
Component.getMinimumSize()java.awt.Dimension computePreferredSize()
This method should not be called directly since it is called from getPreferredSize when setPreferredSize has not been called with a non-null value.
void setPreferredSize(java.awt.Dimension preferredSize)
preferredSize - The size to return when getPreferredSize is called on the
component.int getWidth()
setWidth(int),
getHeight(),
getHorizontalPosition()void setWidth(int width)
width - the new widthgetWidth(),
setHeight(int),
setHorizontalPosition(int)int getHeight()
setHeight(int),
getWidth(),
getVerticalPosition()void setHeight(int height)
height - The new heightgetHeight(),
setWidth(int),
setVerticalPosition(int)int getHorizontalPosition()
setHorizontalPosition(int),
getVerticalPosition(),
getWidth()void setHorizontalPosition(int horizontalPosition)
horizontalPosition - the new horizontal starting positiongetHorizontalPosition(),
setVerticalPosition(int),
setWidth(int)int getVerticalPosition()
setVerticalPosition(int),
getHorizontalPosition(),
getHeight()void setVerticalPosition(int verticalPosition)
verticalPosition - the new vertical starting positiongetVerticalPosition(),
setHorizontalPosition(int),
setWidth(int)BorderInterface getBorder()
setBorder(com.sas.visuals.BorderInterface)void setBorder(BorderInterface border)
border - The border object.getBorder()boolean isTransparent()
setTransparent(boolean)void setTransparent(boolean transparent)
The default implementation of the VisualInterface in VisualInterfaceSupport throws a java.lang.IllegalStateException if setTransparent(true) is called on a heavyweight component.
transparent - whether the background of the component is filled with the backgroundColor.isTransparent()com.sas.visuals.PainterInterface getPrePainter()
setPrePainter(com.sas.visuals.PainterInterface)void setPrePainter(com.sas.visuals.PainterInterface painter)
painter - The object to use to draw prior to calling paint() on the
component.getPrePainter()VisualInterfaceSupportInfo getVisualInterfaceSupportInfo()
Returns the info object which holds instance data for objects implementing the VisualInterface interface.
void setVisualInterfaceSupportInfo(VisualInterfaceSupportInfo info)
Sets the info object which holds instance data for objects implementing the VisualInterface interface.
info - The instance of VisualInterfaceSupportInfo for the component.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||