com.sas.visuals
Class IconView

com.sas.visuals.IconView
All Implemented Interfaces:
com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.ViewInterface, com.sas.visuals.IconInterface, MultipleValueEventSourceInterface, com.sas.visuals.PainterInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
AnimationIconView

public class IconView
implements com.sas.visuals.IconInterface

IconView is a lightweight component class that paints an IconInterface object.

See Also:
IconInterface, Serialized Form

Field Summary
protected  com.sas.visuals.IconInterface icon
          the IconInterface object to be manipulated and displayed
 
Fields inherited from class com.sas.awt.Component
RB_KEY
 
Constructor Summary
IconView()
          Default constructor.
IconView(com.sas.visuals.IconInterface icon)
          Constructor that sets the IconInterface to paint.
 
Method Summary
 java.awt.Dimension computePreferredSize()
          Return the preferredSize of the IconInterface
 com.sas.visuals.IconInterface getIcon()
          Return the IconInterface being painted.
 java.awt.Insets getInsets()
          Return the insets for the IconView.
 void paint(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
          Invokes the paint of the IconInterface object.
 void paint(java.awt.Graphics g)
          Paints this component.
 void setIcon(com.sas.visuals.IconInterface i)
          Set the IconInterface object that is to be displayed.
 void update(java.awt.Graphics g)
          Overridden to just call paint
 
Methods inherited from class com.sas.awt.Component
getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, getMinimumSize, setDefaultHeight, setDefaultValues, setDefaultWidth
 
Methods inherited from class com.sas.awt.ComponentVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, clone, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, print, printFinalize, printInitialize, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject
 
Methods inherited from interface com.sas.visuals.IconInterface
getPreferredSize
 

Field Detail

icon

protected com.sas.visuals.IconInterface icon
the IconInterface object to be manipulated and displayed

Constructor Detail

IconView

public IconView()
Default constructor.


IconView

public IconView(com.sas.visuals.IconInterface icon)
Constructor that sets the IconInterface to paint.

Parameters:
icon - the IconInterface object to be displayed
Method Detail

getIcon

public com.sas.visuals.IconInterface getIcon()
Return the IconInterface being painted.

Returns:
the IconInterface object used in this IconView
See Also:
setIcon(com.sas.visuals.IconInterface)

computePreferredSize

public java.awt.Dimension computePreferredSize()
Return the preferredSize of the IconInterface

Specified by:
computePreferredSize in interface VisualInterface
Overrides:
computePreferredSize in class ComponentVisualComponent
Returns:
the minimum dimensions that the icon view needs to display the icon
See Also:
VisualInterface.computePreferredSize()

getInsets

public java.awt.Insets getInsets()
Return the insets for the IconView.

Specified by:
getInsets in interface com.sas.visuals.PainterInterface
Returns:
the sum of the border and the IconInterface insets.
See Also:
PainterInterface

update

public void update(java.awt.Graphics g)
Overridden to just call paint

Overrides:
update in class ComponentVisualComponent
Parameters:
g - Graphics context
See Also:
VisualInterfaceSupport.update(com.sas.ComponentInterface, com.sas.awt.VisualInterface, java.awt.Component, java.awt.Graphics)

paint

public void paint(java.awt.Graphics g)
Paints this component.

Overrides:
paint in class ComponentVisualComponent
Parameters:
g - Graphics context
See Also:
VisualInterfaceSupport.paint(com.sas.ComponentInterface, com.sas.awt.VisualInterface, java.awt.Component, java.awt.Graphics)

paint

public void paint(java.awt.Component comp,
                  java.awt.Graphics g,
                  int x,
                  int y,
                  int width,
                  int height)
Invokes the paint of the IconInterface object.

Specified by:
paint in interface com.sas.visuals.PainterInterface
Parameters:
comp - the Component to paint the IconInterface with.
g - Graphics context
x - the x coordinate
y - the y coordinate
width - the width to be painted.
height - the height to be painted.

setIcon

public void setIcon(com.sas.visuals.IconInterface i)
Set the IconInterface object that is to be displayed.

Parameters:
i - the IconInterface object to be displayed and manipulated in this IconView.
See Also:
getIcon()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.