private JPanel createPanel1() {
    JPanel panel = new JPanel();
    panel.setLayout(new JideBoxLayout(panel, JideBoxLayout.Y_AXIS));
    panel.setBorder(
        BorderFactory.createCompoundBorder(
            new JideTitledBorder(
                new PartialEtchedBorder(PartialEtchedBorder.LOWERED, PartialSide.NORTH),
                "AutoCompletion combo box and text field",
                JideTitledBorder.LEADING,
                JideTitledBorder.ABOVE_TOP),
            BorderFactory.createEmptyBorder(0, 0, 0, 0)));

    JComboBox autoCompletionComboBox = new AutoCompletionComboBox(_fontNames);
    autoCompletionComboBox.setName("AutoCompletion JComboBox (Strict)");
    autoCompletionComboBox.setToolTipText("AutoCompletion JComboBox (Strict)");
    panel.add(new JLabel("AutoCompletion JComboBox (Strict)"));
    panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
    panel.add(autoCompletionComboBox);
    panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX);

    AutoCompletionComboBox autoCompletionComboBoxNotStrict = new AutoCompletionComboBox(_fontNames);
    autoCompletionComboBoxNotStrict.setStrict(false);
    autoCompletionComboBoxNotStrict.setName("AutoCompletion JComboBox (Not strict)");
    autoCompletionComboBoxNotStrict.setToolTipText("AutoCompletion JComboBox (Not strict)");
    panel.add(new JLabel("AutoCompletion JComboBox (Not strict)"));
    panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
    panel.add(autoCompletionComboBoxNotStrict);
    panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX);

    // create tree combobox
    final JTextField textField = new JTextField();
    textField.setName("AutoCompletion JTextField with a hidden data");
    SelectAllUtils.install(textField);
    new AutoCompletion(textField, _fontList);
    panel.add(new JLabel("AutoCompletion JTextField with a hidden data"));
    panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
    panel.add(textField);
    panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX);

    //        panel.add(Box.createVerticalStrut(24), JideBoxLayout.FIX);
    //        panel.add(new JLabel("As comparisons:"));
    //        panel.add(Box.createVerticalStrut(6), JideBoxLayout.FIX);
    //
    //        JComboBox searchableComboBox = new JComboBox(_fontNames);
    //        searchableComboBox.setEditable(false);
    //        SearchableUtils.installSearchable(searchableComboBox);
    //        searchableComboBox.setToolTipText("Searchable JComboBox");
    //        panel.add(new JLabel("Searchable JComboBox"));
    //        panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
    //        panel.add(searchableComboBox);
    //        panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX);
    //
    //        JTextField completionTextField = new JTextField();
    //        new ListCompletion(completionTextField, _fontNames);
    //        completionTextField.setToolTipText("Completion JTextField (not auto-complete)");
    //        panel.add(new JLabel("Completion JTextField (not auto-complete)"));
    //        panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
    //        panel.add(completionTextField);
    //        panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX);

    return panel;
  }
