org.springframework.richclient.widget
Class ImageViewWidget

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.widget.AbstractWidget
          extended by org.springframework.richclient.widget.ImageViewWidget
All Implemented Interfaces:
Widget

public class ImageViewWidget
extends AbstractWidget

ImageViewingWidget generates a component to view an image.

See Also:
setImage(javax.swing.ImageIcon), setImage(org.springframework.core.io.Resource)

Field Summary
 
Fields inherited from class org.springframework.richclient.widget.AbstractWidget
showing
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Fields inherited from interface org.springframework.richclient.widget.Widget
EMPTY_WIDGET
 
Constructor Summary
ImageViewWidget()
           
ImageViewWidget(ImageIcon image)
           
ImageViewWidget(Resource resource)
           
 
Method Summary
 JComponent getComponent()
           
 void setImage(ImageIcon image)
          Sets the image content based on an ImageIcon
 void setImage(Resource resource)
          Sets the image content of the widget based on a resource
 
Methods inherited from class org.springframework.richclient.widget.AbstractWidget
canClose, getCommands, isShowing, onAboutToHide, onAboutToShow
 
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageViewWidget

public ImageViewWidget()

ImageViewWidget

public ImageViewWidget(Resource resource)

ImageViewWidget

public ImageViewWidget(ImageIcon image)
Method Detail

setImage

public void setImage(Resource resource)
Sets the image content of the widget based on a resource

Parameters:
resource - points to a image resource

setImage

public void setImage(ImageIcon image)
Sets the image content based on an ImageIcon

Parameters:
image - The image icon to be shown

getComponent

public JComponent getComponent()
Returns:
A not null graphical component built using the parameters held in the widget instance.


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.