< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m

Print this page




 302         self.nsWindow = [[AWTWindow_Normal alloc] initWithDelegate:self
 303                             frameRect:contentRect
 304                             styleMask:styleMask
 305                           contentView:view];
 306     }
 307 
 308     if (self.nsWindow == nil) return nil; // no hope either
 309     [self.nsWindow release]; // the property retains the object already
 310 
 311     self.isEnabled = YES;
 312     self.isMinimizing = NO;
 313     self.javaPlatformWindow = platformWindow;
 314     self.styleBits = bits;
 315     self.ownerWindow = owner;
 316     [self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
 317 
 318     if (IS(self.styleBits, IS_POPUP)) {
 319         [self.nsWindow setCollectionBehavior:(1 << 8) /*NSWindowCollectionBehaviorFullScreenAuxiliary*/];
 320     }
 321 




 322     return self;
 323 }
 324 
 325 + (BOOL) isAWTWindow:(NSWindow *)window {
 326     return [window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]];
 327 }
 328 
 329 // Retrieves the list of possible window layers (levels)
 330 + (NSArray*) getWindowLayers {
 331     static NSArray *windowLayers;
 332     static dispatch_once_t token;
 333 
 334     // Initialize the list of possible window layers
 335     dispatch_once(&token, ^{
 336         // The layers are ordered from front to back, (i.e. the toppest one is the first)
 337         windowLayers = [NSArray arrayWithObjects:
 338                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)],
 339                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGFloatingWindowLevelKey)],
 340                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGNormalWindowLevelKey)],
 341                             nil




 302         self.nsWindow = [[AWTWindow_Normal alloc] initWithDelegate:self
 303                             frameRect:contentRect
 304                             styleMask:styleMask
 305                           contentView:view];
 306     }
 307 
 308     if (self.nsWindow == nil) return nil; // no hope either
 309     [self.nsWindow release]; // the property retains the object already
 310 
 311     self.isEnabled = YES;
 312     self.isMinimizing = NO;
 313     self.javaPlatformWindow = platformWindow;
 314     self.styleBits = bits;
 315     self.ownerWindow = owner;
 316     [self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
 317 
 318     if (IS(self.styleBits, IS_POPUP)) {
 319         [self.nsWindow setCollectionBehavior:(1 << 8) /*NSWindowCollectionBehaviorFullScreenAuxiliary*/];
 320     }
 321 
 322     if (IS(self.styleBits, SHEET)) {
 323         [self.nsWindow setStyleMask: NSDocModalWindowMask];
 324     }
 325 
 326     return self;
 327 }
 328 
 329 + (BOOL) isAWTWindow:(NSWindow *)window {
 330     return [window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]];
 331 }
 332 
 333 // Retrieves the list of possible window layers (levels)
 334 + (NSArray*) getWindowLayers {
 335     static NSArray *windowLayers;
 336     static dispatch_once_t token;
 337 
 338     // Initialize the list of possible window layers
 339     dispatch_once(&token, ^{
 340         // The layers are ordered from front to back, (i.e. the toppest one is the first)
 341         windowLayers = [NSArray arrayWithObjects:
 342                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)],
 343                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGFloatingWindowLevelKey)],
 344                             [NSNumber numberWithInt:CGWindowLevelForKey(kCGNormalWindowLevelKey)],
 345                             nil


< prev index next >