< prev index next >

src/java.desktop/share/classes/sun/swing/plaf/synth/SynthIcon.java

Print this page




  81                                    int y, int w, int h);
  82 
  83     /**
  84      * Returns the desired width of the Icon.
  85      *
  86      * @param context SynthContext requesting the Icon, may be null.
  87      * @return Desired width of the icon.
  88      */
  89     public abstract int getIconWidth(SynthContext context);
  90 
  91     /**
  92      * Returns the desired height of the Icon.
  93      *
  94      * @param context SynthContext requesting the Icon, may be null.
  95      * @return Desired height of the icon.
  96      */
  97     public abstract int getIconHeight(SynthContext context);
  98 
  99     /**
 100      * Paints the icon. This is a cover method for
 101      * <code>paintIcon(null, g, x, y, 0, 0)</code>
 102      */
 103     public void paintIcon(Component c, Graphics g, int x, int y) {
 104         paintIcon(null, g, x, y, 0, 0);
 105     }
 106 
 107     /**
 108      * Returns the icon's width. This is a cover methods for
 109      * <code>getIconWidth(null)</code>.
 110      *
 111      * @return an int specifying the fixed width of the icon.
 112      */
 113     public int getIconWidth() {
 114         return getIconWidth(null);
 115     }
 116 
 117     /**
 118      * Returns the icon's height. This is a cover method for
 119      * <code>getIconHeight(null)</code>.
 120      *
 121      * @return an int specifying the fixed height of the icon.
 122      */
 123     public int getIconHeight() {
 124         return getIconHeight(null);
 125     }
 126 }


  81                                    int y, int w, int h);
  82 
  83     /**
  84      * Returns the desired width of the Icon.
  85      *
  86      * @param context SynthContext requesting the Icon, may be null.
  87      * @return Desired width of the icon.
  88      */
  89     public abstract int getIconWidth(SynthContext context);
  90 
  91     /**
  92      * Returns the desired height of the Icon.
  93      *
  94      * @param context SynthContext requesting the Icon, may be null.
  95      * @return Desired height of the icon.
  96      */
  97     public abstract int getIconHeight(SynthContext context);
  98 
  99     /**
 100      * Paints the icon. This is a cover method for
 101      * {@code paintIcon(null, g, x, y, 0, 0)}
 102      */
 103     public void paintIcon(Component c, Graphics g, int x, int y) {
 104         paintIcon(null, g, x, y, 0, 0);
 105     }
 106 
 107     /**
 108      * Returns the icon's width. This is a cover methods for
 109      * {@code getIconWidth(null)}.
 110      *
 111      * @return an int specifying the fixed width of the icon.
 112      */
 113     public int getIconWidth() {
 114         return getIconWidth(null);
 115     }
 116 
 117     /**
 118      * Returns the icon's height. This is a cover method for
 119      * {@code getIconHeight(null)}.
 120      *
 121      * @return an int specifying the fixed height of the icon.
 122      */
 123     public int getIconHeight() {
 124         return getIconHeight(null);
 125     }
 126 }
< prev index next >