22 comments
Comment actions Permalink

Dialog whole or content pane?
Now UIDesigner allow construct only content pane or root JPanel, whitch i
will include to your container as content pane.

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bkovcm$jep$1@is.intellij.net...
>

Is there a way to design dialogs with the uiDesigner?

>

Alain

>


0
Comment actions Permalink

Alexey Efimov wrote:

> Dialog whole or content pane?
> Now UIDesigner allow construct only content pane or root JPanel,
whitch i
> will include to your container as content pane.

I'm lazy, and no Swing expert, so I'm looking for the shortest path
between me and a working dialog, as for example, the "Introduce
Variable" dialog.

Alain

0
Comment actions Permalink

Ok, i see.
You must create content pane for dialog. Then create JDialog frame and set
content pane from your UI.

public class MyDialog extends DialogWrapper {
public MyDialog() {
super(true);
setTitle("The my Dialog Title");
init();
}

// Disable buttons
protected JComponent createSouthPanel() {
return null;
}

protected JComponent createCenterPanel() {
return new MyDialogUI().getRootPanel();
}
}

/** Just UI bean for mapping to UI form */
class MyDialogUI {
private JPanel rootPanel;
private JTextField login;
private JPasswordField password;
private JButton okButton;
private JButton cancelButton;
}

Also create UI form mappend to MyDialogUI with root JPanel, with JTextField
mapped to login, JPasswordField mapped to password et.

Hope, this help you a little
Thanks!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bkp5tf$ibg$1@is.intellij.net...

Alexey Efimov wrote:

>

> Dialog whole or content pane?
> Now UIDesigner allow construct only content pane or root JPanel,
whitch i
> will include to your container as content pane.

>

I'm lazy, and no Swing expert, so I'm looking for the shortest path
between me and a working dialog, as for example, the "Introduce
Variable" dialog.

>

Alain

>


0
Comment actions Permalink

Alexey Efimov wrote:
> ...
> Hope, this help you a little

Thanks Alexey, it helped a lot.


This is one area where a simple wizard that would go one step further
would be helpful, creating the form and supporting class(es).

see also:
uiDesigner : create binding java class or Jxxx by intention
http://www.intellij.net/tracker/idea/viewSCR?publicId=15123


Creating fields by intention, from the form, in the supporting class,
are also much needed.


uiDesigner : add an intention to find/create matching widget in the
bound java class
http://www.intellij.net/tracker/idea/viewSCR?publicId=15127


Alain

0
Comment actions Permalink

Yes it needed features...
Alain can you, please, describe that is Intention? I already listen it a lot
from comunity, but i can't fully understand that is it.
Thank you!
--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bkpagt$ihb$1@is.intellij.net...

Alexey Efimov wrote:
> ...
> Hope, this help you a little

>

Thanks Alexey, it helped a lot.

>
>

This is one area where a simple wizard that would go one step further
would be helpful, creating the form and supporting class(es).

>

see also:
uiDesigner : create binding java class or Jxxx by intention
http://www.intellij.net/tracker/idea/viewSCR?publicId=15123

>
>

Creating fields by intention, from the form, in the supporting class,
are also much needed.

>
>

uiDesigner : add an intention to find/create matching widget in the
bound java class
http://www.intellij.net/tracker/idea/viewSCR?publicId=15127

>
>

Alain

>


0
Comment actions Permalink

Alexey Efimov wrote:

> Yes it needed features...
> Alain can you, please, describe that is Intention? I already
listen it a lot
> from comunity, but i can't fully understand that is it.

Example: adding a button
in uiDesigner,
1/ drop a button widget;
2/ go to the 'binding' field in the properties panel,
and type a value
ex: "okButton"

=> IDEA detects that there is no JButton called 'okButton',

3/ an intention pops-up, offering to create the new JButton member,
in the bound class.

Alain

0
Comment actions Permalink

Now i understand... But Intention exists in IDEA a long before it published?
As you described then ALT+Enter on Non existing class - is Intention too,
also for creating fields etc.
So, Intention as process - is "The intelligent creation of non existings
parts of code". Is it true?

Thanks!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bkpce7$fk8$1@is.intellij.net...

Alexey Efimov wrote:

>

> Yes it needed features...
> Alain can you, please, describe that is Intention? I already
listen it a lot
> from comunity, but i can't fully understand that is it.

>

Example: adding a button
in uiDesigner,
1/ drop a button widget;
2/ go to the 'binding' field in the properties panel,
and type a value
ex: "okButton"

>

=> IDEA detects that there is no JButton called 'okButton',

>

3/ an intention pops-up, offering to create the new JButton member,
in the bound class.

>

Alain

>


0
Comment actions Permalink

Alexey Efimov wrote:
> ..
> Is it true?

