Skip to main content

Experimenting with internal frames

Posted by kirillcool on September 20, 2006 at 9:49 AM PDT

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?

Related Topics >>