Merge commit 'origin/5.2'
Vincent Couvert [Mon, 25 Jan 2010 16:19:11 +0000 (17:19 +0100)]
SEP/SEP_35_selection_of_installed_header.odt
scilab/CHANGES_5.2.X
scilab/modules/intersci/Makefile.am
scilab/modules/intersci/Makefile.in
scilab/modules/xpad/src/java/org/scilab/modules/xpad/actions/FindAction.java

index 23bd184..23ffd39 100644 (file)
Binary files a/SEP/SEP_35_selection_of_installed_header.odt and b/SEP/SEP_35_selection_of_installed_header.odt differ
index f1b76f8..e14ef4a 100644 (file)
@@ -227,6 +227,8 @@ Bug fixes:
 
 * bug 6489 fixed - removed a wrong dependency on 'WININET.dll' (Windows).
 
+* bug 6491 fixed - libinter.h was not installed under Linux (SEP #35 updated)
+
                Changes between version 5.2.0-beta1 and 5.2.0 of Scilab
                ==========================================================
 
index 8c6fdac..cc86fe8 100644 (file)
@@ -22,6 +22,7 @@ src/exe/opt.c \
 src/exe/check.c
 
 libsciintersci_la_includedir=$(pkgincludedir)
+libsciintersci_la_include_HEADERS = includes/libinter.h
 
 pkglib_LTLIBRARIES = libsciintersci.la
 
index 628d3d5..3a270bc 100644 (file)
@@ -38,6 +38,7 @@
 
 
 
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -58,7 +59,8 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = intersci$(EXEEXT)
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+DIST_COMMON = $(libsciintersci_la_include_HEADERS) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(top_srcdir)/Makefile.incl.am
 @NEED_JAVA_TRUE@am__append_1 = java
 subdir = modules/intersci
@@ -106,7 +108,8 @@ am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(libsciintersci_la_etcdir)" \
-       "$(DESTDIR)$(libsciintersci_la_rootdir)"
+       "$(DESTDIR)$(libsciintersci_la_rootdir)" \
+       "$(DESTDIR)$(libsciintersci_la_includedir)"
 LTLIBRARIES = $(pkglib_LTLIBRARIES)
 libsciintersci_la_DEPENDENCIES =  \
        $(top_builddir)/libs/MALLOC/libscimalloc.la \
@@ -143,6 +146,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 SOURCES = $(libsciintersci_la_SOURCES) $(intersci_SOURCES)
 DIST_SOURCES = $(libsciintersci_la_SOURCES) $(intersci_SOURCES)
 DATA = $(libsciintersci_la_etc_DATA) $(libsciintersci_la_root_DATA)
+HEADERS = $(libsciintersci_la_include_HEADERS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -398,6 +402,7 @@ src/exe/opt.c \
 src/exe/check.c
 
 libsciintersci_la_includedir = $(pkgincludedir)
+libsciintersci_la_include_HEADERS = includes/libinter.h
 pkglib_LTLIBRARIES = libsciintersci.la
 libsciintersci_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
 intersci_SOURCES = $(INTERSCI_EXE_C_SOURCES)
@@ -858,6 +863,26 @@ uninstall-libsciintersci_la_rootDATA:
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(libsciintersci_la_rootdir)' && rm -f" $$files ")"; \
        cd "$(DESTDIR)$(libsciintersci_la_rootdir)" && rm -f $$files
+install-libsciintersci_la_includeHEADERS: $(libsciintersci_la_include_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(libsciintersci_la_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libsciintersci_la_includedir)"
+       @list='$(libsciintersci_la_include_HEADERS)'; test -n "$(libsciintersci_la_includedir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libsciintersci_la_includedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(libsciintersci_la_includedir)" || exit $$?; \
+       done
+
+uninstall-libsciintersci_la_includeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(libsciintersci_la_include_HEADERS)'; test -n "$(libsciintersci_la_includedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libsciintersci_la_includedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libsciintersci_la_includedir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -944,9 +969,10 @@ distdir: $(DISTFILES)
 check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-local
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) all-local
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \
+               all-local
 installdirs:
-       for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libsciintersci_la_etcdir)" "$(DESTDIR)$(libsciintersci_la_rootdir)"; do \
+       for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libsciintersci_la_etcdir)" "$(DESTDIR)$(libsciintersci_la_rootdir)" "$(DESTDIR)$(libsciintersci_la_includedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -998,6 +1024,7 @@ info: info-am
 info-am:
 
 install-data-am: install-data-local install-libsciintersci_la_etcDATA \
+       install-libsciintersci_la_includeHEADERS \
        install-libsciintersci_la_rootDATA
 
 install-dvi: install-dvi-am
@@ -1046,6 +1073,7 @@ ps-am:
 
 uninstall-am: uninstall-binPROGRAMS \
        uninstall-libsciintersci_la_etcDATA \
+       uninstall-libsciintersci_la_includeHEADERS \
        uninstall-libsciintersci_la_rootDATA \
        uninstall-pkglibLTLIBRARIES
 
@@ -1061,6 +1089,7 @@ uninstall-am: uninstall-binPROGRAMS \
        install-dvi-am install-exec install-exec-am install-html \
        install-html-am install-html-local install-info \
        install-info-am install-libsciintersci_la_etcDATA \
+       install-libsciintersci_la_includeHEADERS \
        install-libsciintersci_la_rootDATA install-man install-pdf \
        install-pdf-am install-pkglibLTLIBRARIES install-ps \
        install-ps-am install-strip installcheck installcheck-am \
@@ -1069,6 +1098,7 @@ uninstall-am: uninstall-binPROGRAMS \
        mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
        uninstall-am uninstall-binPROGRAMS \
        uninstall-libsciintersci_la_etcDATA \
+       uninstall-libsciintersci_la_includeHEADERS \
        uninstall-libsciintersci_la_rootDATA \
        uninstall-pkglibLTLIBRARIES
 
index e6da2a0..bf993ab 100644 (file)
@@ -14,7 +14,7 @@
 package org.scilab.modules.xpad.actions;
 
 import java.awt.Color;
-import java.awt.Dimension;
+import java.awt.GridLayout;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -34,8 +34,8 @@ import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
 import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
 import javax.swing.ButtonGroup;
-import javax.swing.GroupLayout;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
@@ -46,8 +46,6 @@ import javax.swing.JPanel;
 import javax.swing.JRadioButton;
 import javax.swing.JTextPane;
 import javax.swing.KeyStroke;
-import javax.swing.LayoutStyle;
-import javax.swing.SwingConstants;
 import javax.swing.text.BadLocationException;
 import javax.swing.text.DefaultHighlighter;
 import javax.swing.text.Highlighter;
@@ -66,7 +64,7 @@ import org.scilab.modules.xpad.utils.XpadMessages;
  * @author Sylvestre KOUMAR
  * @author Allan CORNET 
  * @author Antoine ELIAS
- *
+ * @author Vincent COUVERT
  */
 public final class FindAction extends DefaultAction {
 
@@ -74,10 +72,14 @@ public final class FindAction extends DefaultAction {
         * serialVersionUID
         */
        private static final long serialVersionUID = -5499974793656106222L;
+       
+       private static final int GAP = 5;
+       private static final int THREE = 3;
 
        private static boolean windowAlreadyExist;
 
        private static JFrame frame;
+       private static String previousSearch;
 
        private JButton buttonClose;
        private JButton buttonFind;
@@ -99,7 +101,6 @@ public final class FindAction extends DefaultAction {
        private JPanel panelDirection;
        private JPanel panelFind;
        private JPanel panelFrame;
-       private JPanel panelOption;
        private JPanel panelOptions;
        private JPanel panelScope;
        private JRadioButton radioAll;
@@ -107,8 +108,6 @@ public final class FindAction extends DefaultAction {
        private JRadioButton radioForward;
        private JRadioButton radioSelection;
 
-       private static String previousSearch;
-
        private String oldWord;
        private String newWord;
        private String wordToFind;
@@ -150,11 +149,13 @@ public final class FindAction extends DefaultAction {
                        // else find and replace action is applied to the entire document
                        int startPos = getEditor().getTextPane().getSelectionStart();
                        int endPos = getEditor().getTextPane().getSelectionEnd();
-                       int startLine = ((ScilabStyleDocument) getEditor().getTextPane().getStyledDocument()).getDefaultRootElement().getElementIndex(startPos);
-                       int endLine = ((ScilabStyleDocument) getEditor().getTextPane().getStyledDocument()).getDefaultRootElement().getElementIndex(endPos);
+                       int startLine = ((ScilabStyleDocument) getEditor().getTextPane().getStyledDocument())
+                                                                               .getDefaultRootElement().getElementIndex(startPos);
+                       int endLine = ((ScilabStyleDocument) getEditor().getTextPane().getStyledDocument())
+                                                                               .getDefaultRootElement().getElementIndex(endPos);
 
-                       if(startPos != endPos) {
-                               if(startLine != endLine) {
+                       if (startPos != endPos) {
+                               if (startLine != endLine) {
                                        radioSelection.setSelected(true);
                                        comboFind.setSelectedIndex(-1);
                                        comboReplace.setSelectedIndex(-1);
@@ -204,17 +205,12 @@ public final class FindAction extends DefaultAction {
                frame = new JFrame();
                frame.setIconImage(new ImageIcon(System.getenv("SCI") + "/modules/gui/images/icons/scilab.png").getImage());
                frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
-               frame.setMinimumSize(new Dimension(475, 450));
                frame.setTitle(XpadMessages.FIND_REPLACE);
                frame.setResizable(false);
-               frame.pack();
-               frame.setLocationRelativeTo(Xpad.getEditor());
-               frame.setVisible(true);
 
                buttonGroup1 = new ButtonGroup();
                buttonGroup2 = new ButtonGroup();
                panelFrame = new JPanel();
-               panelOption = new JPanel();
                panelDirection = new JPanel();
                radioForward = new JRadioButton();
                radioBackward = new JRadioButton();
@@ -239,42 +235,37 @@ public final class FindAction extends DefaultAction {
                buttonClose = new JButton();
                labelStatus = new JLabel();
 
-               panelFrame.setLayout(new java.awt.BorderLayout());
+               panelFrame.setLayout(new BoxLayout(panelFrame, BoxLayout.PAGE_AXIS));
+               panelFrame.setBorder(BorderFactory.createEmptyBorder(2 * GAP, 2 * GAP, 2 * GAP, 2 * GAP));
 
-               panelOption.setMaximumSize(new java.awt.Dimension(457, 225));
-               panelOption.setMinimumSize(new java.awt.Dimension(457, 225));
-               panelOption.setPreferredSize(new java.awt.Dimension(457, 225));
+               /* Pattern to search and replace*/
+               labelFind.setText(XpadMessages.FIND);
+               labelReplace.setText(XpadMessages.REPLACE);
 
+               comboFind.setEditable(true);
+               comboReplace.setEditable(true);
+               
+               panelFind.setLayout(new GridLayout(2, 2, GAP, GAP));
+               panelFind.add(labelFind);
+               panelFind.add(comboFind);
+               panelFind.add(labelReplace);
+               panelFind.add(comboReplace);
+               panelFrame.add(panelFind);
+
+               /* Search direction selection*/
                panelDirection.setBorder(BorderFactory.createTitledBorder(XpadMessages.DIRECTION));
 
                buttonGroup1.add(radioForward);
                radioForward.setText(XpadMessages.FORWARD);
-
                buttonGroup1.add(radioBackward);
                radioBackward.setText(XpadMessages.BACKWARD);
 
-               GroupLayout panelDirectionLayout = new GroupLayout(panelDirection);
-               panelDirection.setLayout(panelDirectionLayout);
-               panelDirectionLayout.setHorizontalGroup(
-                               panelDirectionLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelDirectionLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelDirectionLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                                                               .addComponent(radioForward)
-                                                               .addComponent(radioBackward))
-                                                               .addContainerGap(83, Short.MAX_VALUE))
-               );
-               panelDirectionLayout.setVerticalGroup(
-                               panelDirectionLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelDirectionLayout.createSequentialGroup()
-                                               .addComponent(radioForward)
-                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                               .addComponent(radioBackward)
-                                               .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-               );
+               panelDirection.setLayout(new GridLayout(2, 1, GAP, GAP));
+               panelDirection.add(radioForward);
+               panelDirection.add(radioBackward);
 
+               /* Scope for search */
                panelScope.setBorder(BorderFactory.createTitledBorder(XpadMessages.SCOPE));
-               panelScope.setMaximumSize(new java.awt.Dimension(457, 225));
 
                buttonGroup2.add(radioAll);
                radioAll.setText(XpadMessages.SELECT_ALL);
@@ -282,26 +273,17 @@ public final class FindAction extends DefaultAction {
                buttonGroup2.add(radioSelection);
                radioSelection.setText(XpadMessages.SELECTED_LINES);
 
-               GroupLayout panelScopeLayout = new GroupLayout(panelScope);
-               panelScope.setLayout(panelScopeLayout);
-               panelScopeLayout.setHorizontalGroup(
-                               panelScopeLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelScopeLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelScopeLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                                                               .addComponent(radioAll)
-                                                               .addComponent(radioSelection))
-                                                               .addContainerGap(69, Short.MAX_VALUE))
-               );
-               panelScopeLayout.setVerticalGroup(
-                               panelScopeLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelScopeLayout.createSequentialGroup()
-                                               .addComponent(radioAll)
-                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                               .addComponent(radioSelection)
-                                               .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-               );
-
+               panelScope.setLayout(new GridLayout(2, 1, GAP, GAP));
+               panelScope.add(radioAll);
+               panelScope.add(radioSelection);
+               
+               JPanel panelDirectionScope = new JPanel();
+               panelDirectionScope.setLayout(new GridLayout(1, 2, GAP, GAP));
+               panelDirectionScope.add(panelDirection);
+               panelDirectionScope.add(panelScope);
+               panelFrame.add(panelDirectionScope);
+               
+               /* Misc Options */
                panelOptions.setBorder(BorderFactory.createTitledBorder(XpadMessages.OPTIONS));
 
                checkCase.setText(XpadMessages.CASE_SENSITIVE);
@@ -310,102 +292,12 @@ public final class FindAction extends DefaultAction {
                checkWarp.setText(XpadMessages.WORD_WRAP);
 
                checkWarp.setSelected(true);
-               GroupLayout panelOptionsLayout = new GroupLayout(panelOptions);
-               panelOptions.setLayout(panelOptionsLayout);
-               panelOptionsLayout.setHorizontalGroup(
-                               panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelOptionsLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                                                               .addComponent(checkCase)
-                                                               .addComponent(checkWhole))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE)
-                                                               .addGroup(panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                                                                               .addComponent(checkWarp)
-                                                                               .addComponent(checkRegular))
-                                                                               .addContainerGap())
-               );
-               panelOptionsLayout.setVerticalGroup(
-                               panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelOptionsLayout.createSequentialGroup()
-                                               .addGroup(panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                               .addComponent(checkCase)
-                                                               .addComponent(checkRegular))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                               .addGroup(panelOptionsLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                                               .addComponent(checkWhole)
-                                                                               .addComponent(checkWarp))
-                                                                               .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-               );
-
-               GroupLayout panelOptionLayout = new GroupLayout(panelOption);
-               panelOption.setLayout(panelOptionLayout);
-               panelOptionLayout.setHorizontalGroup(
-                               panelOptionLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(GroupLayout.Alignment.TRAILING, panelOptionLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelOptionLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                                                               .addComponent(panelOptions, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                                               .addGroup(panelOptionLayout.createSequentialGroup()
-                                                                               .addComponent(panelDirection, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                                                               .addGap(18, 18, 18)
-                                                                               .addComponent(panelScope, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
-                                                                               .addContainerGap())
-               );
-               panelOptionLayout.setVerticalGroup(
-                               panelOptionLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelOptionLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelOptionLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
-                                                               .addComponent(panelDirection, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                                               .addComponent(panelScope, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                               .addComponent(panelOptions, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                                                               .addContainerGap(24, Short.MAX_VALUE))
-               );
-
-               panelFrame.add(panelOption, java.awt.BorderLayout.CENTER);
-
-               panelFind.setPreferredSize(new java.awt.Dimension(457, 80));
-
-               labelFind.setText(XpadMessages.FIND);
-               labelReplace.setText(XpadMessages.REPLACE);
-
-               comboFind.setEditable(true);
-               comboReplace.setEditable(true);
-               
-               GroupLayout panelFindLayout = new GroupLayout(panelFind);
-               panelFind.setLayout(panelFindLayout);
-               panelFindLayout.setHorizontalGroup(
-                               panelFindLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelFindLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelFindLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
-                                                               .addComponent(labelReplace, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                                               .addComponent(labelFind, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                               .addGroup(panelFindLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                                                                               .addComponent(comboFind, 0, 284, Short.MAX_VALUE)
-                                                                               .addComponent(comboReplace, 0, 284, Short.MAX_VALUE))
-                                                                               .addContainerGap())
-               );
-               panelFindLayout.setVerticalGroup(
-                               panelFindLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelFindLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelFindLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                               .addComponent(labelFind)
-                                                               .addComponent(comboFind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                               .addGroup(panelFindLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                                               .addComponent(comboReplace, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                                                                               .addComponent(labelReplace))
-                                                                               .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-               );
-
-               panelFrame.add(panelFind, java.awt.BorderLayout.PAGE_START);
-
-               panelButton.setPreferredSize(new java.awt.Dimension(457, 140));
+               panelOptions.setLayout(new GridLayout(2, 2, GAP, GAP));
+               panelOptions.add(checkCase);
+               panelOptions.add(checkRegular);
+               panelOptions.add(checkWhole);
+               panelOptions.add(checkWarp);
+               panelFrame.add(panelOptions);
 
                buttonFind.setText(XpadMessages.FIND_BUTTON);
                buttonReplaceFind.setText(XpadMessages.FIND_REPLACE);
@@ -414,60 +306,25 @@ public final class FindAction extends DefaultAction {
                buttonClose.setText(XpadMessages.CLOSE);
                labelStatus.setText("");
 
-               GroupLayout panelButtonLayout = new GroupLayout(panelButton);
-               panelButton.setLayout(panelButtonLayout);
-               panelButtonLayout.setHorizontalGroup(
-                               panelButtonLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelButtonLayout.createSequentialGroup()
-                                               .addContainerGap()
-                                               .addGroup(panelButtonLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                                                               .addGroup(panelButtonLayout.createSequentialGroup()
-                                                                               .addComponent(buttonReplace)
-                                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                                               .addComponent(buttonReplaceAll))
-                                                                               .addGroup(panelButtonLayout.createSequentialGroup()
-                                                                                               .addComponent(labelStatus, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)
-                                                                                               .addGap(18, 18, 18)
-                                                                                               .addComponent(buttonClose))
-                                                                                               .addGroup(panelButtonLayout.createSequentialGroup()
-                                                                                                               .addComponent(buttonFind)
-                                                                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                                                                               .addComponent(buttonReplaceFind, GroupLayout.PREFERRED_SIZE, 182, GroupLayout.PREFERRED_SIZE)))
-                                                                                                               .addContainerGap())
-               );
-
-               panelButtonLayout.linkSize(SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonClose, buttonFind, buttonReplace, buttonReplaceAll, buttonReplaceFind});
-
-               panelButtonLayout.setVerticalGroup(
-                               panelButtonLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addGroup(panelButtonLayout.createSequentialGroup()
-                                               .addGroup(panelButtonLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                               .addComponent(buttonReplaceFind)
-                                                               .addComponent(buttonFind))
-                                                               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                                                               .addGroup(panelButtonLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                                               .addComponent(buttonReplaceAll)
-                                                                               .addComponent(buttonReplace))
-                                                                               .addGap(18, 18, 18)
-                                                                               .addGroup(panelButtonLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                                                                                               .addComponent(buttonClose)
-                                                                                               .addComponent(labelStatus))
-                                                                                               .addContainerGap(29, Short.MAX_VALUE))
-               );
-
-               panelFrame.add(panelButton, java.awt.BorderLayout.PAGE_END);
-
-               GroupLayout layout = new GroupLayout(frame.getContentPane());
-               frame.getContentPane().setLayout(layout);
-               layout.setHorizontalGroup(
-                               layout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addComponent(panelFrame, GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE)
-               );
-               layout.setVerticalGroup(
-                               layout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                               .addComponent(panelFrame, GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
-               );
+               panelButton.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+               panelButton.setLayout(new GridLayout(THREE, THREE, GAP, GAP));
+               panelButton.add(new JLabel());
+               panelButton.add(buttonFind);
+               panelButton.add(buttonReplaceFind);
+               panelButton.add(new JLabel());
+               panelButton.add(buttonReplace);
+               panelButton.add(buttonReplaceAll);
+               panelButton.add(new JLabel());
+               panelButton.add(new JLabel());
+               panelButton.add(buttonClose);
+               
+               panelFrame.add(panelButton);
+
+               frame.setContentPane(panelFrame);
                
+               frame.pack();
+               frame.setLocationRelativeTo(Xpad.getEditor());
+               frame.setVisible(true);
                
                buttonReplaceFind.setEnabled(false);
                buttonReplace.setEnabled(false);
@@ -523,7 +380,7 @@ public final class FindAction extends DefaultAction {
                                        }
 
 
-                                       public void focusLost(FocusEvent e) {}
+                                       public void focusLost(FocusEvent e) { }
                                });
 
 
@@ -637,17 +494,17 @@ public final class FindAction extends DefaultAction {
                                
                /*comboReplace*/
                comboReplace.getEditor().getEditorComponent().addMouseListener(new MouseListener() {
-                       public void mouseReleased(MouseEvent e) {}
+                       public void mouseReleased(MouseEvent e) { }
                        public void mousePressed(MouseEvent e) {
                                closeComboPopUp();
                        }
-                       public void mouseExited(MouseEvent e) {}
-                       public void mouseEntered(MouseEvent e) {}
-                       public void mouseClicked(MouseEvent e) {}
+                       public void mouseExited(MouseEvent e) { }
+                       public void mouseEntered(MouseEvent e) { }
+                       public void mouseClicked(MouseEvent e) { }
                });
                
                comboReplace.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
-                       public void keyTyped(KeyEvent e) {}
+                       public void keyTyped(KeyEvent e) { }
                        public void keyReleased(KeyEvent e) {
                                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                                    closeFindReplaceWindow();
@@ -660,7 +517,7 @@ public final class FindAction extends DefaultAction {
 
                                updateFindReplaceButtonStatus();
                        }
-                       public void keyPressed(KeyEvent e) {}
+                       public void keyPressed(KeyEvent e) { }
                });
 
                comboReplace.addItemListener(new ItemListener() {
@@ -677,13 +534,13 @@ public final class FindAction extends DefaultAction {
                
                /*comboFind*/
                comboFind.getEditor().getEditorComponent().addMouseListener(new MouseListener() {
-                       public void mouseReleased(MouseEvent arg0) {}
+                       public void mouseReleased(MouseEvent arg0) { }
                        public void mousePressed(MouseEvent arg0) {
                                closeComboPopUp();
                        }
-                       public void mouseExited(MouseEvent arg0) {}
-                       public void mouseEntered(MouseEvent arg0) {}
-                       public void mouseClicked(MouseEvent arg0) {}
+                       public void mouseExited(MouseEvent arg0) { }
+                       public void mouseEntered(MouseEvent arg0) { }
+                       public void mouseClicked(MouseEvent arg0) { }
                });
 
                comboFind.addActionListener(new ActionListener() {
@@ -701,7 +558,7 @@ public final class FindAction extends DefaultAction {
 
                comboFind.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
                        
-                       public void keyTyped(KeyEvent e) {}
+                       public void keyTyped(KeyEvent e) { }
                        public void keyReleased(KeyEvent e) {
                                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                                    closeFindReplaceWindow();
@@ -715,14 +572,14 @@ public final class FindAction extends DefaultAction {
                                
                        }
                        
-                       public void keyPressed(KeyEvent e) {}
+                       public void keyPressed(KeyEvent e) { }
                });
                
                
                frame.addWindowListener(new WindowListener() {
-                       public void windowClosed(WindowEvent e) {}
-                       public void windowDeiconified(WindowEvent e) {}
-                       public void windowActivated(WindowEvent e) {}
+                       public void windowClosed(WindowEvent e) { }
+                       public void windowDeiconified(WindowEvent e) { }
+                       public void windowActivated(WindowEvent e) { }
                        
                        public void windowClosing(WindowEvent e) {
                                FindAction.windowAlreadyExist = false;
@@ -730,19 +587,19 @@ public final class FindAction extends DefaultAction {
 
                        }
                        
-                       public void windowDeactivated(WindowEvent e) {}
-                       public void windowIconified(WindowEvent e) {}
-                       public void windowOpened(WindowEvent e) {}
+                       public void windowDeactivated(WindowEvent e) { }
+                       public void windowIconified(WindowEvent e) { }
+                       public void windowOpened(WindowEvent e) { }
                });
                
        }
 
        private void closeComboPopUp() {
-               if(comboFind.isPopupVisible()) {
+               if (comboFind.isPopupVisible()) {
                        comboFind.hidePopup();
                }
 
-               if(comboReplace.isPopupVisible()) {
+               if (comboReplace.isPopupVisible()) {
                        comboReplace.hidePopup();
                }
        }
@@ -751,7 +608,7 @@ public final class FindAction extends DefaultAction {
                Object old = comboFind.getEditor().getItem();
                comboFind.removeAllItems();
                ArrayList<String> recentFind = ConfigXpadManager.getRecentSearch();
-               for(String item : recentFind) {
+               for (String item : recentFind) {
                        comboFind.addItem(item);
                }
 
@@ -762,7 +619,7 @@ public final class FindAction extends DefaultAction {
                Object old = comboReplace.getEditor().getItem();
                comboReplace.removeAllItems();
                ArrayList<String> recentReaplce = ConfigXpadManager.getRecentReplace();
-               for(String item : recentReaplce) {
+               for (String item : recentReaplce) {
                        comboReplace.addItem(item);
                }
 
@@ -771,8 +628,8 @@ public final class FindAction extends DefaultAction {
 
        public void saveFindReplaceConfiguration() {
        
-               ConfigXpadManager.saveRecentSearch((String)comboFind.getEditor().getItem());
-               ConfigXpadManager.saveRecentReplace((String)comboReplace.getEditor().getItem());
+               ConfigXpadManager.saveRecentSearch((String) comboFind.getEditor().getItem());
+               ConfigXpadManager.saveRecentReplace((String) comboReplace.getEditor().getItem());
                ConfigXpadManager.saveRegularExpression(checkRegular.isSelected());
                ConfigXpadManager.saveWordWarp(checkWarp.isSelected());
                ConfigXpadManager.saveWholeWord(checkWhole.isSelected());
@@ -866,7 +723,7 @@ public final class FindAction extends DefaultAction {
                int saveEnd     = endFindSelection;
 
                String exp = (String) comboFind.getEditor().getItem();
-               if(exp.compareTo("") == 0) {
+               if (exp.compareTo("") == 0) {
                        return;
                }
                wordToFind = exp;
@@ -1048,7 +905,7 @@ public final class FindAction extends DefaultAction {
                String find = (String) comboFind.getEditor().getItem();
                String replace = (String) comboReplace.getEditor().getItem();
 
-               if(find.compareTo("") == 0 || replace.compareTo("") == 0) {
+               if (find.compareTo("") == 0 || replace.compareTo("") == 0) {
                        return;
                }
                oldWord = (String) find;