/** edit the text */
boolean action( JTextComponent aText, AccTreeNode aNode )
throws IndexOutOfBoundsException
{
// is this text editable? if not, fudge you and return
XAccessibleEditableText xEdit = aNode.getEditText();
boolean bSuccess = false;
if( xEdit != null )
{
PropertyValue[] aSequence = new PropertyValue[6];
aSequence[0] = new PropertyValue();
aSequence[0].Name = "CharWeight";
aSequence[0].Value = new Integer( aBold.isSelected() ? 150 : 100 );
aSequence[1] = new PropertyValue();
aSequence[1].Name = "CharUnderline";
aSequence[1].Value = new Integer( aUnderline.isSelected() ? 1 : 0 );
aSequence[2] = new PropertyValue();
aSequence[2].Name = "CharBackColor";
aSequence[2].Value = new Integer( aBackground.getRGB() );
aSequence[3] = new PropertyValue();
aSequence[3].Name = "CharColor";
aSequence[3].Value = new Integer( aForeground.getRGB() );
aSequence[4] = new PropertyValue();
aSequence[4].Name = "CharPosture";
aSequence[4].Value = new Integer( aItalics.isSelected() ? 1 : 0 );
aSequence[5] = new PropertyValue();
aSequence[5].Name = "CharBackTransparent";
aSequence[5].Value = new Boolean( false );
bSuccess = xEdit.setAttributes( getSelectionStart(),
getSelectionEnd(),
aSequence );
}
return bSuccess;
}