Developer Documentation
PATH  Mac OS X Documentation > Application Kit Reference: Java


[Previous] [Class List] [Next]

NSWindow.Delgate


Inherits from: java.lang.Object
Package: com.apple.yellow.application


Class Description


<<Description Forthcoming.>>




Instance Methods



windowShouldClose

public abstract boolean windowShouldClose (Object sender)

Invoked when the user attempts to close the window or when the NSWindow receives a performClose: message. The delegate can return false to prevent sender from closing.

windowShouldZoom

public abstract boolean windowShouldZoom (NSWindow sender, NSRect newFrame)

Invoked just before sender is zoomed. Zooming will change the frame of sender to newFrame. The delegate can return false to prevent sender from zooming.

See Also: - windowWillUseStandardFrame:defaultFrame:



windowWillResize

public abstract NSSize windowWillResize (NSWindow sender, NSSize) proposedFrameSize

Invoked when sender is being resized (whether by the user or through one of the setFrame... methods other than setFrame:display:). proposedFrameSize contains the size (in screen coordinates) the sender will be resized to. To resize to a different size, simply return the desired size from this method; to avoid resizing, return the current size. The NSWindow's minimum and maximum size constraints have already been applied when this method is invoked.

While the user is resizing an NSWindow, the delegate is sent a series of windowWillResize:toSize: messages as the NSWindow's outline is dragged. The NSWindow's outline is displayed at the constrained size as set by this method.



windowWillReturnFieldEditor

public abstract Object windowWillReturnFieldEditor (NSWindow sender, Object anObject)

Invoked when the field editor of sender is requested by anObject. If the delegate's implementation of this method returns an object other than null, the NSWindow substitutes it for the field editor and returns it to anObject.

See Also: - fieldEditor:forObject:



windowWillUseStandardFrame

public abstract NSRect windowWillUseStandardFrame (NSWindow sender, NSRect defaultFrame)

Invoked by the zoom: method while determining a frame the window may be zoomed to. Returns the standard frame (described below) for window. The defaultFrame parameter passed in is the size of the current screen, which is the screen containing the largest part of the window's current frame, possibly reduced on the top, bottom, left, or right, depending on the current interface style. For the Macintosh style, for example, the frame is reduced on the top to leave room for the menu bar.

The standard frame for a window should supply the size and location that are "best" for the type of information shown in the window, taking into account the available display or displays. For example, the best width for a window that displays a word-processing document is the width of a page or the width of the display, whichever is smaller. The best height can be determined similarly. On return from this method, the zoom: method modifies the returned standard frame, if necessary, to fit on the current screen.

To customize the standard state, you implement windowWillUseStandardFrame:defaultFrame: in the class of the window's delegate or, if necessary, in a window subclass. Your version should return a suitable standard frame, based on the currently displayed data or other factors.

See Also: - windowShouldZoom:toFrame:, - zoom: (NSWindow class)



windowWillReturnUndoManager

public abstract NSUndoManager windowWillReturnUndoManager (NSWindow sender)

<<Description Forthcoming>>


[Previous] [Next]