Hi,
I need by default to display an icon and a text for all dockables in a StackDockStation
Is there any property to set? or I should use the TabContentFilter? Could you please advice?
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import bibliothek.extension.gui.dock.theme.EclipseTheme;
import bibliothek.gui.DockController;
import bibliothek.gui.dock.DefaultDockable;
import bibliothek.gui.dock.StackDockStation;
/*
* There are various themes which can be used. This demo shows
* how to include them.
*/
public class Demo03_Theme {
public Demo03_Theme() {
// create a frame
JFrame frame = new JFrame("Demo");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setSize(600, 500);
DockController controller = new DockController();
controller.setTheme(new EclipseTheme());
// some stations
StackDockStation station = new StackDockStation();
frame.add(station.getComponent(), BorderLayout.CENTER);
controller.add(station);
// create two panels
JPanel black = new JPanel();
black.setBackground(Color.BLACK);
black.setOpaque(true);
JPanel green = new JPanel();
green.setBackground(Color.GREEN);
green.setOpaque(true);
DefaultDockable blackDockable = new DefaultDockable(black, "Black");
blackDockable.setTitleIcon(new ImageIcon(getClass().getClassLoader().getResource("demo/flap_south.png")));
station.drop(blackDockable);
station.drop(new DefaultDockable(green, "Green"));
frame.setVisible(true);
}
public static void main(String[] args) {
new Demo03_Theme();
}
}
Thank you,