com.togethersoft.openapi.util.ui
Class ThreeStateChechBox.ThreeStateCheckboxIcon


private class ThreeStateChechBox.ThreeStateCheckboxIcon
implements Icon, Serializable, UIResource

Class used for painting chekbox icons in different states


Method Summary
 protected voiddrawCheck(Component c, Graphics g, int x, int y)
          Draws check used in checkboxes icons depending on check type.
 protected voiddrawFlush3DBorder(Graphics g, int x, int y, int w, int h)
          This draws the "Flush 3D Border" which is used throughout the Metal L&F
 protected voiddrawPressed3DBorder(Graphics g, int x, int y, int w, int h)
          This draws a variant "Flush 3D Border"
It is used for things like pressed buttons.
 protected intgetControlSize()
          Returnes checkbox size.
 intgetIconHeight()
          Returns Icon height
 intgetIconWidth()
          Returns Icon width
 voidpaintIcon(Component c, Graphics g, int x, int y)
          Paints icon for a check box depending on its state

Method Detail

drawCheck

protected void drawCheck(Component c, Graphics g, int x, int y)
Draws check used in checkboxes icons depending on check type. If the checkbox
checktype is misdefined ThreeStateChechBox.NORMAL_CHECK_TYPE type is used

drawFlush3DBorder

protected void drawFlush3DBorder(Graphics g, int x, int y, int w, int h)
This draws the "Flush 3D Border" which is used throughout the Metal L&F

drawPressed3DBorder

protected void drawPressed3DBorder(Graphics g, int x, int y, int w, int h)
This draws a variant "Flush 3D Border"
It is used for things like pressed buttons.

getControlSize

protected int getControlSize()
Returnes checkbox size. In current implementation always returns 13.

getIconHeight

public int getIconHeight()
Returns Icon height

getIconWidth

public int getIconWidth()
Returns Icon width

paintIcon

public void paintIcon(Component c, Graphics g, int x, int y)
Paints icon for a check box depending on its state