private void populate(LegendOptionData optionData){
  widthSpinner.setValue(Integer.valueOf(optionData.getImageWidth()));
  heightSpinner.setValue(Integer.valueOf(optionData.getImageHeight()));
  dpiSpinner.setValue(Integer.valueOf(optionData.getDpi()));
  imageSizeSpinner.setValue(Integer.valueOf(optionData.getImageSize()));
  chckboxMaintainAspect.setSelected(optionData.isMaintainAspectRatio());
  chckboxAntiAlias.setSelected(optionData.isFontAntiAliasing());
  chckboxShowLabels.setSelected(optionData.isShowLabels());
  chckboxShowTitles.setSelected(optionData.isShowTitle());
  chckboxSeparateImages.setSelected(optionData.splitSymbolizers());
  chckboxShowBorder.setSelected(optionData.isBorder());
  chckboxBandInformation.setSelected(optionData.isBandInformation());
  chckboxTransparent.setSelected(optionData.isTransparent());
  backgroundColourButton.populate(optionData.getBackgroundColour());
  labelFontColourButton.populate(optionData.getLabelFontColour());
  borderColourButton.populate(optionData.getBorderColour());
  updateFieldStates();
  populateLabelFontDetails(optionData.getLabelFont());
}

private void populate ( LegendOptionData optionData ) { widthSpinner . setValue ( Integer . valueOf ( optionData . getImageWidth ( ) ) ) ; heightSpinner . setValue ( Integer . valueOf ( optionData . getImageHeight ( ) ) ) ; dpiSpinner . setValue ( Integer . valueOf ( optionData . getDpi ( ) ) ) ; imageSizeSpinner . setValue ( Integer . valueOf ( optionData . getImageSize ( ) ) ) ; chckboxMaintainAspect . setSelected ( optionData . isMaintainAspectRatio ( ) ) ; chckboxAntiAlias . setSelected ( optionData . isFontAntiAliasing ( ) ) ; chckboxShowLabels . setSelected ( optionData . isShowLabels ( ) ) ; chckboxShowTitles . setSelected ( optionData . isShowTitle ( ) ) ; chckboxSeparateImages . setSelected ( optionData . splitSymbolizers ( ) ) ; chckboxShowBorder . setSelected ( optionData . isBorder ( ) ) ; chckboxBandInformation . setSelected ( optionData . isBandInformation ( ) ) ; chckboxTransparent . setSelected ( optionData . isTransparent ( ) ) ; backgroundColourButton . populate ( optionData . getBackgroundColour ( ) ) ; labelFontColourButton . populate ( optionData . getLabelFontColour ( ) ) ; borderColourButton . populate ( optionData . getBorderColour ( ) ) ; updateFieldStates ( ) ; populateLabelFontDetails ( optionData . getLabelFont ( ) ) ; }
populate data into fields .
