/**
* Testing default properties.
*/
public void testDefaultProperties(TestHarness harness)
{
JCheckBoxMenuItem m = new JCheckBoxMenuItem("Label", new ImageIcon(), true);
// Properties set by init method in JMenuItem.java.
harness.check(m.isFocusPainted(), false);
harness.check(m.getHorizontalAlignment(), JButton.LEADING);
harness.check(m.getHorizontalTextPosition(), JButton.TRAILING);
// Additional JMenuITem.java properties
harness.check(m.getUIClassID(), "CheckBoxMenuItemUI");
harness.check(m.getAccelerator(), null);
harness.check(m.isArmed(), false);
harness.check(m.isEnabled(), true);
harness.check(m.isRequestFocusEnabled(), true);
// Properties set by AbstractButton.java's constructor.
harness.check(m.getHorizontalAlignment(), 10);
harness.check(m.getHorizontalTextPosition(), 11);
harness.check(m.getVerticalAlignment(), 0);
harness.check(m.getVerticalTextPosition(), 0);
harness.check(m.isBorderPainted(), true);
harness.check(m.isContentAreaFilled(), true);
harness.check(m.isFocusPainted(), false);
harness.check(m.isFocusable(), false);
harness.check(m.getAlignmentX(), 0.5f);
harness.check(m.getAlignmentY(), 0.5f);
harness.check(m.getDisplayedMnemonicIndex(), - 1);
harness.check(m.isOpaque(), true);
//Additional AbstractButton.java properties
harness.check(m.getActionCommand(), "Label");
harness.check(m.getMnemonic(), 0);
harness.check(m.getMargin().top, 2);
harness.check(m.getMargin().left, 2);
harness.check(m.getMargin().bottom, 2);
harness.check(m.getMargin().right, 2);
harness.check(m.getPressedIcon(), null);
harness.check(m.isRolloverEnabled(), false);
harness.check(m.getRolloverIcon(), null);
harness.check(m.getRolloverSelectedIcon(), null);
harness.check(m.isSelected(), true);
harness.check(m.getSelectedIcon(), null);
// Properties set by JCheckBoxMenuItem.java constructor itself.
harness.check(m.getModel() instanceof DefaultButtonModel);
harness.check(m.getModel() != null);
harness.check(m.isVisible(), true);
}