}
private void setupDefaultGrid(final Band band, final Element detailElement)
{
setupDefaultPadding(band, detailElement);
final ElementStyleSheet styleSheet = detailElement.getStyle();
// Always make the height of the detailElement dynamic to the band
// According to thomas negative numbers equate to percentages
styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(-100));
final Object maybeBorderStyle = band.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.GRID_STYLE);
final Object maybeBorderWidth = band.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.GRID_WIDTH);
final Object maybeBorderColor = band.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.GRID_COLOR);
if (maybeBorderColor instanceof Color == false ||
maybeBorderStyle instanceof BorderStyle == false ||
maybeBorderWidth instanceof Number == false)
{
return;
}
final BorderStyle style = (BorderStyle) maybeBorderStyle;
final Color color = (Color) maybeBorderColor;
final Number number = (Number) maybeBorderWidth;
final Float width = new Float(number.floatValue());
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_WIDTH, width);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_COLOR, color);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE, style);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_LEFT_WIDTH, width);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_LEFT_COLOR, color);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE, style);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_WIDTH, width);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_COLOR, color);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE, style);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_RIGHT_WIDTH, width);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_RIGHT_COLOR, color);
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE, style);
}