The Source for Java Technology Collaboration
User: Password:



Kirill Grouchnikov

Kirill Grouchnikov's Blog

Experimenting with internal frames

Posted by kirillcool on September 20, 2006 at 09:49 AM | Comments (3)

Once in a while i skim the Swing-related forums to see what people are asking. Most of the time it's pretty basic stuff that is documented in the tutorials, but sometimes the requests pose a non-trivial problem. After reading this entry about "immobilizing" internal frames and various proposed solutions, i decided to spend the weekend (actually i thought it would take less) adding this as an experimental feature to the latest dev drop of Substance look and feel.

The title pane of internal frames has an additional button that allows "pinning" the internal frame (moving and resizing are disabled). In addition, the SubstanceLookAndFeel.PERMANENTLY_PINNED property can be set on a JInternalFrame to indicate that the internal frame is permanently pinned (value should be Boolean.TRUE in this case).

The following screenshot shows an internal frame in six different states:

  1. Unpinned - the default.
  2. Pinned - user clicked on the pin button and it is selected.
  3. Permanently pinned - using the property above. The pin button can't be clicked.
  4. Unpinned with additional custom buttons (using SubstanceLookAndFeel.setRootPaneCustomTitleButtons API).
  5. Pinned with additional custom buttons (using SubstanceLookAndFeel.setRootPaneCustomTitleButtons API).
  6. Permanently pinned with additional custom buttons (using SubstanceLookAndFeel.setRootPaneCustomTitleButtons API).
internal-frames-pin.png

What do you think?


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • That's an interesting idea...should pinning a frame affect the ability to setAlwaysOnTop or even the ability to close a window?DB

    Posted by: dblair on September 20, 2006 at 11:26 AM

  • dblair - since JInternalFrame is not a Window, it doesn't have the setAlwaysOnTop method. I'm also not sure about closing the window - it seems that you're talking more about undisposable modal dialogs and not pinned internal frames.

    Posted by: kirillcool on September 20, 2006 at 11:30 AM

  • Ahh...you are correct. My mind blocked out every "internal" reference and I just kept thinking JFrame, JFrame...DB

    Posted by: dblair on September 21, 2006 at 11:07 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds