Copyright ©1995 by NeXT Computer, Inc.  All Rights Reserved.

NXDataLinkPanel



Inherits From: Panel : Window : Responder : Object
Declared In: appkit/NXDataLinkPanel.h



Class Description

An NXDataLinkPanel is a Panel that allows the user to inspect data links.  The NXDataLinkPanel 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 informed, by a setLink:andManager: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 either to the NXDataLinkPanel class or the single instance.

The NXDataLinkPanel is generally displayed using Application's orderFrontDataLinkPanel: method.  An application's sole instance of NXDataLinkPanel can be accessed with the new method.



Instance Variables

None declared in this class.



Method Types

Returning the panel + new
+ newContent:style:backing:buttonMask:defer:
Keeping the panel up to date + setLink:andManager:isMultiple:
setLink:andManager:isMultiple:
+ getLink:andManager:isMultiple:
getLink:andManager:isMultiple:
Customizing the panel setAccessoryView:
accessoryView
Responding to user input pickedBreakAllLinks:
pickedBreakLink:
pickedOpenSource:
pickedUpdateDestination:
pickedUpdateMode:



Class Methods

alloc

Generates an error message.  This method cannot be used to create NXDataLinkPanel instances; use new instead.



allocFromZone:

Generates an error message.  This method cannot be used to create NXDataLinkPanel instances; use new instead.



getLink:andManager:isMultiple:
+ getLink:(NXDataLink **)link
andManager:(NXDataLinkManager **)linkManager
isMultiple:(BOOL *)flag

Gets information about the NXDataLinkPanel's currently selected link.  This method returns the link in link, the link manager in linkManager, and the multiple selection status in flag.  Whenever a link is selected or deselected, this information must be set using setLink:andManager:isMultiple:.  Returns self.



new
+ new

Returns the application's sole NXDataLinkPanel object, creating it if necessary.



newContent:style:backing:buttonMask:defer:
+ newContent:(const NXRect *)contentRect
style:(int)aStyle
backing:(int)bufferingType
buttonMask:(int)mask
defer:(BOOL)flag

Initializes the NXDataLinkPanel object.  You never invoke this method; use new instead.



setLink:andManager:isMultiple:
+ setLink:(NXDataLink *)link
andManager:(NXDataLinkManager *)linkManager
isMultiple:(BOOL)flag

Informs the NXDataLinkPanel of the current document and selection.  This message must be sent any time data based on a data link is selected or deselected, or when a document (and therefore a new link manager) is activated.  Since the state of the selection always needs to be tracked, this message can be sent to either the NXDataLinkPanel class or instance.

link is the currently selected link; it should be nil if no link is selected.   linkManager is the current link manager.  flag should be YES if the panel is to indicate that more than one link is selected.  Returns self.



Instance Methods

accessoryView
accessoryView

Returns the NXDataLinkPanel's custom accessory view, set by setAccessoryView:.

See also:  setAccessoryView:



getLink:andManager:isMultiple:
getLink:(NXDataLink **)link
andManager:(NXDataLinkManager **)linkManager
isMultiple:(BOOL *)flag

Returns information about the NXDataLinkPanel's currently selected link.  This method 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.  Whenever a link is selected or deselected, this information must be set using setLink:andManager: isMultiple:. Returns the NXDataLinkPanel class.



pickedBreakAllLinks:
pickedBreakAllLinks:sender

Invoked when the user clicks the Break All Links button, this method puts up an attention panel to confirm the user's action, and then sends a breakAllLinks message to the current link manager, as set by setLink:andManager:isMultiple:.  Returns self.

See also:  breakAllLinks (NXDataLinkManager)



pickedBreakLink:
pickedBreakLink:sender

Invoked when the user clicks the Break Link button, this method puts up an attention panel to confirm the user's action, and then sends a break message to the current link, as set by setLink:andManager:isMultiple:.  Returns self.

See also:  break (NXDataLink)



pickedOpenSource:
pickedOpenSource:sender

Invoked when the user clicks the Open Source button, this method sends a openSource message to the current link, as set by setLink:andManager:isMultiple:.  Returns self.

See also:  openSource (NXDataLink)



pickedUpdateDestination:
pickedUpdateDestination: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.  Returns self.

See also:  updateDestination (NXDataLink), + setLink:andManager:isMultiple:



pickedUpdateMode:
pickedUpdateMode:sender

Invoked when the user selects the update mode, this method sends a setUpdateMode: message to the current link, as set by setLink:andManager:isMultiple:.  Returns self.

See also:  setUpdateMode: (NXDataLink)



setAccessoryView:
setAccessoryView:aView

Adds aView to the NXDataLinkPanel's view hierarchy.  Applications can invoke this method to add a View 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.  Returns the old accessory view.



setLink:andManager:isMultiple:
setLink:(NXDataLink *)link
andManager:(NXDataLinkManager *)linkManager
isMultiple:(BOOL)flag

Informs the NXDataLinkPanel of the current document and selection.  This message must be sent any time data based on a data link is selected or deselected, or when a document (and therefore a new link manager) is activated.  This method functions identically to the class method of the same name; since the state of the selection always needs to be tracked, this message can be sent to either the NXDataLinkPanel class or instance.

link is the currently selected link; it should be nil if no link is selected.   linkManager is the current link manager.  flag should be YES if the panel is to indicate that more than one link is selected.  Returns the NXDataLinkPanel class.