src/java.desktop/share/classes/javax/swing/JColorChooser.java

Print this page
rev 10525 : 8038277: Improve the bootstrap performance of cacerts keystore (client)
Contributed-by: Otavio Santana <otaviojava@java.net>


 526             byte count = JComponent.getWriteObjCounter(this);
 527             JComponent.setWriteObjCounter(this, --count);
 528             if (count == 0 && ui != null) {
 529                 ui.installUI(this);
 530             }
 531         }
 532     }
 533 
 534 
 535     /**
 536      * Returns a string representation of this <code>JColorChooser</code>.
 537      * This method
 538      * is intended to be used only for debugging purposes, and the
 539      * content and format of the returned string may vary between
 540      * implementations. The returned string may be empty but may not
 541      * be <code>null</code>.
 542      *
 543      * @return  a string representation of this <code>JColorChooser</code>
 544      */
 545     protected String paramString() {
 546         StringBuilder chooserPanelsString = new StringBuilder("");
 547         for (int i=0; i<chooserPanels.length; i++) {
 548             chooserPanelsString.append("[" + chooserPanels[i].toString()
 549                                        + "]");
 550         }
 551         String previewPanelString = (previewPanel != null ?
 552                                      previewPanel.toString() : "");
 553 
 554         return super.paramString() +
 555         ",chooserPanels=" + chooserPanelsString.toString() +
 556         ",previewPanel=" + previewPanelString;
 557     }
 558 
 559 /////////////////
 560 // Accessibility support
 561 ////////////////
 562 
 563     protected AccessibleContext accessibleContext = null;
 564 
 565     /**
 566      * Gets the AccessibleContext associated with this JColorChooser.
 567      * For color choosers, the AccessibleContext takes the form of an
 568      * AccessibleJColorChooser.
 569      * A new AccessibleJColorChooser instance is created if necessary.
 570      *
 571      * @return an AccessibleJColorChooser that serves as the
 572      *         AccessibleContext of this JColorChooser
 573      */
 574     public AccessibleContext getAccessibleContext() {
 575         if (accessibleContext == null) {
 576             accessibleContext = new AccessibleJColorChooser();




 526             byte count = JComponent.getWriteObjCounter(this);
 527             JComponent.setWriteObjCounter(this, --count);
 528             if (count == 0 && ui != null) {
 529                 ui.installUI(this);
 530             }
 531         }
 532     }
 533 
 534 
 535     /**
 536      * Returns a string representation of this <code>JColorChooser</code>.
 537      * This method
 538      * is intended to be used only for debugging purposes, and the
 539      * content and format of the returned string may vary between
 540      * implementations. The returned string may be empty but may not
 541      * be <code>null</code>.
 542      *
 543      * @return  a string representation of this <code>JColorChooser</code>
 544      */
 545     protected String paramString() {
 546         StringBuilder chooserPanelsString = new StringBuilder();
 547         for (AbstractColorChooserPanel panel : chooserPanels) {
 548             chooserPanelsString.append('[').append(panel.toString())
 549                     .append(']');
 550         }
 551         String previewPanelString = (previewPanel != null ? previewPanel
 552                 .toString() : "");
 553 
 554         return super.paramString() + ",chooserPanels="
 555                 + chooserPanelsString.toString() + ",previewPanel="
 556                 + previewPanelString;
 557     }
 558 
 559 /////////////////
 560 // Accessibility support
 561 ////////////////
 562 
 563     protected AccessibleContext accessibleContext = null;
 564 
 565     /**
 566      * Gets the AccessibleContext associated with this JColorChooser.
 567      * For color choosers, the AccessibleContext takes the form of an
 568      * AccessibleJColorChooser.
 569      * A new AccessibleJColorChooser instance is created if necessary.
 570      *
 571      * @return an AccessibleJColorChooser that serves as the
 572      *         AccessibleContext of this JColorChooser
 573      */
 574     public AccessibleContext getAccessibleContext() {
 575         if (accessibleContext == null) {
 576             accessibleContext = new AccessibleJColorChooser();