Inherits from: NSControl : NSView : NSResponder : NSObject
Package: com.apple.yellow.application
An NSImageView displays a single NSImage in a frame. The NSImageView class provides methods for choosing the image, choosing the frame, and for aligning and scaling the image to fit the frame.
For an NSControl, NSImageView is quite limited in its ability to respond to user events: the only thing a user can do is drag in a new image. When it receives the new image, the NSImageView replaces its old image and sends its action message to its target. Even this low level of interactivity can be disabled: you can send the NSImageView the message setEditable with an argument of false.
For more information, see the class specification for NSImageCell.
- Choosing the image
- image
- setImage
- Choosing the frame
- imageFrameStyle
- setImageFrameStyle
- Aligning and scaling the image
- imageAlignment
- setImageAlignment
- imageScaling
- setImageScaling
- Responding to user events
- isEditable
- setEditable
public NSImageView()
public NSImageView(NSRect aNSRect)
public NSImage image()
See Also: setImage
public int imageAlignment()
public int imageFrameStyle()
public int imageScaling()
public boolean isEditable()
See Also: setEditable
public void setEditable(boolean flag)
See Also: isEditable
public void setImage(NSImage image)
See Also: image
public void setImageAlignment(int alignment)
See Also: imageAlignment
public void setImageFrameStyle(int frameStyle)
See Also: imageFrameStyle
public void setImageScaling(int scaling)
See Also: imageScaling