Hi Beni,
I noticed a bug in the focus system in the Eclipse theme.
If you run the example below and focus the first text field outside dockable,
you can cycle through all 3 text fields with the tab.
When you start with the first text field inside dockable it stops at the last text field (no cycle).
If you try the same example in the Flat theme, after the last text field the focus goes
to docking buttons and then back to the text fields.
Would it be possible to make the focusing of the docking buttons optional?
The reason is that I sometimes put the same component inside a dockable
and sometimes in a modal JDialog.
With focusing of the docking buttons switched off I could get consistent behavior -
the JDialog only focuses the components inside it…
kind regards,
Maciej Modelski
package test;
import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import bibliothek.gui.dock.common.CControl;
import bibliothek.gui.dock.common.CGrid;
import bibliothek.gui.dock.common.CWorkingArea;
import bibliothek.gui.dock.common.DefaultSingleCDockable;
import bibliothek.gui.dock.common.theme.ThemeMap;
import bibliothek.gui.dock.util.Priority;
import bibliothek.gui.dock.util.color.ColorManager;
public class TabTest2
{
public static void main(String[] args)
{
JFrame frame = new JFrame("Test");
frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS));
CControl control = new CControl(frame);
control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
frame.add(control.getContentArea());
JPanel p1 = new JPanel();
p1.setBorder(BorderFactory.createTitledBorder("Outside dockable"));
p1.setLayout(new BoxLayout(p1, BoxLayout.Y_AXIS));
p1.add(new JTextField());
p1.add(new JTextField());
p1.add(new JTextField());
frame.add(p1);
CWorkingArea work = control.createWorkingArea("work");
work.setVisible(true);
work.setMaximizingArea(true);
work.getStation().setContinousDisplay(true);
ColorManager colors = control.getController().getColors();
colors.put(Priority.CLIENT, "paint.insertion.area", Color.RED);
CGrid grid = new CGrid(control);
JPanel p = new JPanel();
p.setBorder(BorderFactory.createTitledBorder("Inside dockable"));
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
p.add(new JTextField());
p.add(new JTextField());
p.add(new JTextField());
DefaultSingleCDockable d1 = new DefaultSingleCDockable("work 1", "Work 1", p);
d1.setCloseable(true);
grid.add(0, 0, 1, 1, d1);
work.deploy(grid);
frame.setBounds(20, 20, 600, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}