333 |
protected Container contentPane; |
protected Container contentPane; |
334 |
|
|
335 |
protected JButton defaultButton; |
protected JButton defaultButton; |
336 |
|
|
337 |
|
/** |
338 |
|
* @since 1.4 |
339 |
|
*/ |
340 |
|
private int windowDecorationStyle = NONE; |
341 |
|
|
342 |
/** |
/** |
343 |
* DOCUMENT ME! |
* DOCUMENT ME! |
350 |
getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); |
getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); |
351 |
} |
} |
352 |
|
|
353 |
|
public void setMenuBar(JMenuBar m) |
354 |
|
{ |
355 |
|
setJMenuBar(m); |
356 |
|
} |
357 |
|
|
358 |
/** |
/** |
359 |
* DOCUMENT ME! |
* DOCUMENT ME! |
360 |
* |
* |
365 |
return menuBar; |
return menuBar; |
366 |
} |
} |
367 |
|
|
368 |
|
public JMenuBar getMenuBar() |
369 |
|
{ |
370 |
|
return getJMenuBar(); |
371 |
|
} |
372 |
|
|
373 |
/** |
/** |
374 |
* DOCUMENT ME! |
* DOCUMENT ME! |
375 |
* |
* |
584 |
defaultButton = newButton; |
defaultButton = newButton; |
585 |
firePropertyChange("defaultButton", oldButton, newButton); |
firePropertyChange("defaultButton", oldButton, newButton); |
586 |
} |
} |
587 |
|
|
588 |
|
/** |
589 |
|
* @since 1.4 |
590 |
|
*/ |
591 |
|
public int getWindowDecorationStyle() |
592 |
|
{ |
593 |
|
return windowDecorationStyle; |
594 |
|
} |
595 |
|
|
596 |
|
/** |
597 |
|
* @since 1.4 |
598 |
|
*/ |
599 |
|
public void setWindowDecorationStyle(int style) |
600 |
|
{ |
601 |
|
if (style != NONE |
602 |
|
&& style != FRAME |
603 |
|
&& style != INFORMATION_DIALOG |
604 |
|
&& style != ERROR_DIALOG |
605 |
|
&& style != COLOR_CHOOSER_DIALOG |
606 |
|
&& style != FILE_CHOOSER_DIALOG |
607 |
|
&& style != QUESTION_DIALOG |
608 |
|
&& style != WARNING_DIALOG) |
609 |
|
throw new IllegalArgumentException("invalid style"); |
610 |
|
|
611 |
|
int oldStyle = windowDecorationStyle; |
612 |
|
windowDecorationStyle = style; |
613 |
|
firePropertyChange("windowDecorationStyle", oldStyle, style); |
614 |
|
} |
615 |
} |
} |