Problem with DefaultDialogDockableBarDockableHolder

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Problem with DefaultDialogDockableBarDockableHolder

Postby nicola.gioia » Fri Oct 06, 2006 6:59 am

When I use the DefaultDialogDockableBarDockableHolder class as a dialog on my application I have two problems:

    - The setModal(true) seems not have effect (the window created is not modal)
    - If i try to make floatable a CommandBar by mouse dragging I have problems because the mouse position differ from the CommandBar position once the commandBar become float


To reproduce the problem tou can try to use the above example:
Code: Select all
import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

import com.jidesoft.action.*;
import com.jidesoft.swing.JideSwingUtilities;


public class DefaultDialogDockableBarDockableHolderBug extends DefaultDialogDockableBarDockableHolder {

   public DefaultDialogDockableBarDockableHolderBug(Frame parent) {
      super(parent);
      init();
   }

   private void init() {
      getLayoutPersistence().setProfileKey("bug.test");
      
      getLayoutPersistence().beginLoadLayoutData();
      this.getDockableBarManager().addDockableBar(CommandBarFactory.createLookAndFeelCommandBar(this));
         
         JTextArea ta = new JTextArea("test test test test\n test test test test\n"+
               "test test test test\n test test test test\n"+
               "test test test test\n test test test test\n"+
               "test test test test\n test test test test\n");
         getDockingManager().getWorkspace().add(ta,BorderLayout.CENTER);
      
      getLayoutPersistence().loadLayoutData();
      
      
   }
   public static void main(String[] args) {
      final JFrame f = new JFrame("test");
      JButton b = new JButton("show dialog");
      b.addActionListener(new ActionListener(){
         public void actionPerformed(ActionEvent e) {
            DefaultDialogDockableBarDockableHolderBug b = new DefaultDialogDockableBarDockableHolderBug(f);
            b.setLocationRelativeTo(f);
            b.setModal(true);
            b.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            b.setVisible(true);
         }
      });
      
      f.getContentPane().add(b);
      
      f.pack();
      JideSwingUtilities.globalCenterWindow(f);
      f.setVisible(true);
   }
   
}
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am

Postby JIDE Support » Fri Oct 06, 2006 8:54 am

I believe setModal need to be called before the dialog is visible. What you probably don't know is loadLayoutData will make the dialog visible. So you can change the code to

Code: Select all
      setModal(true);
      getLayoutPersistence().loadLayoutData();

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby nicola.gioia » Mon Oct 09, 2006 1:28 am

Ok.
The problem of the CommandBar floated by mouse dragging?
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am

Postby JIDE Support » Mon Oct 09, 2006 8:19 am

We can reproduce that problem and will try to fix for next patch release.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby JIDE Support » Mon Oct 09, 2006 12:59 pm

Just so you know, 1.9.3.02 is released which fixed this dragging command bar bug.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby nicola.gioia » Wed Oct 11, 2006 1:20 am

Thanks!
nicola.gioia
 
Posts: 60
Joined: Tue Sep 20, 2005 6:57 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 82 guests