Problem after rezising dockables

Hello,

i think i found a bug.

I tested it in my own programm and in the “docking-frames-demo-tutorial.jar”. You have to startup the theme example programm. You have to move the border between the green and the blue border in any direction. (you jave to repeat this process because sometimes it works successfully) Normally the cursor must change after moving the border from double arrow to single arrow. But sometimes the cursor keeps this look. Then you have to put the cursur in the border area( and after that outside of the border area )to get a single arrow.

I hope you unterstand my problem!

Yes, that is a bug, and you are not the first who finds it. There are already about 5 patches for this problem (from me and from other developers), but none of them ever fixed the issue for 100% . But I also have to admit, that I did not look at this issue for some time now.

Any idea to fix this is welcome :wink:

Ah…ok.

Thank you for fast responding!

Is it possible to deactivate the double arrwo? I mean if i want to rezise a dockable there is just the single arrow available.

Not at the moment. But I can add a property to change/disable the cursor in the next version.

That whould be great!

Thank you very much!

With 1.1.1p5b you can set a custom SplitDividerStrategy. In the example below is a strategy that disables the cursor.


import java.awt.Cursor;

import javax.swing.JFrame;

import bibliothek.gui.dock.SplitDockStation;
import bibliothek.gui.dock.common.CContentArea;
import bibliothek.gui.dock.common.CControl;
import bibliothek.gui.dock.common.CGrid;
import bibliothek.gui.dock.common.DefaultSingleCDockable;
import bibliothek.gui.dock.station.split.DefaultSplitDividerStrategy;

public class Dock66 {
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        final CControl control = new CControl(frame);
        CContentArea contentArea = control.getContentArea();
        
        final DefaultSingleCDockable dockable1 = new DefaultSingleCDockable("1");
        final DefaultSingleCDockable dockable2 = new DefaultSingleCDockable("2");
        final DefaultSingleCDockable dockable3 = new DefaultSingleCDockable("3");
        final DefaultSingleCDockable dockable4 = new DefaultSingleCDockable("4");
        
        control.putProperty( SplitDockStation.DIVIDER_STRATEGY, new DefaultSplitDividerStrategy(){
        	@Override
        	protected Handler createHandlerFor( SplitDockStation station ){
	        	return new Handler( station ){
	        		@Override
	        		protected void setCursor( Cursor cursor ){
		        		// just ignore
	        		}
	        	};
        	}
        });
        
        final CGrid grid = new CGrid(control);
        grid.add( 0, 0, 1, 1, dockable1 );
        grid.add( 1, 0, 1, 1, dockable2 );
        grid.add( 2, 0, 3, 1, dockable3 );
        grid.add( 5, 0, 1, 1, dockable4 );
        contentArea.deploy( grid );
        
        frame.add(contentArea);
        frame.setSize(500, 500);
        frame.setVisible(true);
    }
}```

Thats great! Thank you so much!