Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Layout examples
Layout examples [message #945662] Mon, 15 October 2012 14:08 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

I am using Swing Rayo look and feel.

How do I create forms with a layout where some fields just stick to a certain width and other fields resize when the form resizes. I tried a lot of field property combinations but never get it working.

Perhaps there are some examples of complex screen layouts.

Regards Bertin
Re: Layout examples [message #945713 is a reply to message #945662] Mon, 15 October 2012 15:08 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am afraid there is no open-source application with big form or complex layout. The Scout Layout manager covers a lot of use cases (sometime it can be tricky: addition of empty label fields, or really fine tuning of parameters).

Maybe you could sketch a wireframe of the form you want to have (I recommend WireframeSketcher). Add the picture here. And we can try to provide you some inputs.

If you have not so crazy needs, I am confident that you can implement them with Eclipse Scout.


Re: Layout examples [message #946945 is a reply to message #945713] Tue, 16 October 2012 17:01 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

I have just a default form. Put 4 string fields on it and tried to make only 1 of them a fixed width that is smaller the the rest.

So nothing too complicated but is does not work for me.

Regards Bertin

Re: Layout examples [message #947593 is a reply to message #946945] Wed, 17 October 2012 08:19 Go to previous message
Arthur vD is currently offline Arthur vDFriend
Messages: 52
Registered: March 2010
Member
Hi Bertin

The code below gives a field with a label, a checkbox (fixed width) and a date field (flexible width). That's not exactly what you are looking for, just an example I have at hand.

      @Order(10.0)
      public class MyFlexBox extends AbstractSequenceBox {
        @Override
        protected String getConfiguredLabel() {
          return TEXTS.get("MyLabel");
        }

        @Order(10.0)
        public class MyCheckBoxField extends AbstractCheckBox {
          @Override
          protected boolean getConfiguredGridUseUiWidth() {
            return true;
          }

          @Override
          protected double getConfiguredGridWeightX() {
            return 0.0;
          }

          @Override
          protected boolean getConfiguredLabelVisible() {
            return false;
          }

          @Override
          protected int getConfiguredWidthInPixel() {
            return 20;
          }
        }

        @Order(20.0)
        public class MyDateField extends AbstractDateField {
          @Override
          protected boolean getConfiguredLabelVisible() {
            return false;
          }
        }
      }

Sometimes you have to play with some group or sequence boxes around the fields you want to have a different width or be flexible.
I hope this helps somewhat. Happy coding.
Arthur

Previous Topic:new Tutorial: JasperReports Integration
Next Topic:A page with master detail
Goto Forum:
  


Current Time: Thu Apr 25 07:34:17 GMT 2024

Powered by FUDForum. Page generated in 0.03578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top