com.webobjects.eointerface.cocoa
Class EOCocoaImageViewPlugin
java.lang.Object
|
+--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
|
+--com.webobjects.eointerface.EOValueAssociation.ValuePlugin
|
+--com.webobjects.eointerface.cocoa.EOCocoaImageViewPlugin
- All Implemented Interfaces:
- NSDisposable
- public class EOCocoaImageViewPlugin
- extends EOValueAssociation.ValuePlugin
EOCocoaImageViewPlugin is a concrete subclass of EOValueAssociation.ValuePlugin that
displays NSData as an NSImage in an NSImageView. Images dropped onto its NSImageView
are saved out as NSData in TIFF format.
Usage:
associations classes: EOValueAssociation
widgets classes: NSImageView
value classes: NSData containing image data (gif, tiff, jpeg)
Method Summary |
void |
breakConnection()
Tells the plugin to halt communication with its NSImageView object. |
void |
establishConnection()
Establishes a connection between the plugin and its UI widget. |
void |
setValue(Object value,
boolean enabled)
Sets the image data to be used by this plugin's NSImageView object. |
Object |
value()
Returns the image data held by this plugin's NSImageView |
String[] |
widgetKeysTaken()
Returns an array of Strings which represent outlet names in Interface Builder. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EOCocoaImageViewPlugin
public EOCocoaImageViewPlugin(EOWidgetAssociation association,
Object widget)
- Creates a new EOCocoaImageViewPlugin connected to an association and a UI widget.
- Parameters:
association
- EOValueAssociation object for the plugin to usewidget
- NSImageView that the plugin will manage
breakConnection
public void breakConnection()
- Tells the plugin to halt communication with its NSImageView object.
This makes sure that actions from the NSImageView don't get to this plugin.
- Overrides:
breakConnection
in class EOWidgetAssociation.WidgetPlugin
establishConnection
public void establishConnection()
- Establishes a connection between the plugin and its UI widget.
This makes sure that actions from the NSImageView are sent to this plugin.
- Overrides:
establishConnection
in class EOWidgetAssociation.WidgetPlugin
setValue
public void setValue(Object value,
boolean enabled)
- Sets the image data to be used by this plugin's NSImageView object.
- Overrides:
setValue
in class EOValueAssociation.ValuePlugin
- Parameters:
value
- com.webobjects.foundation.NSData
object conatining the byteenabled
- if true
, the editable flag of the plugin's NSImageView is enabled,
so the user is able to drag-and-drop a new image into
the NSImageView; if false
, the NSImageView is not editable;
data of the NSImage to display in the NSImageView managed by this plugin
value
public Object value()
- Returns the image data held by this plugin's NSImageView
- Overrides:
value
in class EOValueAssociation.ValuePlugin
- Returns:
com.webobjects.foundation.NSData
object conatining the bytes
of the TIFF representation of the NSImage of the NSImageView managed by this plugin
widgetKeysTaken
public String[] widgetKeysTaken()
- Returns an array of Strings which represent outlet names in Interface Builder.
These outlets are disabled by Interface Builder once the NSImageView is
connected to this plugin's association.
EOCocoaImageViewPlugin takes over outlets with keys "action" and "target".
- Overrides:
widgetKeysTaken
in class EOWidgetAssociation.WidgetPlugin
- Returns:
- String array of outlet names
Copyright © 2003 Apple Computer, Inc.