g.setRenderingHint (
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
XAccessibleStateSet xStateSet = mxContext.getAccessibleStateSet();
if (xStateSet != null)
{
short aStates[] = xStateSet.getStates ();
final int nMaxStateIndex = AccessibleStateType.MANAGES_DESCENDANTS;
int nStateWidth = (aWidgetArea.width-12) / (nMaxStateIndex+1);
AffineTransform aTransform = g.getTransform ();
g.setColor (aTextColor);
int y = aWidgetArea.y+aWidgetArea.height - 12;
double nTextRotation = -0.9;//-java.lang.Math.PI/2;
double nScale = 0.6;
// Create a shape for the boxes.
int nBoxWidth = nStateWidth-2;
if (nBoxWidth > 8)
nBoxWidth = 8;
Rectangle aCheckBox = new Rectangle (-nBoxWidth/2,0,nBoxWidth,nBoxWidth);
for (short i=0; i<=nMaxStateIndex; i++)
{
int x = nStateWidth + i * nStateWidth;
String sStateName = NameProvider.getStateName (i);
boolean bStateSet = xStateSet.contains (i);
g.setTransform (aTransform);
g.translate (x,y);
if (bStateSet)
{
g.setColor (Color.GREEN);