< prev index next >

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

Print this page




 163     public String getUIClassID() {
 164         return uiClassID;
 165     }
 166 
 167 
 168     /**
 169      * See readObject() and writeObject() in JComponent for more
 170      * information about serialization in Swing.
 171      */
 172     private void writeObject(ObjectOutputStream s) throws IOException {
 173         s.defaultWriteObject();
 174         if (getUIClassID().equals(uiClassID)) {
 175             byte count = JComponent.getWriteObjCounter(this);
 176             JComponent.setWriteObjCounter(this, --count);
 177             if (count == 0 && ui != null) {
 178                 ui.installUI(this);
 179             }
 180         }
 181     }
 182 











 183 
 184     /**
 185      * Returns a string representation of this JPanel. This method
 186      * is intended to be used only for debugging purposes, and the
 187      * content and format of the returned string may vary between
 188      * implementations. The returned string may be empty but may not
 189      * be <code>null</code>.
 190      *
 191      * @return  a string representation of this JPanel.
 192      */
 193     protected String paramString() {
 194         return super.paramString();
 195     }
 196 
 197 /////////////////
 198 // Accessibility support
 199 ////////////////
 200 
 201     /**
 202      * Gets the AccessibleContext associated with this JPanel.




 163     public String getUIClassID() {
 164         return uiClassID;
 165     }
 166 
 167 
 168     /**
 169      * See readObject() and writeObject() in JComponent for more
 170      * information about serialization in Swing.
 171      */
 172     private void writeObject(ObjectOutputStream s) throws IOException {
 173         s.defaultWriteObject();
 174         if (getUIClassID().equals(uiClassID)) {
 175             byte count = JComponent.getWriteObjCounter(this);
 176             JComponent.setWriteObjCounter(this, --count);
 177             if (count == 0 && ui != null) {
 178                 ui.installUI(this);
 179             }
 180         }
 181     }
 182 
 183     /**
 184      * Only for Linux System, try to sync repaint method to correct for the
 185      * moment bug JDK-8178091. The bug is only on Linux ,so in other os it uses
 186      * asyncrone repaint()
 187      */
 188     public void repaint() {
 189         super.repaint();
 190         if (System.getProperty("os.name").equals("Linux")) {
 191             Toolkit.getDefaultToolkit().sync();
 192         }
 193     }
 194 
 195     /**
 196      * Returns a string representation of this JPanel. This method
 197      * is intended to be used only for debugging purposes, and the
 198      * content and format of the returned string may vary between
 199      * implementations. The returned string may be empty but may not
 200      * be <code>null</code>.
 201      *
 202      * @return  a string representation of this JPanel.
 203      */
 204     protected String paramString() {
 205         return super.paramString();
 206     }
 207 
 208 /////////////////
 209 // Accessibility support
 210 ////////////////
 211 
 212     /**
 213      * Gets the AccessibleContext associated with this JPanel.


< prev index next >