|
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 | |
---|---|
java.awt.Dimension |
computePreferredSize()
The default implementation of this method calls super.getPreferredSize(). |
java.awt.Color |
getBackgroundColor()
Returns the background color of the component. |
BorderInterface |
getBorder()
Returns the border drawn around 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. |
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. |
java.awt.Dimension |
getPreferredSize()
|
com.sas.visuals.PainterInterface |
getPrePainter()
Returns the painter used to draw over the background of the component. |
int |
getVerticalPosition()
This method returns the vertical starting position of the component in pixels. |
VisualInterfaceSupportInfo |
getVisualInterfaceSupportInfo()
This method is not intended to be called by users. |
int |
getWidth()
This method returns the width of the component in pixels. |
boolean |
isEnabled()
Returns whether the component is currently enabled. |
boolean |
isFocus()
isFocus returns whether the component currently has focus. |
boolean |
isTransparent()
Returns whether the background is not filled with the backgroundColor. |
boolean |
isVisible()
Returns whether the component is currently visible. |
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 |
setDefaultValues()
|
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 |
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 |
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 |
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()
|
java.awt.Dimension |
superGetMinimumSize()
|
java.awt.Dimension |
superGetPreferredSize()
|
boolean |
superIsEnabled()
|
boolean |
superIsVisible()
|
void |
superPaint(java.awt.Graphics g)
|
void |
superSetBounds(int x,
int y,
int width,
int height)
|
void |
superSetEnabled(boolean enabled)
|
void |
superSetFont(java.awt.Font font)
|
void |
superSetVisible(boolean visible)
|
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 |