예제 #2
0
  /**
   * Returns the message to display from the JOptionPane the receiver is providing the look and feel
   * for.
   */
  protected Object getMessage() {
    inputComponent = null;
    if (optionPane != null) {
      if (optionPane.getWantsInput()) {
        /* Create a user component to capture the input. If the
        selectionValues are non null the component and there
        are < 20 values it'll be a combobox, if non null and
        >= 20, it'll be a list, otherwise it'll be a textfield. */
        Object message = optionPane.getMessage();
        Object[] sValues = optionPane.getSelectionValues();
        Object inputValue = optionPane.getInitialSelectionValue();
        JComponent toAdd;

        if (sValues != null) {
          if (sValues.length < 20) {
            JComboBox cBox = new JComboBox();

            cBox.setName("OptionPane.comboBox");
            for (int counter = 0, maxCounter = sValues.length; counter < maxCounter; counter++) {
              cBox.addItem(sValues[counter]);
            }
            if (inputValue != null) {
              cBox.setSelectedItem(inputValue);
            }
            inputComponent = cBox;
            toAdd = cBox;

          } else {
            JList list = new JList(sValues);
            JScrollPane sp = new JScrollPane(list);

            sp.setName("OptionPane.scrollPane");
            list.setName("OptionPane.list");
            list.setVisibleRowCount(10);
            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            if (inputValue != null) list.setSelectedValue(inputValue, true);
            list.addMouseListener(getHandler());
            toAdd = sp;
            inputComponent = list;
          }

        } else {
          MultiplexingTextField tf = new MultiplexingTextField(20);

          tf.setName("OptionPane.textField");
          tf.setKeyStrokes(new KeyStroke[] {KeyStroke.getKeyStroke("ENTER")});
          if (inputValue != null) {
            String inputString = inputValue.toString();
            tf.setText(inputString);
            tf.setSelectionStart(0);
            tf.setSelectionEnd(inputString.length());
          }
          tf.addActionListener(getHandler());
          toAdd = inputComponent = tf;
        }

        Object[] newMessage;

        if (message == null) {
          newMessage = new Object[1];
          newMessage[0] = toAdd;

        } else {
          newMessage = new Object[2];
          newMessage[0] = message;
          newMessage[1] = toAdd;
        }
        return newMessage;
      }
      return optionPane.getMessage();
    }
    return null;
  }
