1 20 21 package org.apache.directory.ldapstudio.browser.common.widgets.search; 22 23 24 import java.util.ArrayList ; 25 import java.util.Arrays ; 26 import java.util.List ; 27 28 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils; 29 import org.apache.directory.ldapstudio.browser.common.widgets.BrowserWidget; 30 import org.apache.directory.ldapstudio.browser.common.widgets.WidgetModifyEvent; 31 import org.apache.directory.ldapstudio.browser.common.widgets.WidgetModifyListener; 32 import org.apache.directory.ldapstudio.browser.core.jobs.SearchJob; 33 import org.apache.directory.ldapstudio.browser.core.model.Control; 34 import org.apache.directory.ldapstudio.browser.core.model.DN; 35 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 36 import org.apache.directory.ldapstudio.browser.core.model.ISearch; 37 import org.apache.directory.ldapstudio.browser.core.model.filter.parser.LdapFilterParser; 38 import org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription; 39 import org.apache.directory.ldapstudio.browser.core.model.schema.SchemaUtils; 40 import org.eclipse.swt.events.ModifyEvent; 41 import org.eclipse.swt.events.ModifyListener; 42 import org.eclipse.swt.events.SelectionAdapter; 43 import org.eclipse.swt.events.SelectionEvent; 44 import org.eclipse.swt.events.SelectionListener; 45 import org.eclipse.swt.widgets.Button; 46 import org.eclipse.swt.widgets.Composite; 47 import org.eclipse.swt.widgets.Label; 48 import org.eclipse.swt.widgets.Text; 49 50 51 61 public class SearchPageWrapper extends BrowserWidget 62 { 63 64 65 public static final int NONE = 0; 66 67 68 public static final int NAME_INVISIBLE = 1 << 1; 69 70 71 public static final int NAME_READONLY = 1 << 2; 72 73 74 public static final int CONNECTION_INVISIBLE = 1 << 3; 75 76 77 public static final int CONNECTION_READONLY = 1 << 4; 78 79 80 public static final int SEARCHBASE_INVISIBLE = 1 << 5; 81 82 83 public static final int SEARCHBASE_READONLY = 1 << 6; 84 85 86 public static final int FILTER_INVISIBLE = 1 << 7; 87 88 89 public static final int FILTER_READONLY = 1 << 8; 90 91 92 public static final int RETURNINGATTRIBUTES_INVISIBLE = 1 << 9; 93 94 95 public static final int RETURNINGATTRIBUTES_READONLY = 1 << 10; 96 97 98 public static final int RETURN_DN_VISIBLE = 1 << 11; 99 100 101 public static final int RETURN_DN_CHECKED = 1 << 12; 102 103 104 public static final int RETURN_ALLATTRIBUTES_VISIBLE = 1 << 13; 105 106 107 public static final int RETURN_ALLATTRIBUTES_CHECKED = 1 << 14; 108 109 110 public static final int RETURN_OPERATIONALATTRIBUTES_VISIBLE = 1 << 15; 111 112 113 public static final int RETURN_OPERATIONALATTRIBUTES_CHECKED = 1 << 16; 114 115 116 public static final int OPTIONS_INVISIBLE = 1 << 21; 117 118 119 public static final int SCOPEOPTIONS_READONLY = 1 << 22; 120 121 122 public static final int LIMITOPTIONS_READONLY = 1 << 23; 123 124 125 public static final int ALIASOPTIONS_READONLY = 1 << 24; 126 127 128 public static final int REFERRALOPTIONS_READONLY = 1 << 25; 129 130 131 public static final int CONTROLS_INVISIBLE = 1 << 30; 132 133 134 protected int style; 135 136 137 protected LdapFilterParser parser; 138 139 140 protected Label searchNameLabel; 141 142 143 protected Text searchNameText; 144 145 146 protected Label connectionLabel; 147 148 149 protected ConnectionWidget connectionWidget; 150 151 152 protected Label searchBaseLabel; 153 154 155 protected EntryWidget searchBaseWidget; 156 157 158 protected Label filterLabel; 159 160 161 protected FilterWidget filterWidget; 162 163 164 protected Label returningAttributesLabel; 165 166 167 protected ReturningAttributesWidget returningAttributesWidget; 168 169 170 protected Button returnDnButton; 171 172 173 protected Button returnAllAttributesButton; 174 175 176 protected Button returnOperationalAttributesButton; 177 178 179 protected ScopeWidget scopeWidget; 180 181 182 protected LimitWidget limitWidget; 183 184 185 protected AliasesDereferencingWidget aliasesDereferencingWidget; 186 187 188 protected ReferralsHandlingWidget referralsHandlingWidget; 189 190 191 protected Label controlLabel; 192 193 194 protected Button subentriesControlButton; 195 196 197 202 public SearchPageWrapper( int style ) 203 { 204 this.parser = new LdapFilterParser(); 205 this.style = style; 206 } 207 208 209 214 public void createContents( final Composite composite ) 215 { 216 createSearchNameLine( composite ); 218 219 createConnectionLine( composite ); 221 222 createSearchBaseLine( composite ); 224 225 createFilterLine( composite ); 227 228 createReturningAttributesLine( composite ); 230 231 createControlComposite( composite ); 233 234 createOptionsComposite( composite ); 236 } 237 238 239 246 protected boolean isActive( int requiredStyle ) 247 { 248 return ( style & requiredStyle ) != 0; 249 } 250 251 252 257 protected void createSearchNameLine( final Composite composite ) 258 { 259 if ( isActive( NAME_INVISIBLE ) ) 260 { 261 return; 262 } 263 264 searchNameLabel = BaseWidgetUtils.createLabel( composite, "Search Name:", 1 ); 265 if ( isActive( NAME_READONLY ) ) 266 { 267 searchNameText = BaseWidgetUtils.createReadonlyText( composite, "", 2 ); 268 } 269 else 270 { 271 searchNameText = BaseWidgetUtils.createText( composite, "", 2 ); 272 } 273 searchNameText.addModifyListener( new ModifyListener() 274 { 275 public void modifyText( ModifyEvent e ) 276 { 277 validate(); 278 } 279 } ); 280 281 BaseWidgetUtils.createSpacer( composite, 3 ); 282 } 283 284 285 290 protected void createConnectionLine( final Composite composite ) 291 { 292 if ( isActive( CONNECTION_INVISIBLE ) ) 293 { 294 return; 295 } 296 297 connectionLabel = BaseWidgetUtils.createLabel( composite, "Connection:", 1 ); 298 connectionWidget = new ConnectionWidget(); 299 connectionWidget.createWidget( composite ); 300 connectionWidget.setEnabled( !isActive( CONNECTION_READONLY ) ); 301 connectionWidget.addWidgetModifyListener( new WidgetModifyListener() 302 { 303 public void widgetModified( WidgetModifyEvent event ) 304 { 305 validate(); 306 } 307 } ); 308 BaseWidgetUtils.createSpacer( composite, 3 ); 309 } 310 311 312 317 protected void createSearchBaseLine( final Composite composite ) 318 { 319 if ( isActive( SEARCHBASE_INVISIBLE ) ) 320 { 321 return; 322 } 323 324 searchBaseLabel = BaseWidgetUtils.createLabel( composite, "Search Base:", 1 ); 325 searchBaseWidget = new EntryWidget(); 326 searchBaseWidget.createWidget( composite ); 327 searchBaseWidget.setEnabled( !isActive( SEARCHBASE_READONLY ) ); 328 searchBaseWidget.addWidgetModifyListener( new WidgetModifyListener() 329 { 330 public void widgetModified( WidgetModifyEvent event ) 331 { 332 validate(); 333 } 334 } ); 335 BaseWidgetUtils.createSpacer( composite, 3 ); 336 } 337 338 339 344 protected void createFilterLine( final Composite composite ) 345 { 346 if ( isActive( FILTER_INVISIBLE ) ) 347 { 348 return; 349 } 350 351 filterLabel = BaseWidgetUtils.createLabel( composite, "Filter:", 1 ); 352 filterWidget = new FilterWidget(); 353 filterWidget.createWidget( composite ); 354 filterWidget.setEnabled( !isActive( FILTER_READONLY ) ); 355 filterWidget.addWidgetModifyListener( new WidgetModifyListener() 356 { 357 public void widgetModified( WidgetModifyEvent event ) 358 { 359 validate(); 360 } 361 } ); 362 BaseWidgetUtils.createSpacer( composite, 3 ); 363 } 364 365 366 371 protected void createReturningAttributesLine( final Composite composite ) 372 { 373 if ( isActive( RETURNINGATTRIBUTES_INVISIBLE ) ) 374 { 375 return; 376 } 377 378 BaseWidgetUtils.createLabel( composite, "Returning Attributes:", 1 ); 379 Composite retComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 2 ); 380 returningAttributesWidget = new ReturningAttributesWidget(); 381 returningAttributesWidget.createWidget( retComposite ); 382 returningAttributesWidget.setEnabled( !isActive( RETURNINGATTRIBUTES_READONLY ) ); 383 returningAttributesWidget.addWidgetModifyListener( new WidgetModifyListener() 384 { 385 public void widgetModified( WidgetModifyEvent event ) 386 { 387 validate(); 388 } 389 } ); 390 391 if ( isActive( RETURN_DN_VISIBLE ) || isActive( RETURN_ALLATTRIBUTES_VISIBLE ) 393 || isActive( RETURN_OPERATIONALATTRIBUTES_VISIBLE ) ) 394 { 395 BaseWidgetUtils.createSpacer( composite, 1 ); 396 Composite buttonComposite = BaseWidgetUtils.createColumnContainer( composite, 3, 1 ); 397 if ( isActive( RETURN_DN_VISIBLE ) ) 398 { 399 returnDnButton = BaseWidgetUtils.createCheckbox( buttonComposite, "Export DN", 1 ); 400 returnDnButton.addSelectionListener( new SelectionAdapter() 401 { 402 public void widgetSelected( SelectionEvent e ) 403 { 404 validate(); 405 } 406 } ); 407 returnDnButton.setSelection( isActive( RETURN_DN_CHECKED ) ); 408 } 409 if ( isActive( RETURN_ALLATTRIBUTES_VISIBLE ) ) 410 { 411 returnAllAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite, "All user attributes", 1 ); 412 returnAllAttributesButton.addSelectionListener( new SelectionAdapter() 413 { 414 public void widgetSelected( SelectionEvent e ) 415 { 416 validate(); 417 } 418 } ); 419 returnAllAttributesButton.setSelection( isActive( RETURN_ALLATTRIBUTES_CHECKED ) ); 420 } 421 if ( isActive( RETURN_OPERATIONALATTRIBUTES_VISIBLE ) ) 422 { 423 returnOperationalAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite, 424 "Operational attributes", 1 ); 425 returnOperationalAttributesButton.addSelectionListener( new SelectionAdapter() 426 { 427 public void widgetSelected( SelectionEvent e ) 428 { 429 validate(); 430 } 431 } ); 432 returnOperationalAttributesButton.setSelection( isActive( RETURN_OPERATIONALATTRIBUTES_CHECKED ) ); 433 } 434 } 435 436 BaseWidgetUtils.createSpacer( composite, 3 ); 437 } 438 439 440 446 protected void createOptionsComposite( final Composite composite ) 447 { 448 if ( isActive( OPTIONS_INVISIBLE ) ) 449 { 450 return; 451 } 452 453 Composite optionsComposite = BaseWidgetUtils.createColumnContainer( composite, 2, 3 ); 454 455 scopeWidget = new ScopeWidget(); 456 scopeWidget.createWidget( optionsComposite ); 457 scopeWidget.setEnabled( !isActive( SCOPEOPTIONS_READONLY ) ); 458 scopeWidget.addWidgetModifyListener( new WidgetModifyListener() 459 { 460 public void widgetModified( WidgetModifyEvent event ) 461 { 462 validate(); 463 } 464 } ); 465 466 limitWidget = new LimitWidget(); 467 limitWidget.createWidget( optionsComposite ); 468 limitWidget.setEnabled( !isActive( LIMITOPTIONS_READONLY ) ); 469 limitWidget.addWidgetModifyListener( new WidgetModifyListener() 470 { 471 public void widgetModified( WidgetModifyEvent event ) 472 { 473 validate(); 474 } 475 } ); 476 477 aliasesDereferencingWidget = new AliasesDereferencingWidget(); 478 aliasesDereferencingWidget.createWidget( optionsComposite ); 479 aliasesDereferencingWidget.setEnabled( !isActive( ALIASOPTIONS_READONLY ) ); 480 aliasesDereferencingWidget.addWidgetModifyListener( new WidgetModifyListener() 481 { 482 public void widgetModified( WidgetModifyEvent event ) 483 { 484 validate(); 485 } 486 } ); 487 488 referralsHandlingWidget = new ReferralsHandlingWidget(); 489 referralsHandlingWidget.createWidget( optionsComposite ); 490 referralsHandlingWidget.setEnabled( !isActive( REFERRALOPTIONS_READONLY ) ); 491 referralsHandlingWidget.addWidgetModifyListener( new WidgetModifyListener() 492 { 493 public void widgetModified( WidgetModifyEvent event ) 494 { 495 validate(); 496 } 497 } ); 498 } 499 500 501 506 protected void createControlComposite( final Composite composite ) 507 { 508 if ( isActive( CONTROLS_INVISIBLE ) ) 509 { 510 return; 511 } 512 513 controlLabel = BaseWidgetUtils.createLabel( composite, "Controls:", 1 ); 514 515 subentriesControlButton = BaseWidgetUtils.createCheckbox( composite, Control.SUBENTRIES_CONTROL.getName(), 2 ); 516 subentriesControlButton.addSelectionListener( new SelectionListener() 517 { 518 public void widgetDefaultSelected( SelectionEvent e ) 519 { 520 } 521 522 523 public void widgetSelected( SelectionEvent e ) 524 { 525 validate(); 526 } 527 } ); 528 } 529 530 531 534 protected void validate() 535 { 536 537 if ( connectionWidget.getConnection() != null ) 538 { 539 if ( searchBaseWidget.getDn() == null 540 || searchBaseWidget.getConnection() != connectionWidget.getConnection() ) 541 { 542 searchBaseWidget.setInput( connectionWidget.getConnection(), null ); 543 } 544 } 545 546 filterWidget.setConnection( connectionWidget.getConnection() ); 547 548 super.notifyListeners(); 549 } 550 551 552 557 public boolean isReturnDn() 558 { 559 return returnDnButton != null && returnDnButton.getSelection(); 560 } 561 562 563 568 public void loadFromSearch( ISearch search ) 569 { 570 if ( searchNameText != null ) 571 { 572 searchNameText.setText( search.getName() ); 573 } 574 575 if ( search.getConnection() != null ) 576 { 577 IConnection connection = search.getConnection(); 578 DN searchBase = search.getSearchBase(); 579 580 if ( connectionWidget != null ) 581 { 582 connectionWidget.setConnection( connection ); 583 } 584 585 if ( searchBase != null ) 586 { 587 searchBaseWidget.setInput( connection, searchBase ); 588 } 589 590 if ( filterWidget != null ) 591 { 592 filterWidget.setConnection( connection ); 593 filterWidget.setFilter( search.getFilter() ); 594 } 595 596 if ( returningAttributesWidget != null ) 597 { 598 returningAttributesWidget.setConnection( connection ); 599 returningAttributesWidget.setInitialReturningAttributes( search.getReturningAttributes() ); 600 } 601 602 if ( scopeWidget != null ) 603 { 604 scopeWidget.setScope( search.getScope() ); 605 } 606 if ( limitWidget != null ) 607 { 608 limitWidget.setCountLimit( search.getCountLimit() ); 609 limitWidget.setTimeLimit( search.getTimeLimit() ); 610 } 611 if ( aliasesDereferencingWidget != null ) 612 { 613 aliasesDereferencingWidget.setAliasesDereferencingMethod( search.getAliasesDereferencingMethod() ); 614 } 615 if ( referralsHandlingWidget != null ) 616 { 617 referralsHandlingWidget.setReferralsHandlingMethod( search.getReferralsHandlingMethod() ); 618 } 619 if ( subentriesControlButton != null ) 620 { 621 Control[] searchControls = search.getControls(); 622 if ( searchControls != null && searchControls.length > 0 ) 623 { 624 for ( int i = 0; i < searchControls.length; i++ ) 625 { 626 Control c = searchControls[i]; 627 if ( Control.SUBENTRIES_CONTROL.equals( c ) ) 628 { 629 subentriesControlButton.setSelection( true ); 630 } 631 } 632 } 633 } 634 } 635 } 636 637 638 645 public boolean saveToSearch( ISearch search ) 646 { 647 boolean searchModified = false; 648 649 if ( searchNameText != null && !searchNameText.getText().equals( search.getName() ) ) 650 { 651 search.getSearchParameter().setName( searchNameText.getText() ); 652 searchModified = true; 653 } 654 if ( connectionWidget != null && connectionWidget.getConnection() != null 655 && connectionWidget.getConnection() != search.getConnection() ) 656 { 657 search.setConnection( connectionWidget.getConnection() ); 658 searchModified = true; 659 } 660 if ( searchBaseWidget != null && searchBaseWidget.getDn() != null 661 && !searchBaseWidget.getDn().equals( search.getSearchBase() ) ) 662 { 663 search.getSearchParameter().setSearchBase( searchBaseWidget.getDn() ); 664 searchModified = true; 665 searchBaseWidget.saveDialogSettings(); 666 } 667 if ( filterWidget != null ) 668 { 669 parser.parse( filterWidget.getFilter() ); 670 if ( !parser.getModel().toString().equals( search.getFilter() ) ) 671 { 672 search.getSearchParameter().setFilter( parser.getModel().toString() ); 673 searchModified = true; 674 } 675 filterWidget.saveDialogSettings(); 676 } 677 678 if ( returningAttributesWidget != null ) 679 { 680 if ( !Arrays.equals( returningAttributesWidget.getReturningAttributes(), search.getReturningAttributes() ) ) 681 { 682 search.getSearchParameter().setReturningAttributes( returningAttributesWidget.getReturningAttributes() ); 683 searchModified = true; 684 } 685 returningAttributesWidget.saveDialogSettings(); 686 687 if ( returnAllAttributesButton != null || returnOperationalAttributesButton != null ) 688 { 689 List <String > raList = new ArrayList <String >(); 690 raList.addAll( Arrays.asList( search.getReturningAttributes() ) ); 691 if ( returnAllAttributesButton != null ) 692 { 693 if ( returnAllAttributesButton.getSelection() ) 694 { 695 raList.add( ISearch.ALL_USER_ATTRIBUTES ); 696 } 697 if ( returnAllAttributesButton.getSelection() != isActive( RETURN_ALLATTRIBUTES_CHECKED ) ) 698 { 699 searchModified = true; 700 } 701 } 702 if ( returnOperationalAttributesButton != null ) 703 { 704 if ( returnOperationalAttributesButton.getSelection() ) 705 { 706 AttributeTypeDescription[] opAtds = SchemaUtils 707 .getOperationalAttributeDescriptions( connectionWidget.getConnection().getSchema() ); 708 String [] attributeTypeDescriptionNames = SchemaUtils.getAttributeTypeDescriptionNames( opAtds ); 709 raList.addAll( Arrays.asList( attributeTypeDescriptionNames ) ); 710 raList.add( ISearch.ALL_OPERATIONAL_ATTRIBUTES ); 711 } 712 if ( returnOperationalAttributesButton.getSelection() != isActive( RETURN_OPERATIONALATTRIBUTES_CHECKED ) ) 713 { 714 searchModified = true; 715 } 716 } 717 String [] returningAttributes = raList.toArray( new String [raList.size()] ); 718 search.getSearchParameter().setReturningAttributes( returningAttributes ); 719 } 720 } 721 722 if ( scopeWidget != null ) 723 { 724 int scope = scopeWidget.getScope();; 725 if ( scope != search.getScope() ) 726 { 727 search.getSearchParameter().setScope( scope ); 728 searchModified = true; 729 } 730 } 731 if ( limitWidget != null ) 732 { 733 int countLimit = limitWidget.getCountLimit(); 734 int timeLimit = limitWidget.getTimeLimit(); 735 if ( countLimit != search.getCountLimit() ) 736 { 737 search.getSearchParameter().setCountLimit( countLimit ); 738 searchModified = true; 739 } 740 if ( timeLimit != search.getTimeLimit() ) 741 { 742 search.getSearchParameter().setTimeLimit( timeLimit ); 743 searchModified = true; 744 } 745 } 746 if ( aliasesDereferencingWidget != null ) 747 { 748 int aliasesDereferencingMethod = aliasesDereferencingWidget.getAliasesDereferencingMethod(); 749 if ( aliasesDereferencingMethod != search.getAliasesDereferencingMethod() ) 750 { 751 search.getSearchParameter().setAliasesDereferencingMethod( aliasesDereferencingMethod ); 752 searchModified = true; 753 } 754 } 755 if ( referralsHandlingWidget != null ) 756 { 757 int referralsHandlingMethod = referralsHandlingWidget.getReferralsHandlingMethod(); 758 if ( referralsHandlingMethod != search.getReferralsHandlingMethod() ) 759 { 760 search.getSearchParameter().setReferralsHandlingMethod( referralsHandlingMethod ); 761 searchModified = true; 762 } 763 } 764 if ( subentriesControlButton != null ) 765 { 766 Control selectedSubControl = subentriesControlButton.getSelection() ? Control.SUBENTRIES_CONTROL : null; 767 Control searchSubentriesControl = null; 768 Control[] searchControls = search.getControls(); 769 if ( searchControls != null && searchControls.length > 0 ) 770 { 771 for ( int i = 0; i < searchControls.length; i++ ) 772 { 773 Control c = searchControls[i]; 774 if ( Control.SUBENTRIES_CONTROL.equals( c ) ) 775 { 776 searchSubentriesControl = Control.SUBENTRIES_CONTROL; 777 break; 778 } 779 } 780 } 781 if ( selectedSubControl != searchSubentriesControl ) 782 { 783 if ( selectedSubControl == null ) 784 { 785 search.getSearchParameter().setControls( null ); 786 } 787 else 788 { 789 search.getSearchParameter().setControls( new Control[] 790 { selectedSubControl } ); 791 } 792 searchModified = true; 793 } 794 795 } 796 797 return searchModified; 798 } 799 800 801 808 public boolean performSearch( final ISearch search ) 809 { 810 if ( search.getConnection() != null ) 811 { 812 new SearchJob( new ISearch[] 813 { search } ).execute(); 814 return true; 815 } 816 else 817 { 818 return false; 819 } 820 } 821 822 823 828 public boolean isValid() 829 { 830 if ( connectionWidget != null && connectionWidget.getConnection() == null ) 831 { 832 return false; 833 } 834 if ( searchBaseWidget != null && searchBaseWidget.getDn() == null ) 835 { 836 return false; 837 } 838 if ( searchNameText != null && "".equals( searchNameText.getText() ) ) 839 { 840 return false; 841 } 842 if ( filterWidget != null && "".equals( filterWidget.getFilter() ) ) 843 { 844 return false; 845 } 846 847 return true; 848 } 849 850 851 856 public void setEnabled( boolean b ) 857 { 858 if ( searchNameText != null ) 859 { 860 searchNameLabel.setEnabled( b ); 861 searchNameText.setEnabled( b ); 862 } 863 if ( connectionWidget != null ) 864 { 865 connectionLabel.setEnabled( b ); 866 connectionWidget.setEnabled( b && !isActive( CONNECTION_READONLY ) ); 867 } 868 if ( searchBaseWidget != null ) 869 { 870 searchBaseLabel.setEnabled( b ); 871 searchBaseWidget.setEnabled( b && !isActive( SEARCHBASE_READONLY ) ); 872 } 873 if ( filterWidget != null ) 874 { 875 filterLabel.setEnabled( b ); 876 filterWidget.setEnabled( b && !isActive( FILTER_READONLY ) ); 877 } 878 if ( returningAttributesWidget != null ) 879 { 880 returningAttributesLabel.setEnabled( b ); 881 returningAttributesWidget.setEnabled( b && !isActive( RETURNINGATTRIBUTES_READONLY ) ); 882 } 883 if ( returnDnButton != null ) 884 { 885 returnDnButton.setEnabled( b ); 886 } 887 if ( returnAllAttributesButton != null ) 888 { 889 returnAllAttributesButton.setEnabled( b ); 890 } 891 if ( returnOperationalAttributesButton != null ) 892 { 893 returnOperationalAttributesButton.setEnabled( b ); 894 } 895 if ( scopeWidget != null ) 896 { 897 scopeWidget.setEnabled( b && !isActive( SCOPEOPTIONS_READONLY ) ); 898 } 899 if ( limitWidget != null ) 900 { 901 limitWidget.setEnabled( b && !isActive( LIMITOPTIONS_READONLY ) ); 902 } 903 if ( aliasesDereferencingWidget != null ) 904 { 905 aliasesDereferencingWidget.setEnabled( b && !isActive( ALIASOPTIONS_READONLY ) ); 906 } 907 if ( referralsHandlingWidget != null ) 908 { 909 referralsHandlingWidget.setEnabled( b && !isActive( REFERRALOPTIONS_READONLY ) ); 910 } 911 if ( controlLabel != null ) 912 { 913 controlLabel.setEnabled( b ); 914 subentriesControlButton.setEnabled( b ); 915 } 916 } 917 918 } 919 | Popular Tags |