Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Form on JInternalFrame?

  1. #1
    Join Date
    Nov 2004
    Posts
    14

    Default Form on JInternalFrame?

    Hello,

    I'm a new Spring user. I want to know if forms can be displayed in Internal frames? I currently have a form displayed on a modal TitledPageApplicationDialog. Basically, I don't want the form to be modal and in an internal frame. Is there a similar class that can display the form content and message like TitledPageApplicationDialog but on a internal frame?

    Thanks in advance.
    Henry

  2. #2

    Default Re: Form on JInternalFrame?

    Quote Originally Posted by hszetu
    I want to know if forms can be displayed in Internal frames?
    Seems is possible. Example, create Form, call Form.getControl() and then put return value on JInternalFrame's content pane.

    Quote Originally Posted by hszetu
    I currently have a form displayed on a modal TitledPageApplicationDialog. Basically, I don't want the form to be modal and in an internal frame.
    You want something like dialog but not modal? Why you doing this? I mean, what is use case, really? I am wondering this.

    Quote Originally Posted by hszetu
    Is there a similar class that can display the form content and message like TitledPageApplicationDialog but on a internal frame?
    So what you saying is you want a JInternalFrame to contain you form instead of a Dialog but you want it to have similar services as TitledPageApplicationDialog (example, displaying of RulesSource validation messages for bad data on Form)? I think, what you need is something like a TitledPageJInternalFrame. I'm sure this sort of class doesn't exist in Spring Rich Client.

    KEITH or OLLIE: Is possible for you to make some sort of TitledPageJInternalFrame? Or maybe you can suggesting some sort of workaround for hszetu?
    Stefano Rossi

    "If I want your opinion, I'll give it to you."

  3. #3
    Join Date
    Nov 2004
    Posts
    14

    Default Re: Form on JInternalFrame?

    Thanks Stefano, that's exactly what I want. So, there isn't a class like that for JInternalFrame. Will it be considered to be added to Spring RCP in the future?

    Quote Originally Posted by steve_smith
    Seems is possible. Example, create Form, call Form.getControl() and then put return value on JInternalFrame's content pane.
    Thanks for the tip, Stefano. I can get the form content this way and put it on a JIternalFrame. But this does not includes the titled area with the message.

    For example, in Petclinic's "Owner Properties" Dialog, the titled area at the top of the dialog says "Owner Properties - Enter the details of the pet owner below".
    And when you enter a First Name that is too long, the titled area says "First Name must be no more than 25 characters."
    I want that titled area as well. Is there any way to have my internal frame to have the same content as in the dialog?

    Quote Originally Posted by steve_smith
    You want something like dialog but not modal? Why you doing this? I mean, what is use case, really? I am wondering this.
    Basically, the app that I'm working on is a MDI application. It uses JDesktopPane and all forms have to be displayed in internal frames on the desktop. The app can have multiple desktops. When a modal dialog is shown, it is only modal to the desktop pane, not to the whole application. User may still be able to switch to other desktop and work on something else. So, we use mostly JInternalFrames. We have our own ways to make the internal frame modal.

    Thanks for your help
    Henry

  4. #4
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    It would be perfectly possible to create an ApplicationPage implementation that uses a JDesktopPane and JInternalFrames for layout.

    I'll try to put something together, keep an eye on this post.

    Peter

  5. #5
    Join Date
    Nov 2004
    Posts
    14

    Default

    Thank you so much, Peter. You are my savior. I will keep an eye on this post.

    Thanks to all of you for your help. :wink:

  6. #6
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    I created a JIRA issue that contains classes to use JInternalFrames as "viewing mechanism": http://opensource.atlassian.com/proj.../browse/RCP-56

    Hope this helps,

    Peter

  7. #7
    Join Date
    Nov 2004
    Posts
    14

    Default

    Thanks Peter,

    That really helps in allowing us to use JInternalFrame for our application. I especially likes your ScrollingDesktopPane implementation. That's COOL, way better than the swing default desktop manager

    By the way, I noticed that the application dialogs that are invoked when one selects a record and hits "Properties" (for example) are still application modal in a separate JDialog. It appears that the class responsible for this is TitledPageApplicationDialog which ultimately uses a JDialog.

    Would it be possible to make similar implementation like TitledPageApplicationDialog that uses a JInternalFrame?

    I realize there isn't a default way of making internal frames modal, but I have a way of doing that (namely using the glassPane) already.

    Any help would be much appreciated!

  8. #8
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    Credits for the ScrollingDesktopPanel should go to http://www.javaworld.com/javaworld/j...-0525-mdi.html (I got the initial code from there)


    For the dialog that uses a JInternalFrame: I had a look, but it's not trivial to implement this behaviour. The simplest way (but not the best!) is to copy the code from TitledPageApplicationDialog and it's superclasses (TitledApplicationDialog and ApplicationDialog), and construct a modal JInternalFrame instead of a JDialog.

  9. #9
    Join Date
    Dec 2004
    Location
    Buenos Aires, Argentina
    Posts
    73

    Default error when compiling rcp-56

    Hi all,
    First of all, Great framework!

    Im trying to compile Peters jira code rcp-56. There is an error with the fireFocuLost event that is actually stopping us. Ani ideas? Thanks in advance!

    Gustavo Faerman
    Buenos Aires,
    Argentina.


    Code:
                public void internalFrameDeactivated(InternalFrameEvent arg0) {
                    applicationPage.fireFocusLost(pageComponent);
    "DesktopPageComponentPane.java": fireFocusGained(org.springframework.richclient.app lication.PageComponent) has protected access in org.springframework.richclient.application.support .AbstractApplicationPage at line 40, column 33

  10. #10
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    the method fireFocusLost is protected, and I think you moved the DesktopPageComponentPane to another package, thus losing the possibility to call it.

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 6
    Last Post: Sep 22nd, 2006, 09:08 AM
  3. Replies: 9
    Last Post: May 4th, 2006, 09:53 AM
  4. Replies: 0
    Last Post: Jun 10th, 2005, 08:22 AM
  5. Replies: 0
    Last Post: Jan 27th, 2005, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •