开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
forked from Stefan/Java8Source
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (2)
master
develop
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (2)
master
develop
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (2)
master
develop
Java8Source
/
src
/
javax
/
swing
/
JDialog.java
Java8Source
/
src
/
javax
/
swing
/
JDialog.java
JDialog.java 47.12 KB
一键复制 编辑 原始数据 按行查看 历史
Stefan 提交于 2020年08月11日 23:17 +08:00 . 初始化
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing;
import java.awt.*;
import java.awt.event.*;
import javax.accessibility.*;
/**
* The main class for creating a dialog window. You can use this class
* to create a custom dialog, or invoke the many class methods
* in {@link JOptionPane} to create a variety of standard dialogs.
* For information about creating dialogs, see
* <em>The Java Tutorial</em> section
* <a
href="https://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html">How
* to Make Dialogs</a>.
*
* <p>
*
* The {@code JDialog} component contains a {@code JRootPane}
* as its only child.
* The {@code contentPane} should be the parent of any children of the
* {@code JDialog}.
* As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* methods of this class are overridden, so that they delegate calls
* to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to a dialog as follows:
* <pre>
* dialog.add(child);
* </pre>
* And the child will be added to the contentPane.
* The {@code contentPane} is always non-{@code null}.
* Attempting to set it to {@code null} generates an exception.
* The default {@code contentPane} has a {@code BorderLayout}
* manager set on it.
* Refer to {@link javax.swing.RootPaneContainer}
* for details on adding, removing and setting the {@code LayoutManager}
* of a {@code JDialog}.
* <p>
* Please see the {@code JRootPane} documentation for a complete
* description of the {@code contentPane}, {@code glassPane},
* and {@code layeredPane} components.
* <p>
* In a multi-screen environment, you can create a {@code JDialog}
* on a different screen device than its owner. See {@link java.awt.Frame} for
* more information.
* <p>
* <strong>Warning:</strong> Swing is not thread safe. For more
* information see <a
* href="package-summary.html#threading">Swing's Threading
* Policy</a>.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans&trade;
* has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @see JOptionPane
* @see JRootPane
* @see javax.swing.RootPaneContainer
*
* @beaninfo
* attribute: isContainer true
* attribute: containerDelegate getContentPane
* description: A toplevel window for creating dialog boxes.
*
* @author David Kloba
* @author James Gosling
* @author Scott Violet
*/
public class JDialog extends Dialog implements WindowConstants,
Accessible,
RootPaneContainer,
TransferHandler.HasGetTransferHandler
{
/**
* Key into the AppContext, used to check if should provide decorations
* by default.
*/
private static final Object defaultLookAndFeelDecoratedKey =
new StringBuffer("JDialog.defaultLookAndFeelDecorated");
private int defaultCloseOperation = HIDE_ON_CLOSE;
/**
* @see #getRootPane
* @see #setRootPane
*/
protected JRootPane rootPane;
/**
* If true then calls to {@code add} and {@code setLayout}
* will be forwarded to the {@code contentPane}. This is initially
* false, but is set to true when the {@code JDialog} is constructed.
*
* @see #isRootPaneCheckingEnabled
* @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
*/
protected boolean rootPaneCheckingEnabled = false;
/**
* The {@code TransferHandler} for this dialog.
*/
private TransferHandler transferHandler;
/**
* Creates a modeless dialog without a title and without a specified
* {@code Frame} owner. A shared, hidden frame will be
* set as the owner of the dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog() {
this((Frame)null, false);
}
/**
* Creates a modeless dialog with the specified {@code Frame}
* as its owner and an empty title. If {@code owner}
* is {@code null}, a shared, hidden frame will be set as the
* owner of the dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @param owner the {@code Frame} from which the dialog is displayed
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Frame owner) {
this(owner, false);
}
/**
* Creates a dialog with an empty title and the specified modality and
* {@code Frame} as its owner. If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of the dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @param owner the {@code Frame} from which the dialog is displayed
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Frame owner, boolean modal) {
this(owner, "", modal);
}
/**
* Creates a modeless dialog with the specified title and
* with the specified owner frame. If {@code owner}
* is {@code null}, a shared, hidden frame will be set as the
* owner of the dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @param owner the {@code Frame} from which the dialog is displayed
* @param title the {@code String} to display in the dialog's
* title bar
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Frame owner, String title) {
this(owner, title, false);
}
/**
* Creates a dialog with the specified title, owner {@code Frame}
* and modality. If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of this dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: Any popup components ({@code JComboBox},
* {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @param owner the {@code Frame} from which the dialog is displayed
* @param title the {@code String} to display in the dialog's
* title bar
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE} otherwise the dialog is modeless
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
*
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Frame owner, String title, boolean modal) {
super(owner == null? SwingUtilities.getSharedOwnerFrame() : owner,
title, modal);
if (owner == null) {
WindowListener ownerShutdownListener =
SwingUtilities.getSharedOwnerFrameShutdownListener();
addWindowListener(ownerShutdownListener);
}
dialogInit();
}
/**
* Creates a dialog with the specified title,
* owner {@code Frame}, modality and {@code GraphicsConfiguration}.
* If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of this dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
* <p>
* NOTE: Any popup components ({@code JComboBox},
* {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight.
* <p>
* NOTE: This constructor does not allow you to create an unowned
* {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the {@code JDialog(Window)} or
* {@code JDialog(Dialog)} constructor with an argument of
* {@code null}.
*
* @param owner the {@code Frame} from which the dialog is displayed
* @param title the {@code String} to display in the dialog's
* title bar
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @param gc the {@code GraphicsConfiguration} of the target screen device;
* if {@code null}, the default system {@code GraphicsConfiguration}
* is assumed
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
* @since 1.4
*/
public JDialog(Frame owner, String title, boolean modal,
GraphicsConfiguration gc) {
super(owner == null? SwingUtilities.getSharedOwnerFrame() : owner,
title, modal, gc);
if (owner == null) {
WindowListener ownerShutdownListener =
SwingUtilities.getSharedOwnerFrameShutdownListener();
addWindowListener(ownerShutdownListener);
}
dialogInit();
}
/**
* Creates a modeless dialog with the specified {@code Dialog}
* as its owner and an empty title.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the owner {@code Dialog} from which the dialog is displayed
* or {@code null} if this dialog has no owner
* @throws HeadlessException {@code if GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Dialog owner) {
this(owner, false);
}
/**
* Creates a dialog with an empty title and the specified modality and
* {@code Dialog} as its owner.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the owner {@code Dialog} from which the dialog is displayed
* or {@code null} if this dialog has no owner
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Dialog owner, boolean modal) {
this(owner, "", modal);
}
/**
* Creates a modeless dialog with the specified title and
* with the specified owner dialog.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the owner {@code Dialog} from which the dialog is displayed
* or {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Dialog owner, String title) {
this(owner, title, false);
}
/**
* Creates a dialog with the specified title, modality
* and the specified owner {@code Dialog}.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the owner {@code Dialog} from which the dialog is displayed
* or {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*/
public JDialog(Dialog owner, String title, boolean modal) {
super(owner, title, modal);
dialogInit();
}
/**
* Creates a dialog with the specified title, owner {@code Dialog},
* modality and {@code GraphicsConfiguration}.
*
* <p>
* NOTE: Any popup components ({@code JComboBox},
* {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the owner {@code Dialog} from which the dialog is displayed
* or {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar
* @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If {@code true}, the modality type property is set to
* {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless
* @param gc the {@code GraphicsConfiguration} of the target screen device;
* if {@code null}, the default system {@code GraphicsConfiguration}
* is assumed
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns {@code true}.
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
* @since 1.4
*/
public JDialog(Dialog owner, String title, boolean modal,
GraphicsConfiguration gc) {
super(owner, title, modal, gc);
dialogInit();
}
/**
* Creates a modeless dialog with the specified {@code Window}
* as its owner and an empty title.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
*
* @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
*
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*
* @since 1.6
*/
public JDialog(Window owner) {
this(owner, Dialog.ModalityType.MODELESS);
}
/**
* Creates a dialog with an empty title and the specified modality and
* {@code Window} as its owner.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
* @param modalityType specifies whether dialog blocks input to other
* windows when shown. {@code null} value and unsupported modality
* types are equivalent to {@code MODELESS}
*
* @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
*
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*
* @since 1.6
*/
public JDialog(Window owner, ModalityType modalityType) {
this(owner, "", modalityType);
}
/**
* Creates a modeless dialog with the specified title and owner
* {@code Window}.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar or {@code null} if the dialog has no title
*
* @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
*
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*
* @since 1.6
*/
public JDialog(Window owner, String title) {
this(owner, title, Dialog.ModalityType.MODELESS);
}
/**
* Creates a dialog with the specified title, owner {@code Window} and
* modality.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar or {@code null} if the dialog has no title
* @param modalityType specifies whether dialog blocks input to other
* windows when shown. {@code null} value and unsupported modality
* types are equivalent to {@code MODELESS}
*
* @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
*
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*
* @since 1.6
*/
public JDialog(Window owner, String title, Dialog.ModalityType modalityType) {
super(owner, title, modalityType);
dialogInit();
}
/**
* Creates a dialog with the specified title, owner {@code Window},
* modality and {@code GraphicsConfiguration}.
* <p>
* NOTE: Any popup components ({@code JComboBox},
* {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight.
* <p>
* This constructor sets the component's locale property to the value
* returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar or {@code null} if the dialog has no title
* @param modalityType specifies whether dialog blocks input to other
* windows when shown. {@code null} value and unsupported modality
* types are equivalent to {@code MODELESS}
* @param gc the {@code GraphicsConfiguration} of the target screen device;
* if {@code null}, the default system {@code GraphicsConfiguration}
* is assumed
* @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
*
* @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal
* @see java.awt.Dialog#setModalityType
* @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale
*
* @since 1.6
*/
public JDialog(Window owner, String title, Dialog.ModalityType modalityType,
GraphicsConfiguration gc) {
super(owner, title, modalityType, gc);
dialogInit();
}
/**
* Called by the constructors to init the {@code JDialog} properly.
*/
protected void dialogInit() {
enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK);
setLocale( JComponent.getDefaultLocale() );
setRootPane(createRootPane());
setBackground(UIManager.getColor("control"));
setRootPaneCheckingEnabled(true);
if (JDialog.isDefaultLookAndFeelDecorated()) {
boolean supportsWindowDecorations =
UIManager.getLookAndFeel().getSupportsWindowDecorations();
if (supportsWindowDecorations) {
setUndecorated(true);
getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
}
}
sun.awt.SunToolkit.checkAndSetPolicy(this);
}
/**
* Called by the constructor methods to create the default
* {@code rootPane}.
*/
protected JRootPane createRootPane() {
JRootPane rp = new JRootPane();
// NOTE: this uses setOpaque vs LookAndFeel.installProperty as there
// is NO reason for the RootPane not to be opaque. For painting to
// work the contentPane must be opaque, therefor the RootPane can
// also be opaque.
rp.setOpaque(true);
return rp;
}
/**
* Handles window events depending on the state of the
* {@code defaultCloseOperation} property.
*
* @see #setDefaultCloseOperation
*/
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
switch(defaultCloseOperation) {
case HIDE_ON_CLOSE:
setVisible(false);
break;
case DISPOSE_ON_CLOSE:
dispose();
break;
case DO_NOTHING_ON_CLOSE:
default:
break;
}
}
}
/**
* Sets the operation that will happen by default when
* the user initiates a "close" on this dialog.
* You must specify one of the following choices:
* <br><br>
* <ul>
* <li>{@code DO_NOTHING_ON_CLOSE}
* (defined in {@code WindowConstants}):
* Don't do anything; require the
* program to handle the operation in the {@code windowClosing}
* method of a registered {@code WindowListener} object.
*
* <li>{@code HIDE_ON_CLOSE}
* (defined in {@code WindowConstants}):
* Automatically hide the dialog after
* invoking any registered {@code WindowListener}
* objects.
*
* <li>{@code DISPOSE_ON_CLOSE}
* (defined in {@code WindowConstants}):
* Automatically hide and dispose the
* dialog after invoking any registered {@code WindowListener}
* objects.
* </ul>
* <p>
* The value is set to {@code HIDE_ON_CLOSE} by default. Changes
* to the value of this property cause the firing of a property
* change event, with property name "defaultCloseOperation".
* <p>
* <b>Note</b>: When the last displayable window within the
* Java virtual machine (VM) is disposed of, the VM may
* terminate. See <a href="../../java/awt/doc-files/AWTThreadIssues.html">
* AWT Threading Issues</a> for more information.
*
* @param operation the operation which should be performed when the
* user closes the dialog
* @throws IllegalArgumentException if defaultCloseOperation value
* isn't one of the above valid values
* @see #addWindowListener
* @see #getDefaultCloseOperation
* @see WindowConstants
*
* @beaninfo
* preferred: true
* bound: true
* enum: DO_NOTHING_ON_CLOSE WindowConstants.DO_NOTHING_ON_CLOSE
* HIDE_ON_CLOSE WindowConstants.HIDE_ON_CLOSE
* DISPOSE_ON_CLOSE WindowConstants.DISPOSE_ON_CLOSE
* description: The dialog's default close operation.
*/
public void setDefaultCloseOperation(int operation) {
if (operation != DO_NOTHING_ON_CLOSE &&
operation != HIDE_ON_CLOSE &&
operation != DISPOSE_ON_CLOSE) {
throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
}
int oldValue = this.defaultCloseOperation;
this.defaultCloseOperation = operation;
firePropertyChange("defaultCloseOperation", oldValue, operation);
}
/**
* Returns the operation which occurs when the user
* initiates a "close" on this dialog.
*
* @return an integer indicating the window-close operation
* @see #setDefaultCloseOperation
*/
public int getDefaultCloseOperation() {
return defaultCloseOperation;
}
/**
* Sets the {@code transferHandler} property, which is a mechanism to
* support transfer of data into this component. Use {@code null}
* if the component does not support data transfer operations.
* <p>
* If the system property {@code suppressSwingDropSupport} is {@code false}
* (the default) and the current drop target on this component is either
* {@code null} or not a user-set drop target, this method will change the
* drop target as follows: If {@code newHandler} is {@code null} it will
* clear the drop target. If not {@code null} it will install a new
* {@code DropTarget}.
* <p>
* Note: When used with {@code JDialog}, {@code TransferHandler} only
* provides data import capability, as the data export related methods
* are currently typed to {@code JComponent}.
* <p>
* Please see
* <a href="https://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
* How to Use Drag and Drop and Data Transfer</a>, a section in
* <em>The Java Tutorial</em>, for more information.
*
* @param newHandler the new {@code TransferHandler}
*
* @see TransferHandler
* @see #getTransferHandler
* @see java.awt.Component#setDropTarget
* @since 1.6
*
* @beaninfo
* bound: true
* hidden: true
* description: Mechanism for transfer of data into the component
*/
public void setTransferHandler(TransferHandler newHandler) {
TransferHandler oldHandler = transferHandler;
transferHandler = newHandler;
SwingUtilities.installSwingDropTargetAsNecessary(this, transferHandler);
firePropertyChange("transferHandler", oldHandler, newHandler);
}
/**
* Gets the {@code transferHandler} property.
*
* @return the value of the {@code transferHandler} property
*
* @see TransferHandler
* @see #setTransferHandler
* @since 1.6
*/
public TransferHandler getTransferHandler() {
return transferHandler;
}
/**
* Calls {@code paint(g)}. This method was overridden to
* prevent an unnecessary call to clear the background.
*
* @param g the {@code Graphics} context in which to paint
*/
public void update(Graphics g) {
paint(g);
}
/**
* Sets the menubar for this dialog.
*
* @param menu the menubar being placed in the dialog
*
* @see #getJMenuBar
*
* @beaninfo
* hidden: true
* description: The menubar for accessing pulldown menus from this dialog.
*/
public void setJMenuBar(JMenuBar menu) {
getRootPane().setMenuBar(menu);
}
/**
* Returns the menubar set on this dialog.
*
* @see #setJMenuBar
*/
public JMenuBar getJMenuBar() {
return getRootPane().getMenuBar();
}
/**
* Returns whether calls to {@code add} and
* {@code setLayout} are forwarded to the {@code contentPane}.
*
* @return true if {@code add} and {@code setLayout}
* are forwarded; false otherwise
*
* @see #addImpl
* @see #setLayout
* @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
*/
protected boolean isRootPaneCheckingEnabled() {
return rootPaneCheckingEnabled;
}
/**
* Sets whether calls to {@code add} and
* {@code setLayout} are forwarded to the {@code contentPane}.
*
* @param enabled true if {@code add} and {@code setLayout}
* are forwarded, false if they should operate directly on the
* {@code JDialog}.
*
* @see #addImpl
* @see #setLayout
* @see #isRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
* @beaninfo
* hidden: true
* description: Whether the add and setLayout methods are forwarded
*/
protected void setRootPaneCheckingEnabled(boolean enabled) {
rootPaneCheckingEnabled = enabled;
}
/**
* Adds the specified child {@code Component}.
* This method is overridden to conditionally forward calls to the
* {@code contentPane}.
* By default, children are added to the {@code contentPane} instead
* of the frame, refer to {@link javax.swing.RootPaneContainer} for
* details.
*
* @param comp the component to be enhanced
* @param constraints the constraints to be respected
* @param index the index
* @throws IllegalArgumentException if {@code index} is invalid
* @throws IllegalArgumentException if adding the container's parent
* to itself
* @throws IllegalArgumentException if adding a window to a container
*
* @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
*/
protected void addImpl(Component comp, Object constraints, int index)
{
if(isRootPaneCheckingEnabled()) {
getContentPane().add(comp, constraints, index);
}
else {
super.addImpl(comp, constraints, index);
}
}
/**
* Removes the specified component from the container. If
* {@code comp} is not the {@code rootPane}, this will forward
* the call to the {@code contentPane}. This will do nothing if
* {@code comp} is not a child of the {@code JDialog} or
* {@code contentPane}.
*
* @param comp the component to be removed
* @throws NullPointerException if {@code comp} is null
* @see #add
* @see javax.swing.RootPaneContainer
*/
public void remove(Component comp) {
if (comp == rootPane) {
super.remove(comp);
} else {
getContentPane().remove(comp);
}
}
/**
* Sets the {@code LayoutManager}.
* Overridden to conditionally forward the call to the
* {@code contentPane}.
* Refer to {@link javax.swing.RootPaneContainer} for
* more information.
*
* @param manager the {@code LayoutManager}
* @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
*/
public void setLayout(LayoutManager manager) {
if(isRootPaneCheckingEnabled()) {
getContentPane().setLayout(manager);
}
else {
super.setLayout(manager);
}
}
/**
* Returns the {@code rootPane} object for this dialog.
*
* @see #setRootPane
* @see RootPaneContainer#getRootPane
*/
public JRootPane getRootPane() {
return rootPane;
}
/**
* Sets the {@code rootPane} property.
* This method is called by the constructor.
*
* @param root the {@code rootPane} object for this dialog
*
* @see #getRootPane
*
* @beaninfo
* hidden: true
* description: the RootPane object for this dialog.
*/
protected void setRootPane(JRootPane root) {
if(rootPane != null) {
remove(rootPane);
}
rootPane = root;
if(rootPane != null) {
boolean checkingEnabled = isRootPaneCheckingEnabled();
try {
setRootPaneCheckingEnabled(false);
add(rootPane, BorderLayout.CENTER);
}
finally {
setRootPaneCheckingEnabled(checkingEnabled);
}
}
}
/**
* Returns the {@code contentPane} object for this dialog.
*
* @return the {@code contentPane} property
*
* @see #setContentPane
* @see RootPaneContainer#getContentPane
*/
public Container getContentPane() {
return getRootPane().getContentPane();
}
/**
* Sets the {@code contentPane} property.
* This method is called by the constructor.
* <p>
* Swing's painting architecture requires an opaque {@code JComponent}
* in the containment hierarchy. This is typically provided by the
* content pane. If you replace the content pane it is recommended you
* replace it with an opaque {@code JComponent}.
* @see JRootPane
*
* @param contentPane the {@code contentPane} object for this dialog
*
* @throws java.awt.IllegalComponentStateException (a runtime
* exception) if the content pane parameter is {@code null}
* @see #getContentPane
* @see RootPaneContainer#setContentPane
*
* @beaninfo
* hidden: true
* description: The client area of the dialog where child
* components are normally inserted.
*/
public void setContentPane(Container contentPane) {
getRootPane().setContentPane(contentPane);
}
/**
* Returns the {@code layeredPane} object for this dialog.
*
* @return the {@code layeredPane} property
*
* @see #setLayeredPane
* @see RootPaneContainer#getLayeredPane
*/
public JLayeredPane getLayeredPane() {
return getRootPane().getLayeredPane();
}
/**
* Sets the {@code layeredPane} property.
* This method is called by the constructor.
*
* @param layeredPane the new {@code layeredPane} property
*
* @throws java.awt.IllegalComponentStateException (a runtime
* exception) if the layered pane parameter is null
* @see #getLayeredPane
* @see RootPaneContainer#setLayeredPane
*
* @beaninfo
* hidden: true
* description: The pane which holds the various dialog layers.
*/
public void setLayeredPane(JLayeredPane layeredPane) {
getRootPane().setLayeredPane(layeredPane);
}
/**
* Returns the {@code glassPane} object for this dialog.
*
* @return the {@code glassPane} property
*
* @see #setGlassPane
* @see RootPaneContainer#getGlassPane
*/
public Component getGlassPane() {
return getRootPane().getGlassPane();
}
/**
* Sets the {@code glassPane} property.
* This method is called by the constructor.
*
* @param glassPane the {@code glassPane} object for this dialog
* @see #getGlassPane
* @see RootPaneContainer#setGlassPane
*
* @beaninfo
* hidden: true
* description: A transparent pane used for menu rendering.
*/
public void setGlassPane(Component glassPane) {
getRootPane().setGlassPane(glassPane);
}
/**
* {@inheritDoc}
*
* @since 1.6
*/
public Graphics getGraphics() {
JComponent.getGraphicsInvoked(this);
return super.getGraphics();
}
/**
* Repaints the specified rectangle of this component within
* {@code time} milliseconds. Refer to {@code RepaintManager}
* for details on how the repaint is handled.
*
* @param time maximum time in milliseconds before update
* @param x the <i>x</i> coordinate
* @param y the <i>y</i> coordinate
* @param width the width
* @param height the height
* @see RepaintManager
* @since 1.6
*/
public void repaint(long time, int x, int y, int width, int height) {
if (RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
RepaintManager.currentManager(this).addDirtyRegion(
this, x, y, width, height);
}
else {
super.repaint(time, x, y, width, height);
}
}
/**
* Provides a hint as to whether or not newly created {@code JDialog}s
* should have their Window decorations (such as borders, widgets to
* close the window, title...) provided by the current look
* and feel. If {@code defaultLookAndFeelDecorated} is true,
* the current {@code LookAndFeel} supports providing window
* decorations, and the current window manager supports undecorated
* windows, then newly created {@code JDialog}s will have their
* Window decorations provided by the current {@code LookAndFeel}.
* Otherwise, newly created {@code JDialog}s will have their
* Window decorations provided by the current window manager.
* <p>
* You can get the same effect on a single JDialog by doing the following:
* <pre>
* JDialog dialog = new JDialog();
* dialog.setUndecorated(true);
* dialog.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
* </pre>
*
* @param defaultLookAndFeelDecorated A hint as to whether or not current
* look and feel should provide window decorations
* @see javax.swing.LookAndFeel#getSupportsWindowDecorations
* @since 1.4
*/
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated) {
if (defaultLookAndFeelDecorated) {
SwingUtilities.appContextPut(defaultLookAndFeelDecoratedKey, Boolean.TRUE);
} else {
SwingUtilities.appContextPut(defaultLookAndFeelDecoratedKey, Boolean.FALSE);
}
}
/**
* Returns true if newly created {@code JDialog}s should have their
* Window decorations provided by the current look and feel. This is only
* a hint, as certain look and feels may not support this feature.
*
* @return true if look and feel should provide Window decorations.
* @since 1.4
*/
public static boolean isDefaultLookAndFeelDecorated() {
Boolean defaultLookAndFeelDecorated =
(Boolean) SwingUtilities.appContextGet(defaultLookAndFeelDecoratedKey);
if (defaultLookAndFeelDecorated == null) {
defaultLookAndFeelDecorated = Boolean.FALSE;
}
return defaultLookAndFeelDecorated.booleanValue();
}
/**
* Returns a string representation of this {@code JDialog}.
* This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
* be {@code null}.
*
* @return a string representation of this {@code JDialog}.
*/
protected String paramString() {
String defaultCloseOperationString;
if (defaultCloseOperation == HIDE_ON_CLOSE) {
defaultCloseOperationString = "HIDE_ON_CLOSE";
} else if (defaultCloseOperation == DISPOSE_ON_CLOSE) {
defaultCloseOperationString = "DISPOSE_ON_CLOSE";
} else if (defaultCloseOperation == DO_NOTHING_ON_CLOSE) {
defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
} else defaultCloseOperationString = "";
String rootPaneString = (rootPane != null ?
rootPane.toString() : "");
String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ?
"true" : "false");
return super.paramString() +
",defaultCloseOperation=" + defaultCloseOperationString +
",rootPane=" + rootPaneString +
",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
}
/////////////////
// Accessibility support
////////////////
protected AccessibleContext accessibleContext = null;
/**
* Gets the AccessibleContext associated with this JDialog.
* For JDialogs, the AccessibleContext takes the form of an
* AccessibleJDialog.
* A new AccessibleJDialog instance is created if necessary.
*
* @return an AccessibleJDialog that serves as the
* AccessibleContext of this JDialog
*/
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJDialog();
}
return accessibleContext;
}
/**
* This class implements accessibility support for the
* {@code JDialog} class. It provides an implementation of the
* Java Accessibility API appropriate to dialog user-interface
* elements.
*/
protected class AccessibleJDialog extends AccessibleAWTDialog {
// AccessibleContext methods
//
/**
* Get the accessible name of this object.
*
* @return the localized name of the object -- can be null if this
* object does not have a name
*/
public String getAccessibleName() {
if (accessibleName != null) {
return accessibleName;
} else {
if (getTitle() == null) {
return super.getAccessibleName();
} else {
return getTitle();
}
}
}
/**
* Get the state of this object.
*
* @return an instance of AccessibleStateSet containing the current
* state set of the object
* @see AccessibleState
*/
public AccessibleStateSet getAccessibleStateSet() {
AccessibleStateSet states = super.getAccessibleStateSet();
if (isResizable()) {
states.add(AccessibleState.RESIZABLE);
}
if (getFocusOwner() != null) {
states.add(AccessibleState.ACTIVE);
}
if (isModal()) {
states.add(AccessibleState.MODAL);
}
return states;
}
} // inner class AccessibleJDialog
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yxljava/Java8Source.git
git@gitee.com:yxljava/Java8Source.git
yxljava
Java8Source
Java8Source
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /