org.rococoa.cocoa.appkit
Class NSPasteboard

java.lang.Object
  extended by org.rococoa.cocoa.foundation.NSObject
      extended by org.rococoa.cocoa.appkit.NSPasteboard
All Implemented Interfaces:
NSObject, ObjCObject

public abstract class NSPasteboard
extends NSObject
implements ObjCObject

This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class NSPasteboard._class_
           
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
NSObject._static_
 
Constructor Summary
NSPasteboard()
           
 
Method Summary
abstract  NSInteger addTypes_owner(NSArray newTypes, ObjCObject newOwner)
          This method adds promises for the specified types to the first pasteboard item.
static NSPasteboard alloc()
           
 FilterServices as_NSPasteboard_FilterServices()
           
abstract  NSString availableTypeFromArray(NSArray types)
          Original signature : -(NSString*)availableTypeFromArray:(NSArray*)
native declaration : NSPasteboard.h:127
abstract  boolean canReadItemWithDataConformingToTypes(NSArray types)
          Method to validate whether the pasteboard contains at least one item that conforms to the specified UTIs.
abstract  boolean canReadObjectForClasses_options(NSArray classArray, NSDictionary options)
          Method to validate whether at least one instance of any of the provided classes can be created with data on the pasteboard.
abstract  NSInteger changeCount()
          Original signature : -(NSInteger)changeCount
native declaration : NSPasteboard.h:71
abstract  NSInteger clearContents()
          Clears the existing contents of the pasteboard, preparing it for new contents.
abstract  NSData dataForType(NSString dataType)
          These methods return a best representation of all items on the pasteboard for the requested type.
abstract  NSInteger declareTypes_owner(NSArray newTypes, ObjCObject newOwner)
          This method is the equivalent of calling -clearContents, implicitly writing the first pasteboard item, and then calling -addTypes:owner: to promise types for the first pasteboard item.
static NSPasteboard generalPasteboard()
          Original signature : +(NSPasteboard*)generalPasteboard
native declaration : NSPasteboard.h:65
static NSPasteboard._class_ getNSClass()
           
abstract  NSUInteger indexOfPasteboardItem(NSPasteboardItem pasteboardItem)
          The index of the provided pasteboard item in the pasteboard.
abstract  NSString name()
          Original signature : -(NSString*)name
native declaration : NSPasteboard.h:69
static NSPasteboard new_()
           
abstract  NSArray pasteboardItems()
          Returns all pasteboard items.
static NSPasteboard pasteboardWithName(NSString name)
          Original signature : +(NSPasteboard*)pasteboardWithName:(NSString*)
native declaration : NSPasteboard.h:66
static NSPasteboard pasteboardWithUniqueName()
          Original signature : +(NSPasteboard*)pasteboardWithUniqueName
native declaration : NSPasteboard.h:67
abstract  NSObject propertyListForType(NSString dataType)
          Original signature : -(id)propertyListForType:(NSString*)
native declaration : NSPasteboard.h:138
abstract  NSArray readObjectsForClasses_options(NSArray classArray, NSDictionary options)
          Classes in the provided array must implement the NSPasteboardReading protocol.
abstract  void releaseGlobally()
          Original signature : -(void)releaseGlobally
native declaration : NSPasteboard.h:73
abstract  boolean setData_forType(NSData data, NSString dataType)
          These methods set data for the specified type on the first pasteboard item.
abstract  boolean setPropertyList_forType(ObjCObject plist, NSString dataType)
          Original signature : -(BOOL)setPropertyList:(id) forType:(NSString*)
native declaration : NSPasteboard.h:132
abstract  boolean setString_forType(NSString string, NSString dataType)
          Original signature : -(BOOL)setString:(NSString*) forType:(NSString*)
native declaration : NSPasteboard.h:133
abstract  NSString stringForType(NSString dataType)
          Original signature : -(NSString*)stringForType:(NSString*)
native declaration : NSPasteboard.h:139
abstract  NSArray types()
          These methods provide information about the types available from the entire pasteboard.
abstract  boolean writeObjects(NSArray objects)
          Writes the data of an array of objects that implement the NSPasteboardWriting protocol (including NSPasteboardItem instances).
 
