jdk/src/share/classes/javax/swing/text/rtf/RTFAttributes.java
changeset 438 2ae294e4518c
parent 2 90ce3da70b43
child 1287 a04aca99c77a
child 715 f16baef3a20e
equal deleted inserted replaced
437:101b84dce5da 438:2ae294e4518c
   279         }
   279         }
   280 
   280 
   281         public AssertiveAttribute(int d, Object s, String r, int v)
   281         public AssertiveAttribute(int d, Object s, String r, int v)
   282         {
   282         {
   283             super(d, s, r);
   283             super(d, s, r);
   284             swingValue = new Integer(v);
   284             swingValue = Integer.valueOf(v);
   285         }
   285         }
   286 
   286 
   287         public boolean set(MutableAttributeSet target)
   287         public boolean set(MutableAttributeSet target)
   288         {
   288         {
   289             if (swingValue == null)
   289             if (swingValue == null)
   341         }
   341         }
   342 
   342 
   343         public NumericAttribute(int d, Object s,
   343         public NumericAttribute(int d, Object s,
   344                                 String r, int ds, int dr)
   344                                 String r, int ds, int dr)
   345         {
   345         {
   346             this(d, s, r, new Integer(ds), dr, 1f);
   346             this(d, s, r, Integer.valueOf(ds), dr, 1f);
   347         }
   347         }
   348 
   348 
   349         public NumericAttribute(int d, Object s,
   349         public NumericAttribute(int d, Object s,
   350                                 String r, Number ds, int dr, float sc)
   350                                 String r, Number ds, int dr, float sc)
   351         {
   351         {
   375         public boolean set(MutableAttributeSet target, int parameter)
   375         public boolean set(MutableAttributeSet target, int parameter)
   376         {
   376         {
   377             Number swingValue;
   377             Number swingValue;
   378 
   378 
   379             if (scale == 1f)
   379             if (scale == 1f)
   380                 swingValue = new Integer(parameter);
   380                 swingValue = Integer.valueOf(parameter);
   381             else
   381             else
   382                 swingValue = new Float(parameter / scale);
   382                 swingValue = new Float(parameter / scale);
   383             target.addAttribute(swingName, swingValue);
   383             target.addAttribute(swingName, swingValue);
   384             return true;
   384             return true;
   385         }
   385         }