net.yura.android.plaf
Class AndroidBorder

java.lang.Object
  extended by net.yura.android.plaf.AndroidBorder
All Implemented Interfaces:
Border

public class AndroidBorder
extends Object
implements Border


Constructor Summary
AndroidBorder(Drawable d)
           
AndroidBorder(Drawable d, Rect extraPadding)
           
 
Method Summary
 int getBottom()
           
(package private) static int[] getDrawableState(int state, Class<?> cclass, boolean windowFocused)
           
 int getLeft()
           
 int getRight()
           
 int getTop()
           
 boolean isBorderOpaque()
           
 void paintBorder(Component c, Graphics2D g, int width, int height)
           
(package private) static void setDrawableState(Component comp, Drawable drawable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndroidBorder

public AndroidBorder(Drawable d)

AndroidBorder

public AndroidBorder(Drawable d,
                     Rect extraPadding)
Method Detail

getBottom

public int getBottom()
Specified by:
getBottom in interface Border
See Also:
Border.getBorderInsets

getDrawableState

static int[] getDrawableState(int state,
                              Class<?> cclass,
                              boolean windowFocused)

getLeft

public int getLeft()
Specified by:
getLeft in interface Border
See Also:
Border.getBorderInsets

getRight

public int getRight()
Specified by:
getRight in interface Border
See Also:
Border.getBorderInsets

getTop

public int getTop()
Specified by:
getTop in interface Border
See Also:
Border.getBorderInsets

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border
Returns:
Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.
See Also:
Border.isBorderOpaque

paintBorder

public void paintBorder(Component c,
                        Graphics2D g,
                        int width,
                        int height)
Specified by:
paintBorder in interface Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
width - the width of the painted border
height - the height of the painted border
See Also:
Border.paintBorder

setDrawableState

static void setDrawableState(Component comp,
                             Drawable drawable)