gt:       signalNumberCheckbox = new Button(signalComp, SWT.CHECK);
context: /* COPYRIGHT-ENEA-SRC-R2 *
   **************************************************************************
   * Copyright (C) 2005-2007 by Enea Software AB.
   * All rights reserved.
   *
   * This Software is furnished under a software license agreement and
   * may be used only in accordance with the terms of such agreement.
   * Any other use or reproduction is prohibited. No title to and
   * ownership of the Software is hereby transferred.
   *
   * PROPRIETARY NOTICE
   * This Software consists of confidential information.
   * Trade secret law and copyright law protect this Software.
   * The above notice of copyright on this Software does not indicate
   * any actual or intended publication of such Software.
   **************************************************************************
   * COPYRIGHT-END */
  
  package com.ose.system.ui.views.pool;
  
  import java.util.Iterator;
  import java.util.List;
  import org.eclipse.jface.dialogs.Dialog;
  import org.eclipse.jface.dialogs.IDialogConstants;
  import org.eclipse.jface.dialogs.IDialogSettings;
  import org.eclipse.swt.SWT;
  import org.eclipse.swt.custom.CLabel;
  import org.eclipse.swt.events.ModifyEvent;
  import org.eclipse.swt.events.ModifyListener;
  import org.eclipse.swt.events.SelectionAdapter;
  import org.eclipse.swt.events.SelectionEvent;
  import org.eclipse.swt.layout.GridData;
  import org.eclipse.swt.layout.GridLayout;
  import org.eclipse.swt.widgets.Button;
  import org.eclipse.swt.widgets.Combo;
  import org.eclipse.swt.widgets.Composite;
  import org.eclipse.swt.widgets.Control;
  import org.eclipse.swt.widgets.Group;
  import org.eclipse.swt.widgets.Label;
  import org.eclipse.swt.widgets.Shell;
  import org.eclipse.swt.widgets.TabFolder;
  import org.eclipse.swt.widgets.TabItem;
  import org.eclipse.swt.widgets.Text;
  import org.eclipse.ui.ISharedImages;
  import org.eclipse.ui.PlatformUI;
  import com.ose.system.Pool;
  import com.ose.system.SignalFilter;
  import com.ose.system.SignalInfo;
  import com.ose.system.StackFilter;
  import com.ose.system.Target;
  import com.ose.system.ui.SystemBrowserPlugin;
  import com.ose.system.ui.util.StringUtils;
  
  public class PoolFilterDialog extends Dialog
  {
     private static final String EXCLUDE_STR = "Not";
  
     private static final String SIGNAL_STATUS_UNKNOWN_STR = "Unknown";
     private static final String SIGNAL_STATUS_VALID_STR = "Valid";
     private static final String SIGNAL_STATUS_ENDMARK_STR = "Broken Endmark";
     private static final String SIGNAL_STATUS_ADMINISTRATION_STR = "Broken Admin Block";
     private static final String SIGNAL_STATUS_NOT_A_SIGNAL_STR = "Not a Signal";
     private static final String SIGNAL_STATUS_NOT_A_POOL_STR = "Not in a Pool";
     private static final String SIGNAL_STATUS_FREE_STR = "Free";
  
     private List targets;
     private String targetName;
     private String poolName;
  
     private Target target;
     private int poolId;
     private SignalFilter signalFilter;
     private StackFilter stackFilter;
  
     private Combo targetCombo;
     private Text poolIdText;
     private TabFolder tabFolder;
  
     private Text signalNumberFromText;
     private Text signalNumberToText;
     private Text signalOwnerIdText;
     private Text signalOwnerNameText;
     private Text signalSenderIdText;
     private Text signalSenderNameText;
     private Text signalAddresseeIdText;
     private Text signalAddresseeNameText;
     private Text signalSizeFromText;
     private Text signalSizeToText;
     private Text signalBufferSizeFromText;
     private Text signalBufferSizeToText;
     private Text signalAddressFromText;
     private Text signalAddressToText;
     private Combo signalStatusCombo;
  
     private Button signalNumberCheckbox;
     private Button signalOwnerIdCheckbox;
     private Button signalOwnerNameCheckbox;
     private Button signalSenderIdCheckbox;
     private Button signalSenderNameCheckbox;
     private Button signalAddresseeIdCheckbox;
     private Button signalAddresseeNameCheckbox;
     private Button signalSizeCheckbox;
     private Button signalBufferSizeCheckbox;
     private Button signalAddressCheckbox;
     private Button signalStatusCheckbox;
  
     private Text stackOwnerIdText;
     private Text stackOwnerNameText;
     private Text stackSizeFromText;
     private Text stackSizeToText;
     private Text stackBufferSizeFromText;
     private Text stackBufferSizeToText;
     private Text stackAddressFromText;
     private Text stackAddressToText;
     private Text stackUsedFromText;
     private Text stackUsedToText;
     private Text stackUnusedFromText;
     private Text stackUnusedToText;
  
     private Button stackOwnerIdCheckbox;
     private Button stackOwnerNameCheckbox;
     private Button stackSizeCheckbox;
     private Button stackBufferSizeCheckbox;
     private Button stackAddressCheckbox;
     private Button stackUsedCheckbox;
     private Button stackUnusedCheckbox;
  
     private CLabel errorMessageLabel;
     private Button clearButton;
  
     public PoolFilterDialog(Shell parent, List targets)
     {
        super(parent);
        if (targets == null)
        {
           throw new NullPointerException();
        }
        this.targets = targets;
     }
  
     public PoolFilterDialog(Shell parent, List targets, Pool pool)
     {
        this(parent, targets);
        if (pool == null)
        {
           throw new NullPointerException();
        }
        this.targetName = pool.getTarget().toString();
        this.poolName = StringUtils.toHexString(pool.getId());
     }
  
     protected void configureShell(Shell shell)
     {
        super.configureShell(shell);
        shell.setText("Pool Filter");
     }
  
     protected Control createContents(Composite parent)
     {
        Control contents = super.createContents(parent);
        initContents();
        return contents;
     }
  
     protected Control createDialogArea(Composite parent)
     {
        Composite comp;
        Composite subComp;
        ValidationHandler validationHandler;
        Label label;
  
        comp = (Composite) super.createDialogArea(parent);
        subComp = new Composite(comp, SWT.NONE);
        subComp.setLayout(new GridLayout(1, false));
        validationHandler = new ValidationHandler();
  
        // Create pool group.
        createPoolGroup(subComp, validationHandler);
  
        // Create vertical spacer.
        label = new Label(subComp, SWT.NONE);
        label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  
        // Create tab folder.
        tabFolder = new TabFolder(subComp, SWT.NONE);
        tabFolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        createSignalTab(tabFolder, validationHandler);
        createStackTab(tabFolder, validationHandler);
  
        // Create error message label.
        errorMessageLabel = new CLabel(subComp, SWT.NONE);
        errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  
        // Create separator line.
        label = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
        label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  
        applyDialogFont(comp);
        return comp;
     }
  
     private void createPoolGroup(Composite comp,
                                  ValidationHandler validationHandler)
     {
        Group poolGroup;
        GridData gd;
        Label label;
  
        poolGroup = new Group(comp, SWT.SHADOW_NONE);
        poolGroup.setText("Pool");
        poolGroup.setLayout(new GridLayout(2, false));
        gd = new GridData(GridData.FILL_HORIZONTAL);
        poolGroup.setLayoutData(gd);
  
        label = new Label(poolGroup, SWT.NONE);
        label.setText("Target:");
  
        targetCombo = new Combo(poolGroup, SWT.READ_ONLY);
        gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.widthHint = convertHorizontalDLUsToPixels(180);
        targetCombo.setLayoutData(gd);
        for (Iterator i = targets.iterator(); i.hasNext();)
        {
           Target target = (Target) i.next();
           targetCombo.add(target.toString());
        }
        targetCombo.addModifyListener(validationHandler);
  
        label = new Label(poolGroup, SWT.NONE);
        label.setText("Pool ID:");
  
        poolIdText = new Text(poolGroup, SWT.SINGLE | SWT.BORDER);
        gd = new GridData(GridData.FILL_HORIZONTAL);
        poolIdText.setLayoutData(gd);
        poolIdText.addModifyListener(validationHandler);
     }
  
     private void createSignalTab(TabFolder tabFolder,
                                  ValidationHandler validationHandler)
     {
        Composite signalComp;
        TabItem signalTabItem;
        GridData gd;
        Label label;
  
        signalComp = new Composite(tabFolder, SWT.NONE);
        signalComp.setLayout(new GridLayout(4, false));
        signalTabItem = new TabItem(tabFolder, SWT.NONE);
        signalTabItem.setText("Signal Properties");
        signalTabItem.setControl(signalComp);
  
        label = new Label(signalComp, SWT.NONE);
        label.setText("Signal Number:");
  
        signalNumberFromText = new Text(signalComp, SWT.SINGLE | SWT.BORDER);
        gd = new GridData(GridData.FILL_HORIZONTAL);
        signalNumberFromText.setLayoutData(gd);
        signalNumberFromText.addModifyListener(validationHandler);
        signalNumberToText = new Text(signalComp, SWT.SINGLE | SWT.BORDER);
        gd = new GridData(GridData.FILL_HORIZONTAL);
        signalNumberToText.setLayoutData(gd);
        signalNumberToText.addModifyListener(validationHandler);
  
  