DockableFrame with transparent glasspane

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

DockableFrame with transparent glasspane

Postby jeo » Thu Apr 24, 2014 8:36 am

I have a solution to display a waiting panel (typical with an spinning wheel) in swing Frames, when I try to use the same solution with DockableFrame it doesn't work anymore, I know Dockable frame doesn't extend Frame or any other swing Frame related classes, but it has the method setGlassPane so there should have a similar functionality.

To get the transparency I'm setting a JPanel as a glass pane, where i set the background color and redefine the following method:

Code: Select all
@Override
   protected Graphics getComponentGraphics(Graphics g) {
      g = super.getComponentGraphics(g);
      Graphics2D g2d = (Graphics2D) g;
                g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.03f));
      return g2d;
   }


Can someone advice about any other way to achieve transparency using a glass pane in DockableFrame. I'm also having issues displaying the gif image in the glass pane but first thing first.

Thanks,

J
jeo
 
Posts: 3
Joined: Wed Mar 05, 2014 7:03 am

Re: DockableFrame with transparent glasspane

Postby JIDE Support » Thu Apr 24, 2014 9:42 am

Unfortunately DockableFrame got the method because it uses JRootPane which has glass pane. However it doesn't provide any code to support the glass pane. You may use JLayeredPane which DockableFrame does support.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: Google [Bot] and 7 guests