Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for absolute layout and java.awt.Point #5

Open
luca-domenichini opened this issue Nov 3, 2015 · 5 comments
Open

Support for absolute layout and java.awt.Point #5

luca-domenichini opened this issue Nov 3, 2015 · 5 comments

Comments

@luca-domenichini
Copy link

I see that support for absolute layout is missing in the project.
In my case I would find it very useful in order to provide customers with a simple embedded swing editor in my application, oriented to only particular components (like SCADAs).

I think it would be enough to support a syntax for the Component#setLocation(Point p) or Component#setLocation(int x, int y) methods. All other stuffs are already working.. (more generally speaking, as you already support a special syntax for Dimension (like 800x600), a similar syntax should be fine for Point as well..).
In addition, Container#setLayout(null) must be called somewhere.. something like this:

JFrame(name=frame, title=frame.title, size=800x600, defaultCloseOperation=exitOnClose):
    - AbsoluteLayout()
    - JButton(name=button, text=button.acton, location=100;50)

(I don't know which char to use to separate x from y in location... ; should fit be maybe..)

what do you think about that?

@luca-domenichini
Copy link
Author

Visit my fork at https://github.com/mimmoz81/javabuilders to get what i've done...

Also, I introduced the RectangleAsValueHandler class to handle type Rectangle (as of method Component#setBounds(Rectangle))

I was not able to pull a request to you.. I'm new to github so maybe I don't get all the mechanics..

@luca-domenichini
Copy link
Author

Actually it does need for AbsoluteLayout tag to be placed at the end of the yml file.. i need to check more... I'll update when improved.

@luca-domenichini
Copy link
Author

It seems that the layoutmanager must be always the last tag to be declared in yml.

Is that true? If this is correct, my commit is already done and absolute layout is working properly..

@jacek99
Copy link
Owner

jacek99 commented Nov 3, 2015

Yes, if I recall correctly. It's been many years since I coded it :-)

I think it is covered in the PDF explicitly if memory serves me right.

On Tue, Nov 3, 2015 at 9:41 AM, mimmoz81 [email protected] wrote:

It seems that the layoutmanager must be always the last tag to be declared
in yml.

Is that true? If this is correct, my commit is already done and absolute
layout is working properly..


Reply to this email directly or view it on GitHub
#5 (comment).

@luca-domenichini
Copy link
Author

Ok, so if you have time to spend, take a look at my fork and tell me what you think..
many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants