Author: sletellier Date: 2012-06-15 09:38:00 +0200 (Fri, 15 Jun 2012) New Revision: 2333 Url: http://nuiton.org/repositories/revision/jaxx/2333 Log: Fix FileEditor layout Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/BaseActionPanel.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/BaseActionPanel.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/BaseActionPanel.java 2012-06-14 17:32:58 UTC (rev 2332) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/BaseActionPanel.java 2012-06-15 07:38:00 UTC (rev 2333) @@ -32,7 +32,6 @@ */ public abstract class BaseActionPanel extends JPanel { - /** * Notifies all listeners that have registered interest for * notification on this event type. @@ -53,7 +52,6 @@ } } - /** * Adds an <code>ActionListener</code>. * <p> Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx 2012-06-14 17:32:58 UTC (rev 2332) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx 2012-06-15 07:38:00 UTC (rev 2333) @@ -21,11 +21,12 @@ <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% --> -<BaseActionPanel> +<BaseActionPanel layout='{new BorderLayout()}'> <import> java.io.File java.beans.PropertyChangeEvent java.beans.PropertyChangeListener + jaxx.runtime.swing.BaseActionPanel </import> <FileEditorHandler id='handler' constructorParams='this'/> @@ -47,35 +48,30 @@ <String id='extsDescription' javaBean='null'/> <script><![CDATA[ - protected void $afterCompleteSetup() { + protected void $afterCompleteSetup() { - addPropertyChangeListener(PROPERTY_SELECTED_FILE, new PropertyChangeListener() { + addPropertyChangeListener(PROPERTY_SELECTED_FILE, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - if (selectedFile != null) { - pathField.setText(selectedFile.getAbsolutePath()); - fireActionEvent(); - } - } - }); - } - ]]></script> + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (selectedFile != null) { + pathField.setText(selectedFile.getAbsolutePath()); + fireActionEvent(); + } + } + }); + } + ]]></script> - <Table constraints='BorderLayout.CENTER'> - <row> - <cell fill='horizontal' weightx='1'> - <JTextField id='pathField' - enabled='{isEnabled()}' - text='{getStartPath()}' - onFocusLost='setSelectedFile(new File(pathField.getText()))'/> - </cell> - <cell> - <JButton id='boutonXslLocation' - enabled='{isEnabled()}' - actionIcon='open' - onActionPerformed='handler.openLocation()'/> - </cell> - </row> - </Table> + <JTextField id='pathField' + constraints='{BorderLayout.CENTER}' + enabled='{isEnabled()}' + text='{getStartPath()}' + onFocusLost='setSelectedFile(new File(pathField.getText()))'/> + + <JButton id='boutonXslLocation' + constraints='{BorderLayout.EAST}' + enabled='{isEnabled()}' + actionIcon='open' + onActionPerformed='handler.openLocation()'/> </BaseActionPanel> \ No newline at end of file