예제 #3
0
  public BiblioSearchLimitPanel(
      DatabankSchema schema, MarcQueryBuilder queryBuilder, int language, SearchUI utils) {
    super(new GridBagLayout(), queryBuilder);
    this.schema = schema;
    this.language = language;
    ButtonGroup g;

    props = PropertyUtils.loadProperties(getClass().getName(), LocaleUtils.getLocale(language));
    GuiUtils.setActionName(dateRangeAction, props.getProperty("date_range.name"));
    GuiUtils.setActionName(yearAction, props.getProperty("year.name"));
    this.utils = utils;

    lblCodingLevel = new JLabel(props.getProperty("coding_level.name"));
    cmCodingLevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_17);
    cmCodingLevel.setName("biblioCodingLevel");
    lblCodingLevel.setLabelFor(cmCodingLevel);

    lblCataloguingForm = new JLabel(props.getProperty("cataloguing_form.name"));
    cmCataloguingForm = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_18);
    cmCataloguingForm.setName("biblioCataloguingForm");
    lblCataloguingForm.setLabelFor(cmCataloguingForm);

    rBetween = new JRadioButton(props.getProperty("between.name"));
    rBetween.setName("biblioBetweenYears");
    rLt = new JRadioButton(props.getProperty("lt.name"));
    rLt.setName("biblioLessThanYear");
    rGt = new JRadioButton(props.getProperty("gt.name"));
    rGt.setName("biblioGreaterThanYear");
    txfYear = utils.queryTextField(4);
    txfYear.setName("biblioYearEquals");
    rYear = new JRadioButton(yearAction);
    rYear.setName("biblioYear");
    rDateRange = new JRadioButton(dateRangeAction);
    rDateRange.setName("biblioDateRange");
    lblDoctype = new JLabel(props.getProperty("biblio_doctype.name"));
    lblFrom = new JLabel(props.getProperty("from.name"));
    lblTo = new JLabel(props.getProperty("to.name"));
    lblLanguage = new JLabel(props.getProperty("language.name"));
    lblLocation = new JLabel(props.getProperty("location.name"));
    lblRetriveNo = new JLabel(props.getProperty("retriveNo.name"));
    lblRecType = new JLabel(props.getProperty("rectype.name"));
    lblRecStatus = new JLabel(props.getProperty("recstatus.name"));
    lblCalendar = new JLabel(props.getProperty("calendar.name"));
    lblBiblevel = new JLabel(props.getProperty("biblevel.name"));
    lblHierarchicalLevel = new JLabel(props.getProperty("hierarchical_level.name"));
    cmDoctype = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_DOC_TYPE);
    cmDoctype.setName("biblioDocType");
    cmLocation = utils.constantTableLookup(SearchEngineDocumentModel.LOCATION);
    cmLocation.setName("biblioLocation");
    cmLanguage = utils.constantTableLookup(SearchEngineDocumentModel.LANGUAGE);
    cmLanguage.setName("biblioLanguage");
    cmBiblevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_7);
    cmBiblevel.setName("biblioLevel");
    cmHierarchicalLevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_8);
    cmHierarchicalLevel.setName("biblioHierarchicalLevel");
    cmRecType = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_6);
    cmRecType.setName("biblioRecType");
    cmRecStatus = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_5);
    cmRecStatus.setName("biblioRecStatus");
    cmCalendar = utils.constantTableLookup(SearchEngineDocumentModel.CALENDAR);
    cmCalendar.setName("biblioCalendar");
    txfFrom = utils.queryTextField(10);
    txfFrom.setName("biblioFromYear");
    txfTo = utils.queryTextField(10);
    txfTo.setName("biblioToYear");
    txfRetriveNo = utils.queryTextField(10);
    txfRetriveNo.setName("retriveNo");
    lblDoctype.setLabelFor(cmDoctype);
    lblLocation.setLabelFor(cmLocation);
    lblLanguage.setLabelFor(cmLanguage);
    lblFrom.setLabelFor(txfFrom);
    lblTo.setLabelFor(txfTo);
    lblRetriveNo.setLabelFor(txfRetriveNo);
    lblTo.setVerticalTextPosition(JLabel.BOTTOM);
    lblCalendar.setHorizontalAlignment(JLabel.TRAILING);
    lblLanguage.setHorizontalAlignment(JLabel.TRAILING);
    lblRecType.setHorizontalAlignment(JLabel.TRAILING);
    lblDoctype.setHorizontalAlignment(JLabel.TRAILING);
    lblLocation.setHorizontalAlignment(JLabel.TRAILING);
    cbHasAttachment = new JCheckBox(props.getProperty("attachment.name"));
    cbIsOpenShelf = new JCheckBox(props.getProperty("openShelf.name"));
    cbIsLendable = new JCheckBox(props.getProperty("lendable.name"));
    rWithAttachment = new JRadioButton(props.getProperty("attachment-present.name"));
    rWithoutAttachment = new JRadioButton(props.getProperty("attachment-notpresent.name"));
    cbHasAttachment.setName("biblioAttachment");
    cbIsOpenShelf.setName("holdingIsOpenShelf");
    cbIsLendable.setName("holdingIsLendable");
    rWithAttachment.setName("biblioAttachmentPresent");
    rWithoutAttachment.setName("biblioAttachmentNotPresent");
    cbHasAttachment.addChangeListener(attachmentChangedListener);
    rWithAttachment.setEnabled(false);
    rWithoutAttachment.setEnabled(false);
    cbHasAttachment.setSelected(false);
    cbIsOpenShelf.setSelected(false);
    cbIsLendable.setSelected(false);
    g = new ButtonGroup();
    g.add(rWithAttachment);
    g.add(rWithoutAttachment);

    g = new ButtonGroup();
    g.add(rBetween);
    g.add(rLt);
    g.add(rGt);
    g = new ButtonGroup();
    g.add(rDateRange);
    g.add(rYear);
    rYear.setSelected(true);
    dateCriteriaChanged();

    lblDescriptionLevel = new JLabel(props.getProperty("level-of-description.name"));
    cmDescriptionLevel =
        utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_ISAD_LEVEL_OF_DESCRIPTION);
    cmDescriptionLevel.setName("biblioDescriptionLevel");
    lblDescriptionLevel.setLabelFor(cmDescriptionLevel);

    lblGMD = new JLabel(props.getProperty("general-material.name"));
    cmGMD = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_GMD_LIST);
    cmGMD.setName("biblioGMD");
    lblGMD.setLabelFor(cmGMD);

    lblLCClass = new JLabel(props.getProperty("lcclass.name"));
    txfLCClass = new JTextField(20);
    GuiUtils.localeSupport(txfLCClass);
    GuiUtils.setComponentOrientation(txfLCClass, ComponentOrientation.LEFT_TO_RIGHT);
    lblLCClass.setLabelFor(txfLCClass);

    LayoutFacility lf = new LayoutFacility(this);
    /*
            lf.add(lblCodingLevel,
                    new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
            lf.add(cmCodingLevel,
                    new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
    */
    int y = 0;
    lf.add(
        lblDoctype,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmDoctype,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblRecType,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmRecType,
        new GridBagConstraints(
            3,
            y++,
            GridBagConstraints.REMAINDER,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblGMD,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmGMD,
        new GridBagConstraints(
            1,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        lblLocation,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmLocation,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblLanguage,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmLanguage,
        new GridBagConstraints(
            3,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblBiblevel,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmBiblevel,
        new GridBagConstraints(
            5,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    ////
    lf.add(
        lblCataloguingForm,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCataloguingForm,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblHierarchicalLevel,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmHierarchicalLevel,
        new GridBagConstraints(
            3,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblRecStatus,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmRecStatus,
        new GridBagConstraints(
            5,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    ////
    lf.add(
        lblCodingLevel,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCodingLevel,
        new GridBagConstraints(
            5,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        rYear,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        txfYear,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblCalendar,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCalendar,
        new GridBagConstraints(
            3,
            y++,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        rDateRange,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility datelf = new LayoutFacility(new JPanel());
    datelf.add(
        lblFrom,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    datelf.add(
        txfFrom,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rGt,
        new GridBagConstraints(
            3,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rBetween,
        new GridBagConstraints(
            4,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rLt,
        new GridBagConstraints(
            5,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        lblTo,
        new GridBagConstraints(
            6,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    datelf.add(
        txfTo,
        new GridBagConstraints(
            7,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        Box.createHorizontalGlue(),
        new GridBagConstraints(
            8,
            1,
            GridBagConstraints.REMAINDER,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        datelf.container,
        new GridBagConstraints(
            1,
            y++,
            GridBagConstraints.REMAINDER,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility lcClasslf = new LayoutFacility(new JPanel());
    lcClasslf.add(
        lblLCClass,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    lcClasslf.add(
        txfLCClass,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        lcClasslf.container,
        new GridBagConstraints(
            0,
            y++,
            2,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility attLf = LayoutFacility.createLayoutFacility();
    int x = 0;
    attLf.add(
        cbHasAttachment,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    attLf.add(
        cbIsOpenShelf,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    //        attLf.add(cbIsLendable,
    //        		new GridBagConstraints(x++, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START,
    // GridBagConstraints.NONE, new Insets(2, 2, 2, 10), 0, 0));
    attLf.add(
        lblRetriveNo,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 20, 2, 2),
            0,
            0));
    attLf.add(
        txfRetriveNo,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            25,
            0));

    if (SystemUtils.isISADAvailable()) {
      attLf.add(
          lblDescriptionLevel,
          new GridBagConstraints(
              x++,
              0,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.LINE_START,
              GridBagConstraints.HORIZONTAL,
              new Insets(2, 20, 2, 2),
              0,
              0));
      attLf.add(
          cmDescriptionLevel,
          new GridBagConstraints(
              x++,
              0,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.LINE_START,
              GridBagConstraints.NONE,
              new Insets(2, 2, 2, 2),
              0,
              0));
    }

    /*
            attLf.add(rWithAttachment,
                    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
            attLf.add(rWithoutAttachment,
                    new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
    */

    lf.add(
        attLf.container,
        new GridBagConstraints(
            0,
            y,
            GridBagConstraints.REMAINDER,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    //        lf.add(Box.createHorizontalGlue(),
    //                new GridBagConstraints(1, 4, 0, 1, 0.0, 0.0, GridBagConstraints.LINE_START,
    // GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));

    ChangeListener limitChangeListener =
        new ChangeListener() {
          public void stateChanged(ChangeEvent e) {
            txfFrom.setEditable(!rLt.isSelected() && rDateRange.isSelected());
            txfTo.setEditable(!rGt.isSelected() && rDateRange.isSelected());
          }
        };
    rGt.addChangeListener(limitChangeListener);
    rLt.addChangeListener(limitChangeListener);
    rBetween.addChangeListener(limitChangeListener);
    rGt.setSelected(true);
  }