[TOC] [Prev] [Next] [Bottom]


NSDataLinkPanel

Inherits From:
NSPanel : NSWindow : NSResponder : NSObject

Conforms To:
NSCoding (NSResponder)
NSObject (NSObject)

Declared In:
AppKit/NSDataLinkPanel.h

Class Description

An NSDataLinkPanel is an NSPanel that allows the user to inspect data links. The NSDataLinkPanel functions primarily by sending messages to the current data link manager (representing the current document) and to the current link (representing the current selection if it's based on a data link). Thus, the panel should be sent a setLink:manager:isMultiple: message any time the selection changes or a document is created or activated. Since the selection may need to be tracked even before the panel is created, this message can be sent to either the NSDataLinkPanel class or the shared instance.

The NSDataLinkPanel is generally displayed using NSApplication's orderFrontDataLinkPanel: method. An application's sole instance of NSDataLinkPanel can be accessed with the sharedDataLinkPanel method.


Method Types

Creating and initializing an NSDataLinkPanel
+ sharedDataLinkPanel
Keeping the panel up to date
+ getLink:manager:isMultiple:
+ setLink:manager:isMultiple:
- getLink:manager:isMultiple:
- setLink:manager:isMultiple:
Customizing the panel
- accessoryView
- setAccessoryView:
Responding to user input
- pickedBreakAllLinks:
- pickedBreakLink:
- pickedOpenSource:
- pickedUpdateDestination:
- pickedUpdateMode:

Class Methods

getLink:manager:isMultiple:

+ (void)getLink:(NSDataLink **)link
manager:(NSDataLinkManager **)linkManager
isMultiple:(BOOL *)flag

Gets information about the NSDataLinkPanel's currently selected link; returns the link in link, the link manager in linkManager, and the multiple selection status in flag.

See also: + setLink:manager:isMultiple:


setLink:manager:isMultiple:

+ (void)setLink:(NSDataLink *)link
manager:(NSDataLinkManager *)linkManager
isMultiple:(BOOL)flag

Informs the receiver of the current document and selection using link as the currently selected link and linkManager as the current link manager. flag is YES if the panel will indicate that more than one link is selected.

This message must be sent whenever data based on a data link is selected or deselected, or when a document (and therefore a new link manager) is activated. This message can be sent to either the NSDataLinkPanel class or instance.

See also: + getLink:manager:isMultiple:


sharedDataLinkPanel

+ (NSDataLinkPanel *)sharedDataLinkPanel

Initializes and returns the shared NSDataLinkPanel object.


Instance Methods

accessoryView

- (NSView *)accessoryView

Returns the NSDataLinkPanel's custom accessory view.

See also: - setAccessoryView:


getLink:manager:isMultiple:

- (void)getLink:(NSDataLink **)link
manager:(NSDataLinkManager **)linkManager
isMultiple:(BOOL *)flag

Gets information about the NSDataLinkPanel's currently selected link; returns the link in link, the link manager in linkManager, and the multiple selection status in flag. This method functions identically to the class method of the same name.

See also: - setLink:manager:isMultiple:, + getLink:manager:isMultiple:


pickedBreakAllLinks:

- (void)pickedBreakAllLinks:(id)sender

Invoked when the user clicks the Break All Links button, this method puts up an attention panel to confirm the user's action, then sends a breakAllLinks message to the current link manager.

See also: - breakAllLinks (NSDataLinkManager)


pickedBreakLink:

- (void)pickedBreakLink:(id)sender

Invoked when the user clicks the Break Link button, this method puts up an attention panel to confirm the user's action, then sends a break message to the current link.

See also: - break (NSDataLink)


pickedOpenSource:

- (void)pickedOpenSource:(id)sender

Invoked when the user clicks the Open Source button, this method sends an openSource message to the current link.

See also: - openSource (NSDataLink)


pickedUpdateDestination:

- (void)pickedUpdateDestination:(id)sender

Invoked when the user clicks the Update from Source button, this method sends a message to the current link to verify and update the data source and then update the destination data.

See also: - updateDestination (NSDataLink)


pickedUpdateMode:

- (void)pickedUpdateMode:(id)sender

Invoked when the user selects the update mode, this method sends a setUpdateMode: message to the current link.

See also: - setUpdateMode: (NSDataLink)


setAccessoryView:

- (void)setAccessoryView:(NSView *)aView

Adds aView to the NSDataLinkPanel's view hierarchy. Applications can invoke this method to add an NSView that contains their own controls. The panel is automatically resized to accommodate aView. This method can be invoked repeatedly to change the accessory view depending on the situation. If aView is nil, then the panel's current accessory view, if any, is removed.

See also: - accessoryView


setLink:manager:isMultiple:

- (void)setLink:(NSDataLink *)link
manager:(NSDataLinkManager *)linkManager
isMultiple:(BOOL)flag

Informs the receiver of the current document and selection using link as the currently selected link and linkManager as the current link manager. flag is YES if the panel will indicate that more than one link is selected.

This message must be sent whenever data based on a data link is selected or deselected, or when a document (and therefore a new link manager) is activated. This message can be sent to either the NSDataLinkPanel class or instance.

See also: - getLink:manager:isMultiple:, + setLink:manager:isMultiple:



[TOC] [Prev] [Next] [Bottom]

Copyright © 1997, Apple Computer, Inc. All rights reserved.