// Path: src/main/java/com/github/haixing_hu/swt/utils/Messages.java
// public final class Messages {
// 
//   /**
//    * The default encoding of the messages properties files. The value of this
//    * constant is {@value}.
//    */
//   public static final String DEFAULT_ENCODING = "UTF-8";
// 
//   private static volatile Messages instance = null;
// 
//   /**
//    * Gets the singleton instance of the {@link Message} class.
//    * <p>
//    * <b>NOTE:</b> This implementation use the "double checked locking" trick,
//    * and it is only worked for the JDK >= 5.0.
//    *
//    * @return the singleton instance of the {@link Message} class.
//    */
//   public static Messages getInstance() {
//     if (instance == null) {
//       synchronized (Messages.class) {
//         if (instance == null) {
//           instance = new Messages();
//         }
//       }
//     }
//     return instance;
//   }
// 
//   private final Locale locale;
//   private final ReloadableResourceBundleMessageSource source;
// 
//   private Messages() {
//     locale = Locale.getDefault();
//     source = new ReloadableResourceBundleMessageSource();
//     source.setDefaultEncoding(DEFAULT_ENCODING);
//     source.setBasename("classpath:messages");
//   }
// 
//   /**
//    * Gets the localized message for a specified key.
//    *
//    * @param key
//    *          the key of the message.
//    * @return the localized message for the specified key.
//    */
//   public String get(String key) {
//     return source.getMessage(key, null, locale);
//   }
// 
//   /**
//    * Gets the localized message for a specified key formatted with specified
//    * arguments.
//    *
//    * @param key
//    *          the key of the message.
//    * @param args
//    *          the arguments used to format the message.
//    * @return the localized message formatted with the specified arguments.
//    */
//   public String get(String key, Object... args) {
//     return source.getMessage(key, args, locale);
//   }
// }
// 
// Path: src/main/java/com/github/haixing_hu/swt/window/Dialog.java
// public static final String MESSAGE_FEWER_DETAILS = "dialog.fewer-details";
// 
// Path: src/main/java/com/github/haixing_hu/swt/window/Dialog.java
// public static final String MESSAGE_MORE_DETAILS = "dialog.more-details";


import static com.github.haixing_hu.swt.window.Dialog.MESSAGE_FEWER_DETAILS;
import static com.github.haixing_hu.swt.window.Dialog.MESSAGE_MORE_DETAILS;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import com.github.haixing_hu.swt.utils.Messages;

   */
  public DialogFooterArea setCollapsedLabelText(final String collapsedLabelText) {
    this.details = true;
    this.collapsedLabelText = collapsedLabelText;
    this.setInitialised(true);
    return this;
  }

  /**
   * @return the expanded label text
   */
  public String getExpandedLabelText() {
    return this.expandedLabelText;
  }

  /**
   * @param expandedLabelText
   *          the expanded label text to set
   * @return this footer area
   */
  public DialogFooterArea setExpandedLabelText(final String expandedLabelText) {
    this.details = true;
    this.expandedLabelText = expandedLabelText;
    this.setInitialised(true);
    return this;
  }

  /**
   * @return the expanded flag
   */

// Path: src/main/java/com/github/haixing_hu/swt/utils/Messages.java
// public final class Messages {
// 
//   /**
//    * The default encoding of the messages properties files. The value of this
//    * constant is {@value}.
//    */
//   public static final String DEFAULT_ENCODING = "UTF-8";
// 
//   private static volatile Messages instance = null;
// 
//   /**
//    * Gets the singleton instance of the {@link Message} class.
//    * <p>
//    * <b>NOTE:</b> This implementation use the "double checked locking" trick,
//    * and it is only worked for the JDK >= 5.0.
//    *
//    * @return the singleton instance of the {@link Message} class.
//    */
//   public static Messages getInstance() {
//     if (instance == null) {
//       synchronized (Messages.class) {
//         if (instance == null) {
//           instance = new Messages();
//         }
//       }
//     }
//     return instance;
//   }
// 
//   private final Locale locale;
//   private final ReloadableResourceBundleMessageSource source;
// 
//   private Messages() {
//     locale = Locale.getDefault();
//     source = new ReloadableResourceBundleMessageSource();
//     source.setDefaultEncoding(DEFAULT_ENCODING);
//     source.setBasename("classpath:messages");
//   }
// 
//   /**
//    * Gets the localized message for a specified key.
//    *
//    * @param key
//    *          the key of the message.
//    * @return the localized message for the specified key.
//    */
//   public String get(String key) {
//     return source.getMessage(key, null, locale);
//   }
// 
//   /**
//    * Gets the localized message for a specified key formatted with specified
//    * arguments.
//    *
//    * @param key
//    *          the key of the message.
//    * @param args
//    *          the arguments used to format the message.
//    * @return the localized message formatted with the specified arguments.
//    */
//   public String get(String key, Object... args) {
//     return source.getMessage(key, args, locale);
//   }
// }
// 
// Path: src/main/java/com/github/haixing_hu/swt/window/Dialog.java
// public static final String MESSAGE_FEWER_DETAILS = "dialog.fewer-details";
// 
// Path: src/main/java/com/github/haixing_hu/swt/window/Dialog.java
// public static final String MESSAGE_MORE_DETAILS = "dialog.more-details";


// Path: src/main/java/com/github/haixing_hu/swt/window/DialogFooterArea.java
import static com.github.haixing_hu.swt.window.Dialog.MESSAGE_FEWER_DETAILS;
import static com.github.haixing_hu.swt.window.Dialog.MESSAGE_MORE_DETAILS;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import com.github.haixing_hu.swt.utils.Messages;

   */
  public DialogFooterArea setCollapsedLabelText(final String collapsedLabelText) {
    this.details = true;
    this.collapsedLabelText = collapsedLabelText;
    this.setInitialised(true);
    return this;
  }

  /**
   * @return the expanded label text
   */
  public String getExpandedLabelText() {
    return this.expandedLabelText;
  }

  /**
   * @param expandedLabelText
   *          the expanded label text to set
   * @return this footer area
   */
  public DialogFooterArea setExpandedLabelText(final String expandedLabelText) {
    this.details = true;
    this.expandedLabelText = expandedLabelText;
    this.setInitialised(true);
    return this;
  }

  /**
   * @return the expanded flag
   */

  public boolean isExpanded() {
