1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.views.common; 17 18 /** 19 * Constant values related to the main interface 20 * 21 * @since 2021/5/19 16:39 22 */ 23 public final class LayoutConstants { 24 /** 25 * 初始值 26 */ 27 public static final int INITIAL_VALUE = -1; 28 29 /** 30 * 界面布局宽度 31 */ 32 public static final int WINDOW_WIDTH = 1200; 33 34 /** 35 * 界面布局高度 36 */ 37 public static final int WINDOW_HEIGHT = 800; 38 39 /** 40 * 字体大小 41 */ 42 public static final int FONT_SIZE = 14; 43 44 /** 45 * 二级欢迎界面按钮高度 46 */ 47 public static final int BUTTON_HEIGHT = 25; 48 49 /** 50 * 多配置界面选项卡标签宽度 51 */ 52 public static final int JPA_LABEL_WIDTH = 135; 53 54 /** 55 * 多配置界面选项卡标签左侧宽 56 */ 57 public static final int JP_LEFT_WIDTH = 118; 58 59 /** 60 * 多配置界面选项卡标签左侧宽 61 */ 62 public static final int JP_LEFT_HEIGHT = 20; 63 64 /** 65 * 多配置界面选项卡标签右侧宽 66 */ 67 public static final int JP_RIGHT_WIDTH = 10; 68 69 /** 70 * 多配置界面选项卡标签右侧宽 71 */ 72 public static final int JP_RIGHT_HEIGHT = 20; 73 74 /** 75 * 配置界面选项卡标签宽度 76 */ 77 public static final int JP_SET_WIDTH = 118; 78 79 /** 80 * 配置界面选项卡标签宽度 81 */ 82 public static final int JP_SET_HEIGHT = 20; 83 84 /** 85 * 应用场景标签X值 86 */ 87 public static final int APP_LABEL_X = 28; 88 89 /** 90 * 应用场景标签Y1值 91 */ 92 public static final int APP_LABEL_Y2 = 580; 93 94 /** 95 * 应用场景标签宽度 96 */ 97 public static final int APP_LABEL_WIDTH = 2500; 98 99 /** 100 * 应用场景描述字体大小 101 */ 102 public static final int TUN_LABEL_FONT = 12; 103 104 /** 105 * 场景类型标签Y值 106 */ 107 public static final int TASK_SCENE_Y = 30; 108 109 /** 110 * 设备框大小 111 */ 112 public static final int HEIGHT_PRESSE = 451; 113 114 /** 115 * 场景类型标签字体 116 */ 117 public static final int TASK_FONT = 25; 118 119 /** 120 * 选择场景类型标签宽度 121 */ 122 public static final int CH_TASK_WIDTH = 250; 123 124 /** 125 * 应用场景按钮字体大小 126 */ 127 public static final int APP_BUT_FONT = 12; 128 129 /** 130 * top panel east width 131 */ 132 public static final int TOP_PANEL_EAST_WIDTH = 200; 133 134 /** 135 * 设备进程面板X值 136 */ 137 public static final int DEVICE_PRO_X = 35; 138 139 /** 140 * 设备进程面板宽度 141 */ 142 public static final int DEVICE_PRO_WIDTH = 700; 143 144 /** 145 * top panel height 146 */ 147 public static final int TOP_PANEL_HEIGHT = 30; 148 149 /** 150 * 每一台设备对应X值 151 */ 152 public static final int DEVICES_X = 40; 153 154 /** 155 * 每一台设备对应Y值 156 */ 157 public static final int DEVICES_Y = 2; 158 159 /** 160 * 每一台设备对标签宽度 161 */ 162 public static final int DEVICES_WIDTH = 100; 163 164 /** 165 * 每一台设备对标签高度 166 */ 167 public static final int DEVICES_HEIGHT = 20; 168 169 /** 170 * 每一台设备对标签字体大小 171 */ 172 public static final int DEVICES_FONT = 13; 173 174 /** 175 * 每设备信息标签高度 176 */ 177 public static final int DEVICE_HEIGHT = 20; 178 179 /** 180 * 设备连接方式下拉框宽度 181 */ 182 public static final int CON_BOX_WIDTH = 100; 183 184 /** 185 * 设备名称下拉框对应Y值 186 */ 187 public static final int DEVICE_NAME_Y = 30; 188 189 /** 190 * Y轴高度 191 */ 192 public static final int SE_PANEL_Y_TWO = 110; 193 194 /** 195 * 标签名称文本框宽度 196 */ 197 public static final int LABEL_NAME_WIDTH = 280; 198 199 /** 200 * 标签名称文本框高度 201 */ 202 public static final int LABEL_NAME_HEIGHT = 20; 203 204 /** 205 * 设备添加按钮对应Y值 206 */ 207 public static final int DEVICE_ADD_Y = 5; 208 209 /** 210 * 设备添加按钮宽度 211 */ 212 public static final int DEVICE_ADD_WIDTH = 100; 213 214 /** 215 * 设备添加按钮高度 216 */ 217 public static final int DEVICE_ADD_HEIGHT = 30; 218 219 /** 220 * Center容器左边部分top面板宽度 221 */ 222 public static final int LEFT_TOP_WIDTH = 700; 223 224 /** 225 * 设备添加按钮高度 226 */ 227 public static final int MONITOR_PANEL_HEIGHT = 50; 228 229 /** 230 * Center容器右边面板宽度 231 */ 232 public static final int EAST_LABEL_WIDTH = 500; 233 234 /** 235 * 应用场景标签对应X值 236 */ 237 public static final int TASK_LABEL_X = 30; 238 239 /** 240 * 应用场景标签对应Y值 241 */ 242 public static final int TASK_LABEL_Y = 30; 243 244 /** 245 * number计算 246 */ 247 public static final int TASK_DEC_NUM = 27; 248 249 /** 250 * 监控项内存标签对应Y值 251 */ 252 public static final int MEMORY_Y = 10; 253 254 /** 255 * 监控项内存标签宽度 256 */ 257 public static final int MEMORY_WIDTH = 50; 258 259 /** 260 * java选择框宽度 261 */ 262 public static final int JAVA_WIDTH = 120; 263 264 /** 265 * java选择框高度 266 */ 267 public static final int JAVA_HEIGHT = 20; 268 269 /** 270 * others选择框对应Y值 271 */ 272 public static final int OTHERS_Y = 130; 273 274 /** 275 * 滚轮滚动速度 276 */ 277 public static final int SCROLL_UNIT_INCREMENT = 10; 278 279 /** 280 * 数组索引 281 */ 282 public static final int INDEX_ZERO = 0; 283 284 /** 285 * 数组索引 286 */ 287 public static final int INDEX_ONE = 1; 288 289 /** 290 * 数组索引 291 */ 292 public static final int INDEX_TWO = 2; 293 294 /** 295 * 数组索引 296 */ 297 public static final int INDEX_THREE = 3; 298 299 /** 300 * 数组索引 301 */ 302 public static final int INDEX_FOUR = 4; 303 304 /** 305 * 数组索引 306 */ 307 public static final int INDEX_FIVE = 5; 308 309 /** 310 * 数组索引 311 */ 312 public static final int INDEX_SIX = 6; 313 314 /** 315 * 数组索引 316 */ 317 public static final int INDEX_SEVEN = 7; 318 319 /** 320 * X轴距离 321 */ 322 public static final int NUMBER_X = 160; 323 324 /** 325 * X轴距离 326 */ 327 public static final int NUMBER_X_ADD = 165; 328 329 /** 330 * Y轴距离 331 */ 332 public static final int NUMBER_Y = 4; 333 334 /** 335 * 高度 336 */ 337 public static final int HEIGHT = 80; 338 339 /** 340 * 用于Y轴位置计算 341 */ 342 public static final int HEIGHT_Y = 150; 343 344 /** 345 * 秒数计数 346 */ 347 public static final int NUMBER_SECONDS = 59; 348 349 /** 350 * 秒数计数 351 */ 352 public static final int NUMBER_SLEEEP = 50; 353 354 /** 355 * 循环计数 356 */ 357 public static final int NUMBER_FOR = 220; 358 359 /** 360 * Thread interval time 361 */ 362 public static final int NUMBER_THREAD = 1000; 363 364 /** 365 * 滚东条计数 366 */ 367 public static final int SCROPNUM = 360; 368 369 /** 370 * 多场景描述面板大小 371 */ 372 public static final int JLABEL_SIZE = 60; 373 374 /** 375 * 宽度 376 */ 377 public static final int WIDTHSUPEN = 400; 378 379 /** 380 * 场景描述框大小 381 */ 382 public static final int HIGTHSCEECS = 65; 383 384 /** 385 * 二级界面的按钮大小 386 */ 387 public static final int BUTTON_SIZE = 28; 388 389 /** 390 * 检测页面内存添加选项字体 391 */ 392 public static final int OPTION_FONT = 14; 393 394 /** 395 * 数字1000 396 */ 397 public static final int THOUSAND = 1000; 398 399 /** 400 * 数字500 401 */ 402 public static final int FIVE_HUNDRED = 500; 403 404 /** 405 * 数字2 406 */ 407 public static final int TWO = 2; 408 409 /** 410 * 数字300 411 */ 412 public static final int THREE_HUNDRED = 300; 413 414 /** 415 * 数字122 416 */ 417 public static final int HUNDRED_TWENTY_TWO = 122; 418 419 /** 420 * 数字100 421 */ 422 public static final int HUNDRED = 100; 423 424 /** 425 * 数字40 426 */ 427 public static final int FORTY = 40; 428 429 /** 430 * 数字20 431 */ 432 public static final int TWENTY = 20; 433 434 /** 435 * 数字-1 436 */ 437 public static final int NEGATIVE_ONE = -1; 438 439 /** 440 * 数字400 441 */ 442 public static final int FOUR_HUNDRED = 400; 443 444 /** 445 * 数字260 446 */ 447 public static final int TWO_HUNDRED_SIXTY = 260; 448 449 /** 450 * 数字10 451 */ 452 public static final int TEN = 10; 453 454 /** 455 * 数字30 456 */ 457 public static final int THIRTY = 30; 458 459 /** 460 * 数字90 461 */ 462 public static final int NINETY = 90; 463 464 /** 465 * 数字60 466 */ 467 public static final int SIXTY = 60; 468 469 /** 470 * 数字180 471 */ 472 public static final int HUNDRED_EIGHTY = 180; 473 474 /** 475 * 数字150 476 */ 477 public static final int HUNDRED_FIFTY = 150; 478 479 /** 480 * 数字800 481 */ 482 public static final int EIGHT_HUNDRED = 800; 483 484 /** 485 * 数字1024 486 */ 487 public static final int THOUSAND_TWENTY_FOUR = 1024; 488 489 /** 490 * 数字0.75f 491 */ 492 public static final float LOAD_FACTOR = 0.75F; 493 494 /** 495 * 数字2f 496 */ 497 public static final float FLOAT_VALUE = 2F; 498 499 /** 500 * 数字3 501 */ 502 public static final int THREE = 3; 503 504 /** 505 * 数字16 506 */ 507 public static final int SIXTEEN = 16; 508 509 /** 510 * 数字1500 511 */ 512 public static final int THOUSAND_FIVE_HUNDRED = 1500; 513 514 /** 515 * 数字31 516 */ 517 public static final int THIRTY_ONE = 31; 518 519 /** 520 * 数字32 521 */ 522 public static final int THIRTY_TWO = 32; 523 524 /** 525 * 数字5 526 */ 527 public static final int FIVE = 5; 528 529 /** 530 * 端口号 531 */ 532 public static final int PORT = 65535; 533 534 /** 535 * 数字50 536 */ 537 public static final int FIFTY = 50; 538 539 /** 540 * 数字32947L 541 */ 542 public static final long NUM_L = 32947L; 543 544 /** 545 * 默认值 546 */ 547 public static final int DEFAULT_NUMBER = 0; 548 549 /** 550 * serialVersionUID 551 */ 552 public static final long SERIALVERSIONUID = -5172589582171358319L; 553 554 /** 555 * 数字2000 556 */ 557 public static final int TWO_THOUSAND = 2000; 558 559 /** 560 * 数字2000 561 */ 562 public static final int EIGHT_NUM = 8; 563 564 /** 565 * 数字1 566 */ 567 public static final int NUM_1 = 1; 568 569 /** 570 * 数字2 571 */ 572 public static final int NUM_2 = 2; 573 574 /** 575 * 数字4 576 */ 577 public static final int NUM_4 = 4; 578 579 /** 580 * description number 581 */ 582 public static final int DESCRIPTION_NUMBER = 430; 583 584 /** 585 * description device connect Type 586 */ 587 public static final String USB = "USB"; 588 589 /** 590 * record native number 50 591 */ 592 public static final int NUM_50 = 50; 593 594 /** 595 * record native number 110 596 */ 597 public static final int NUM_110 = 110; 598 599 /** 600 * record native number 222 601 */ 602 public static final int NUM_222 = 222; 603 604 /** 605 * record native number 142 606 */ 607 public static final int NUM_142 = 142; 608 609 /** 610 * record native number 96 611 */ 612 public static final int NUM_96 = 96; 613 614 /** 615 * record native number 40 616 */ 617 public static final int NUM_40 = 40; 618 619 /** 620 * record native number 20 621 */ 622 public static final int NUM_20 = 20; 623 624 /** 625 * record native left width 626 */ 627 public static final int RECORD_LEFT_PANEL_WIDTH = 56; 628 629 /** 630 * record native left width 631 */ 632 public static final int RECORD_RIGHT_PANEL_WIDTH = 176; 633 634 /** 635 * record native pointX 161 636 */ 637 public static final int RECORD_UP_POINT_NUMBER = 161; 638 639 /** 640 * record native left pointY 641 */ 642 public static final int RECORD_LEFT_POINT_NUMBER = 76; 643 644 /** 645 * native_hook_recording 646 */ 647 public static final String NATIVE_HOOK_RECORDING = "Native Heap Recording"; 648 649 /** 650 * Drop down options trace app calls 651 */ 652 public static final String TRACE_SYSTEM_CALLS = "Trace App Calls"; 653 654 /** 655 * System Trace Recording tips 656 */ 657 public static final String TRACE_SYSTEM_CALLS_TIPS = "System Trace"; 658 659 /** 660 * Drop down options Sample Perf Data 661 */ 662 public static final String SAMPLE_PERF_DATA = "Sample Perf Data"; 663 664 /** 665 * Sample Perf Data Recording tips 666 */ 667 public static final String SAMPLE_PERF_DATA_TIPS = "Sample Perf Data"; 668 669 /** 670 * heap_dump 671 */ 672 public static final String HEAP_DUMP = "Heap Dump"; 673 674 /** 675 * The number of milliseconds in the one-hour time zone 676 */ 677 public static final int ONE_HOURS_MILLISECONDS = 60 * 60 * 1000; 678 679 /** 680 * The number of 200 681 */ 682 public static final int NUM_200 = 200; 683 684 /** 685 * The record table width 686 */ 687 public static final int RECORD_TABLE_WIDTH = 1152; 688 689 /** 690 * The record table height 691 */ 692 public static final int RECORD_TABLE_HEIGHT = 736; 693 694 /** 695 * The record search height 696 */ 697 public static final int RECORD_SEARCH_HEIGHT = 28; 698 699 /** 700 * The record search width 701 */ 702 public static final int RECORD_SEARCH_WIDTH = 230; 703 704 /** 705 * The record combo box width 706 */ 707 public static final int RECORD_COMBO_BOX_WIDTH = 240; 708 709 /** 710 * The record features space 711 */ 712 public static final int RECORD_FEATURES_SPACE = 14; 713 714 /** 715 * The record tabbed height 716 */ 717 public static final int RECORD_FEATURES_HEIGHT = 48; 718 719 /** 720 * The record tabbed border space 721 */ 722 public static final int RECORD_BORDER_SPACE = 54; 723 724 /** 725 * The record tabbed bounds width 726 */ 727 public static final int RECORD_TABBED_BOUNDS_WIDTH = 135; 728 729 /** 730 * The record tabbed bounds point 731 */ 732 public static final int RECORD_TABBED_BOUNDS_POINT = 155; 733 734 /** 735 * The record tabbed border 736 */ 737 public static final int RECORD_TABBED_BORDER = 35; 738 739 /** 740 * The record tabbed title space 741 */ 742 public static final int RECORD_TABBED_TITLE_SPACE = 7; 743 744 /** 745 * The record tabbed height 746 */ 747 public static final int RECORD_TABBED_HEIGHT = 42; 748 749 /** 750 * session list width 751 */ 752 public static final int SESSION_LIST_WIDTH = 210; 753 754 /** 755 * session list height 756 */ 757 public static final int SESSION_LIST_HEIGHT = 60; 758 759 /** 760 * save dialog SAVE_LOCATION width 761 */ 762 public static final int SAVE_LOCATION_WIDTH = 348; 763 764 /** 765 * heap dummp or native hook list width 766 */ 767 public static final int LIST_WIDTH = 240; 768 769 /** 770 * session list DividerLocation width 771 */ 772 public static final int SESSION_LIST_DIVIDER_WIDTH = 220; 773 774 /** 775 * number 12 776 */ 777 public static final int TWELVE = 12; 778 779 /** 780 * jComboBox Filter width 781 */ 782 public static final int ARRAY_WIDTH = 188; 783 784 /** 785 * heap dummp or native hook timelable list width 786 */ 787 public static final int TIMELABLE_XY = 15; 788 789 /** 790 * export dialog component margin left 791 */ 792 public static final int MARGIN_LEFT = 15; 793 794 /** 795 * export file select y 796 */ 797 public static final int FILE_SELECT_Y = 125; 798 799 /** 800 * export file type y 801 */ 802 public static final int FILE_TYPE_Y = 165; 803 804 /** 805 * export file type box y 806 */ 807 public static final int FILE_TYPE_BOX_Y = 200; 808 809 /** 810 * export dialog width 811 */ 812 public static final int DIALOG_WIDTH = 380; 813 814 /** 815 * export dialog height 816 */ 817 public static final int DIALOG_HEIGHT = 260; 818 819 /** 820 * NUM 34 821 */ 822 public static final int NUM_34 = 34; 823 824 /** 825 * NUM 65 826 */ 827 public static final int NUM_65 = 65; 828 829 /** 830 * NUM 650 831 */ 832 public static final int NUM_650 = 650; 833 834 /** 835 * NUM 52 836 */ 837 public static final int NUM_52 = 52; 838 839 /** 840 * Splitter PROPORTION 841 */ 842 public static final float PROPORTION_SEGMENT = 0.6f; 843 844 /** 845 * session list DividerLocation width 846 */ 847 public static final int INSTANCE_LIST_WIDTH = 470; 848 849 /** 850 * number 21 851 */ 852 public static final int TWENTY_ONE = 21; 853 854 /** 855 * number 48 856 */ 857 public static final int FORTY_EIGHT = 48; 858 859 /** 860 * Instance list label height 861 */ 862 public static final int LABEL_HEIGHT = 22; 863 864 /** 865 * CPU grap data kind button , init y coordinate 866 */ 867 public static final int CPU_GRAP_TYPE_Y = 90; 868 869 /** 870 * CPU grap data kind button width 871 */ 872 public static final int CPU_GRAP_TYPE_WIDTH = 200; 873 874 /** 875 * 构造函数 876 */ LayoutConstants()877 private LayoutConstants() { 878 } 879 } 880