Methods inherited from class org.rococoa.cocoa.foundation.NSObject
as_NSObject_NSAccessibility, as_NSObject_NSAccessibilityAdditions, as_NSObject_NSApplicationScriptingDelegation, as_NSObject_NSArchiverCallback, as_NSObject_NSClassDescriptionPrimitives, as_NSObject_NSCoderMethods, as_NSObject_NSColorPanelResponderMethod, as_NSObject_NSComparisonMethods, as_NSObject_NSControlSubclassNotifications, as_NSObject_NSCopyLinkMoveHandler, as_NSObject_NSDelayedPerforming, as_NSObject_NSDeprecatedKeyValueCoding, as_NSObject_NSDeprecatedKeyValueObservingCustomization, as_NSObject_NSDeprecatedMethods, as_NSObject_NSDictionaryControllerKeyValuePair, as_NSObject_NSDistributedObjects, as_NSObject_NSDraggingDestination, as_NSObject_NSDraggingSource, as_NSObject_NSDraggingSourceDeprecated, as_NSObject_NSEditor, as_NSObject_NSEditorRegistration, as_NSObject_NSErrorRecoveryAttempting, as_NSObject_NSFileManagerFileOperationAdditions, as_NSObject_NSFontManagerDelegate, as_NSObject_NSFontManagerResponderMethod, as_NSObject_NSFontPanelValidationAdditions, as_NSObject_NSKeyValueBindingCreation, as_NSObject_NSKeyValueCoding, as_NSObject_NSKeyValueObserverNotification, as_NSObject_NSKeyValueObserverRegistration, as_NSObject_NSKeyValueObserving, as_NSObject_NSKeyValueObservingCustomization, as_NSObject_NSMenuValidation, as_NSObject_NSNibAwaking, as_NSObject_NSPasteboardOwner, as_NSObject_NSPlaceholders, as_NSObject_NSScriptClassDescription, as_NSObject_NSScripting, as_NSObject_NSScriptingComparisonMethods, as_NSObject_NSScriptKeyValueCoding, as_NSObject_NSScriptObjectSpecifiers, as_NSObject_NSThreadPerformAdditions, as_NSObject_NSURLClient, as_NSObject_NSURLConnectionDelegate, as_NSObject_NSURLDownloadDelegate, copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardingTargetForSelector, forwardInvocation, init, isKindOfClass, isKindOfClass, methodForSelector, methodSignatureForSelector, mutableCopy, release, retain, retainCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rococoa.ObjCObject
id
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
autorelease, class_, conformsToProtocol, hash, isEqual, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone
 

Constructor Detail

NSPasteboard

public NSPasteboard()
Method Detail

as_NSPasteboard_FilterServices

public FilterServices as_NSPasteboard_FilterServices()

generalPasteboard

public static NSPasteboard generalPasteboard()
Original signature : +(NSPasteboard*)generalPasteboard
native declaration : NSPasteboard.h:65


pasteboardWithName

public static NSPasteboard pasteboardWithName(NSString name)
Original signature : +(NSPasteboard*)pasteboardWithName:(NSString*)
native declaration : NSPasteboard.h:66


pasteboardWithUniqueName

public static NSPasteboard pasteboardWithUniqueName()
Original signature : +(NSPasteboard*)pasteboardWithUniqueName
native declaration : NSPasteboard.h:67


name

public abstract NSString name()
Original signature : -(NSString*)name
native declaration : NSPasteboard.h:69


changeCount

public abstract NSInteger changeCount()
Original signature : -(NSInteger)changeCount
native declaration : NSPasteboard.h:71


releaseGlobally

public abstract void releaseGlobally()
Original signature : -(void)releaseGlobally
native declaration : NSPasteboard.h:73


clearContents

public abstract NSInteger clearContents()
Clears the existing contents of the pasteboard, preparing it for new contents. This is the first step in providing data on the pasteboard. Returns the change count of the pasteboard.
Original signature : -(NSInteger)clearContents
native declaration : NSPasteboard.h:78


writeObjects

public abstract boolean writeObjects(NSArray objects)
Writes the data of an array of objects that implement the NSPasteboardWriting protocol (including NSPasteboardItem instances). Returns NO if the items were not successfully added to the pasteboard.
Original signature : -(BOOL)writeObjects:(NSArray*)
native declaration : NSPasteboard.h:83


readObjectsForClasses_options

public abstract NSArray readObjectsForClasses_options(NSArray classArray,
                                                      NSDictionary options)
Classes in the provided array must implement the NSPasteboardReading protocol. Cocoa classes that implement this protocol include NSImage, NSString, NSURL, NSColor, NSAttributedString, and NSPasteboardItem. For every item on the pasteboard, each class in the provided array will be queried for the types it can read using -readableTypesForPasteboard:. An instance will be created of the first class found in the provided array whose readable types match a conforming type contained in that pasteboard item. Any instances that could be created from pasteboard item data is returned to the caller. Additional options, such as restricting the search to file URLs with particular content types, can be specified with an options dictionary. See the comments for the option keys for a full description. Returns nil if there is an error in retrieving the requested items from the pasteboard or if no objects of the specified types can be created.
Example: there are five items on the pasteboard, two contain TIFF data, two contain RTF data, one contains a private data type. Calling -readObjectsForClasses: with just the NSImage class, will return an array containing two image objects. Calling with just the NSAttributedString class, will return an array containing two attributed strings. Calling with both classes will return two image objects and two attributed strings. Note that in the above examples, the count of objects returned is less than the number of items on the pasteboard. Only objects of the requested classes are returned. You can always ensure to receive one object per item on the pasteboard by including the NSPasteboardItem class in the array of classes. In this example, an array containing the NSImage, NSAttributedString, and NSSPasteboardItem classes will return an array with two images, two attributed strings, and one pasteboard item containing the private data type.
Original signature : -(NSArray*)readObjectsForClasses:(NSArray*) options:(NSDictionary*)
native declaration : NSPasteboard.h:90


pasteboardItems

public abstract NSArray pasteboardItems()
Returns all pasteboard items. Returns nil if there is an error retrieving pasteboard items.
Original signature : -(NSArray*)pasteboardItems
native declaration : NSPasteboard.h:95


indexOfPasteboardItem

public abstract NSUInteger indexOfPasteboardItem(NSPasteboardItem pasteboardItem)
The index of the provided pasteboard item in the pasteboard. If the pasteboard item has not been added to any pasteboard, or is owned by another pasteboard, returns the value NSNotFound. An item's index in the pasteboard is useful for a pasteboard item data provider that has promised data for multiple items, to be able to easily match the pasteboard item to an array of source data from which to derive the promised data.
Original signature : -(NSUInteger)indexOfPasteboardItem:(NSPasteboardItem*)
native declaration : NSPasteboard.h:100


canReadItemWithDataConformingToTypes

public abstract boolean canReadItemWithDataConformingToTypes(NSArray types)
Method to validate whether the pasteboard contains at least one item that conforms to the specified UTIs.
Original signature : -(BOOL)canReadItemWithDataConformingToTypes:(NSArray*)
native declaration : NSPasteboard.h:105


canReadObjectForClasses_options

public abstract boolean canReadObjectForClasses_options(NSArray classArray,
                                                        NSDictionary options)
Method to validate whether at least one instance of any of the provided classes can be created with data on the pasteboard. Classes in the provided array must implement the NSPasteboardReading protocol. Additional options, such as restricting the search to file URLs, or URLs particular content types, can be specified with an options dictionary. See the comments for the reading option keys for a full description.
Original signature : -(BOOL)canReadObjectForClasses:(NSArray*) options:(NSDictionary*)
native declaration : NSPasteboard.h:110


declareTypes_owner

public abstract NSInteger declareTypes_owner(NSArray newTypes,
                                             ObjCObject newOwner)
This method is the equivalent of calling -clearContents, implicitly writing the first pasteboard item, and then calling -addTypes:owner: to promise types for the first pasteboard item. In general, this method should not be used with -writeObjects: since -writeObjects: will always write additional items to the pasteboard, and will not affect items already on the pasteboard, including the item implicitly created by this method.
Original signature : -(NSInteger)declareTypes:(NSArray*) owner:(id)
native declaration : NSPasteboard.h:118


addTypes_owner

public abstract NSInteger addTypes_owner(NSArray newTypes,
                                         ObjCObject newOwner)
This method adds promises for the specified types to the first pasteboard item. If the data for those types is provided immediately, the owner can be nil. If the data for the added types will be provided lazily when requested from the pasteboard, an owner object must be provided that implements the -pasteboard:provideDataForType: method of the NSPasteboardOwner informal protocol.
Original signature : -(NSInteger)addTypes:(NSArray*) owner:(id)
native declaration : NSPasteboard.h:122


types

public abstract NSArray types()
These methods provide information about the types available from the entire pasteboard.
Original signature : -(NSArray*)types
native declaration : NSPasteboard.h:126


availableTypeFromArray

public abstract NSString availableTypeFromArray(NSArray types)
Original signature : -(NSString*)availableTypeFromArray:(NSArray*)
native declaration : NSPasteboard.h:127


setData_forType

public abstract boolean setData_forType(NSData data,
                                        NSString dataType)
These methods set data for the specified type on the first pasteboard item.
Original signature : -(BOOL)setData:(NSData*) forType:(NSString*)
native declaration : NSPasteboard.h:131


setPropertyList_forType

public abstract boolean setPropertyList_forType(ObjCObject plist,
                                                NSString dataType)
Original signature : -(BOOL)setPropertyList:(id) forType:(NSString*)
native declaration : NSPasteboard.h:132


setString_forType

public abstract boolean setString_forType(NSString string,
                                          NSString dataType)
Original signature : -(BOOL)setString:(NSString*) forType:(NSString*)
native declaration : NSPasteboard.h:133


dataForType

public abstract NSData dataForType(NSString dataType)
These methods return a best representation of all items on the pasteboard for the requested type. For almost all data types, this simply means returning the data for the first item on the pasteboard that contains that type. For standard text data types such as string, RTF, and RTFD, the text data from each item will be returned as one combined result separated by newlines.
Original signature : -(NSData*)dataForType:(NSString*)
native declaration : NSPasteboard.h:137


propertyListForType

public abstract NSObject propertyListForType(NSString dataType)
Original signature : -(id)propertyListForType:(NSString*)
native declaration : NSPasteboard.h:138


stringForType

public abstract NSString stringForType(NSString dataType)
Original signature : -(NSString*)stringForType:(NSString*)
native declaration : NSPasteboard.h:139


alloc

public static NSPasteboard alloc()

new_

public static NSPasteboard new_()

getNSClass

public static NSPasteboard._class_ getNSClass()


Copyright © 2009. All Rights Reserved.