I'm not sure of what you meant, but my idea is to simply create a new
form, and do everything from there, simply by adding values in the
binding property field.

=> IDEA would create by intention the class, and all the required
widgets.

Alain



0
Comment actions Permalink

Sorry, my English is very bad...
I try to understand that is Intention mean as some named technology, but i
can't get exact definition about this one.
I understand that you mean relative to UI form and class binding, but i not
clearly understand that Intention is relative to other areas of programming.
10x.

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bkpdoe$o09$1@is.intellij.net...

Alexey Efimov wrote:
> ..
> Is it true?

>

I'm not sure of what you meant, but my idea is to simply create a new
form, and do everything from there, simply by adding values in the
binding property field.

>

=> IDEA would create by intention the class, and all the required
widgets.

>

Alain

>
>
>


0
Comment actions Permalink

I'm not sure of what you meant, but my idea is to
simply create a new
form, and do everything from there, simply by adding
values in the
binding property field.

=> IDEA would create by intention the class, and
and all the required
widgets.


Alain,

Are you saying that IDEA should generate some of the boilerplate code that we currently have to do by hand?

For example:

1) Generate Frame -- This would generate a class that extends JFrame and creates a default constructor that constructs the frame with the contentPane generated by the UIDesigner. It further defines a contentPane private variable of the appropriate type.

Perhaps it also creates a windowListener and does the appropriate things for closing a window.

2) Generate Binding -- Go to the bound class, and create the variable of the correct type.

There are a number of higher order ones I could envision, but these are the base ones.

Mike

0
Comment actions Permalink

Michael Kirby wrote:

> Alain,
> Are you saying that IDEA should generate some of the
> boilerplate code that we currently have to do by hand?

Yes.

>
> For example:
> ..
> There are a number of higher order ones I could envision, but
these are the base ones.

I'd be happy with the bare minimum
- no listener stuff
- enough for it to compile, and
- a main method in the frame class, to launch the form, for a
quick visual check of the result.

Alain

0
Comment actions Permalink

Are you thinking these things should be part of the Tracker numbers posted earlier? Or, should we file a new tracker?

Mike

0
Comment actions Permalink

Michael Kirby wrote:
> Are you thinking .. or, should we file a new tracker?

Except for the main() method inclusion, they are covered by my earlier
requests,
BUT
one of them is still "to be discussed", waiting for your - positive -
comments :



"to be discussed"
uiDesigner : add an intention to find/create matching widget in the
bound java class
http://www.intellij.net/tracker/idea/viewSCR?publicId=15127


open, high for Aurora
uiDesigner : create binding java class or Jxxx by intention
http://www.intellij.net/tracker/idea/viewSCR?publicId=15123


Alain

0
Comment actions Permalink

My opinion:
It's better to write your own "standard dialog" class, which most or all of
your dialogs will subclass, than to expect IDEA to generate the boilerplate
code. IMHO it's a mistake to expect a GUI builder to do everything for you.
A decent framework - whether your own, 3rd party or a combination -
supported by a GUI builder is the real way to create GUI apps efficiently.

So I don't think the GUI builder should be generating this boilerplate code.
There's very little there that you can't do with the existing file template
support anyway. For that little bit, I'd rather have suitable intentions as
you suggested.

Vil.

Alain Ravet wrote:

Michael Kirby wrote:

> Alain,
> Are you saying that IDEA should generate some of the
> boilerplate code that we currently have to do by hand?

Yes.

>
> For example:
> ..
> There are a number of higher order ones I could envision, but these
are the base ones.

I'd be happy with the bare minimum
- no listener stuff
- enough for it to compile, and
- a main method in the frame class, to launch the form, for a
quick visual check of the result.

Alain


--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/

Disclaimer

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.

0
Comment actions Permalink

Vilya Harvey wrote:

> So I don't think the GUI builder should be generating this
boilerplate
> code. There's very little there that you can't do with the
existing file
> template support anyway. For that little bit, I'd rather have
suitable
> intentions as you suggested.

Maybe I was not clear, but it's exactly what I advocate : a simple File
Template kind-of solution (subclasses JFrame, and includes a main() ) +
some intentions.

The "Simple Wizard" I mentioned could be nothing more than a form
template chooser interface.


Alain

0
Comment actions Permalink

Alain Ravet wrote:

Vilya Harvey wrote:

> So I don't think the GUI builder should be generating this boilerplate
> code. There's very little there that you can't do with the existing
file
> template support anyway. For that little bit, I'd rather have suitable
> intentions as you suggested.

Maybe I was not clear, but it's exactly what I advocate : a simple File
Template kind-of solution (subclasses JFrame, and includes a main() ) +
some intentions.

The "Simple Wizard" I mentioned could be nothing more than a form
template chooser interface.


