private void enableActions(){
  restoreAction.setEnabled(isParentMaximum() || isParentIcon());
  maximizeAction.setEnabled((isParentMaximizable() && !isParentMaximum() && !isParentIcon()) || (isParentMaximizable() && isParentIcon()));
  iconifyAction.setEnabled(isParentIconifiable() && !isParentIcon());
  closeAction.setEnabled(isParentClosable());
  sizeAction.setEnabled(false);
  moveAction.setEnabled(false);
}

private void enableActions ( ) { restoreAction . setEnabled ( isParentMaximum ( ) || isParentIcon ( ) ) ; maximizeAction . setEnabled ( ( isParentMaximizable ( ) && ! isParentMaximum ( ) && ! isParentIcon ( ) ) || ( isParentMaximizable ( ) && isParentIcon ( ) ) ) ; iconifyAction . setEnabled ( isParentIconifiable ( ) && ! isParentIcon ( ) ) ; closeAction . setEnabled ( isParentClosable ( ) ) ; sizeAction . setEnabled ( false ) ; moveAction . setEnabled ( false ) ; }
enable / disable the button actions as needed .
