/[classpath]/classpath/javax/swing/plaf/BorderUIResource.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/BorderUIResource.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by brawer, Tue Jun 17 08:40:06 2003 UTC revision 1.12 by brawer, Tue Jun 17 09:15:20 2003 UTC
# Line 472  public class BorderUIResource Line 472  public class BorderUIResource
472        super(insets);        super(insets);
473      }      }
474    }    }
475      
476      
477      /**
478       * An {@link javax.swing.border.EtchedBorder} that also implements the
479       * {@link UIResource} marker interface.  This is useful for
480       * implementing pluggable look-and-feels: When switching the current
481       * LookAndFeel, only those borders are replaced that are marked as
482       * {@link UIResource}.  For this reason, a look-and-feel should
483       * always install borders that implement <code>UIResource</code>,
484       * such as the borders provided by this class.
485       *
486       * <p><img src="../border/EtchedBorder-1.png" width="500" height="200"
487       * alt="[An illustration of the two EtchedBorder variants]" />
488       *
489       * @author Brian Jones (cbj@gnu.org)
490       * @author Sascha Brawer (brawer@dandelis.ch)
491       */
492      public static class EtchedBorderUIResource
493        extends EtchedBorder
494        implements UIResource, Serializable
495      {
496      /**      /**
497       * @serial       * Constructs an EtchedBorderUIResource that appears lowered into
498         * the surface. The colors will be derived from the background
499         * color of the enclosed Component when the border gets painted.
500       */       */
501      public static class EtchedBorderUIResource      public EtchedBorderUIResource()
         extends EtchedBorder  
         implements UIResource, Serializable  
502      {      {
503          public EtchedBorderUIResource() { }        super();
         public EtchedBorderUIResource(int etchType)  
         {  
           super (etchType);  
         }  
         public EtchedBorderUIResource(Color highlight, Color shadow)  
         {  
           super (highlight, shadow);  
         }  
         public EtchedBorderUIResource(int etchType, Color highlight,  
                                       Color shadow)  
         {  
           super (etchType, highlight, shadow);  
         }  
   
504      }      }
505        
506        
507      /**      /**
508       * @serial       * Constructs an EtchedBorderUIResource with the specified
509         * appearance. The colors will be derived from the background
510         * color of the enclosed Component when the border gets painted.
511         *
512         * <p><img src="../border/EtchedBorder-1.png" width="500" height="200"
513         * alt="[An illustration of the two EtchedBorder variants]" />
514         *
515         * @param etchType the desired appearance of the border. The value
516         *        must be either {@link javax.swing.border.EtchedBorder#RAISED}
517         *        or {@link javax.swing.border.EtchedBorder#LOWERED}.
518         *
519         * @throws IllegalArgumentException if <code>etchType</code> has
520         *         an unsupported value.
521       */       */
522        public EtchedBorderUIResource(int etchType)
523        {
524          super(etchType);
525        }
526        
527        
528        /**
529         * Constructs a lowered EtchedBorderUIResource, explicitly
530         * selecting the colors that will be used for highlight and
531         * shadow.
532         *
533         * @param highlight the color that will be used for painting
534         *        the highlight part of the border.
535         *
536         * @param shadow the color that will be used for painting
537         *        the shadow part of the border.
538         *
539         * @see #EtchedBorderUIResource(int, Color, Color)
540         */
541        public EtchedBorderUIResource(Color highlight, Color shadow)
542        {
543          super(highlight, shadow);
544        }
545        
546        
547        /**
548         * Constructs an EtchedBorderUIResource with the specified
549         * appearance, explicitly selecting the colors that will be used
550         * for highlight and shadow.
551         *
552         * <p><img src="../border/EtchedBorder-2.png" width="500"
553         * height="200" alt="[An illustration that shows which pixels get
554         * painted in what color]" />
555         *
556         * @param etchType the desired appearance of the border. The value
557         *        must be either {@link javax.swing.border.EtchedBorder#RAISED}
558         *        or {@link javax.swing.border.EtchedBorder#LOWERED}.
559         *
560         * @param highlight the color that will be used for painting
561         *        the highlight part of the border.
562         *
563         * @param shadow the color that will be used for painting
564         *        the shadow part of the border.
565         *
566         * @throws IllegalArgumentException if <code>etchType</code> has
567         *         an unsupported value.
568         */
569        public EtchedBorderUIResource(int etchType,
570                                      Color highlight, Color shadow)
571        {
572          super(etchType, highlight, shadow);
573        }
574      }
575      
576      
577        /**
578         * @serial */
579      public static class LineBorderUIResource      public static class LineBorderUIResource
580          extends LineBorder          extends LineBorder
581          implements UIResource, Serializable          implements UIResource, Serializable

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26