OK, I think I understand. What you suggest is something that cuts out the
step of manually creating a class to bind the form to. Instead, you create
the form, specify a class name, then it lets you choose a suitable file
template and creates that class for you using that template. Is that right?
That sounds like a good idea.

Vil.
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/

Disclaimer

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.

0
Comment actions Permalink

Vilya Harvey wrote:
> OK, I think I understand. What you suggest is ..
> ..Is that right?

Yes, except that it's a little more complicated - than plain templating
- if the users wants to create a Dialog.

Alain

0
Comment actions Permalink

Alain Ravet wrote:

Yes, except that it's a little more complicated - than plain templating
- if the users wants to create a Dialog.


I don't understand: what is the more complicated bit? Generating suitable
variables in the class to bind UI components to? I think intentions (more
like the import warning than the regular intentions) would be better for
this. Is it generating a simple main() method, or setting up a window
listener, or something like that? All of those can be included in a file
template and would be able to compile and run without requiring any changes.
I guess there is something else that I'm not seeing..?

Vil.
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/

Disclaimer

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.

0
Comment actions Permalink

Vilya Harvey wrote:
>> Yes, except that it's a little more complicated - than plain
>> templating - if the users wants to create a Dialog.
>
> I don't understand: what is the more complicated bit? ..

Have a look a little upper in the thread, at the code sample Alexey sent me.

Alain

0
Comment actions Permalink

My opinion:
It's better to write your own "standard dialog"
class, which most or all of
your dialogs will subclass, than to expect IDEA to
generate the boilerplate
code. IMHO it's a mistake to expect a GUI builder to
do everything for you.
A decent framework - whether your own, 3rd party or a
combination -
supported by a GUI builder is the real way to
create GUI apps efficiently.

So I don't think the GUI builder should be generating
this boilerplate code.
There's very little there that you can't do with the
existing file template
support anyway. For that little bit, I'd rather have
suitable intentions as
you suggested.


THis is the same argument that people who want no gui builder use as well. I think it is a mistake to assume that the GUI builder will be used by people who work soley in large frameworks.

If we break the usages into 3 categories:

1) Large complex systems with specialized GUI frameworks

2) Small(er) simple systems that may have complex GUIs, but none of the long-term maintenance / multinational / security / remote issues that complex apps might have.

3) Rapid Prototyping.

Ideally the GUI builder will make the 3rd easy, the 2nd fairly simple, and the 3rd possible.

Right now, I think only the 2nd is possible (and not that easy). Work still needs to occur to support rapid prototyping, and #1 is just a dream.

Mike

0
Comment actions Permalink

Alain Ravet wrote:

Vilya Harvey wrote:
>> Yes, except that it's a little more complicated - than plain
>> templating - if the users wants to create a Dialog.
>
> I don't understand: what is the more complicated bit? ..

Have a look a little upper in the thread, at the code sample Alexey sent
me.


OK, I finally think I get what you mean now. The "complicated bit" is that
the form is bound to the MyDialogUI class but you want an additional class -
the MyDialog class - to be generated as well. Is that it? If so, I'm still a
little skeptical.

What I envision is an intention that would offer to create a class for you
when you specify what a UI form should be bound to (if the class doesn't
already exist). The intention would let you choose an appropriate file
template. There would then be intentions for each of the components in the GUI:

  • an intention to bind a component to a variable in the bound class if it

has no binding specified yet. This would bring up a dialog to let you
choose the field to bind it with.

  • an intention to create a new field in the bound class if the name of the

binding field for the component does not match the name of a field in the
bound class. This would allow you to choose the type for the new field,
offering a list of all suitable types in order from most specific to least
specific.

The way I see that working is
1) Create a new form file
2) Give it the name of a (non-existent) class to bind with
3) Activate the intention that creates the class to bind with. Choose the
appropriate file template. The class gets created.
4) Add components to the form in the GUI builder.
5) For each component that needs a binding, either enter a non-existent name
for the bound field and activate the intention, or activate the intention
and choose the name of an existing field.

Vil.
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/

Disclaimer

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.

0
Comment actions Permalink

On Wed, 24 Sep 2003 15:41:15 +0100, Vilya Harvey wrote:

OK, I finally think I get what you mean now. The "complicated bit" is that
the form is bound to the MyDialogUI class but you want an additional class
- the MyDialog class - to be generated as well. Is that it? If so, I'm
still a little skeptical.


Sounds like we want "form templates" as well as File Templates, So we can
create an "About Box" form template, which contains a .form and .java,
pre-bound, with the basic...


--
"It's all in the heat of the moment, it's all in the pain..." Devy.
Mark Derricutt @ mark@talios.com @ talios.blog-city.com
Now Playing: %s

0

Please sign in to leave a comment.