Where The Streets Have No Name

docking frames 예제(1-1) 본문

Developement/Java

docking frames 예제(1-1)

highheat 2009. 11. 12. 14:44
private void initDockFrontend() {
        DockController controller = new DockController();
        DockFrontend frontend = new DockFrontend(controller, getFrame());
        SplitDockStation station = new SplitDockStation();

        getFrame().add(station.getComponent());
        frontend.addRoot("station", station);

        SplitDockGrid grid = new SplitDockGrid();
        grid.addDockable(0, 0, 1, 1, createDockable("Red", Color.RED));
        grid.addDockable(0, 1, 1, 1, createDockable("Green", Color.GREEN));
        grid.addDockable(1, 0, 1, 1, createDockable("Blue", Color.BLUE));
        grid.addDockable(1, 1, 1, 1, createDockable("Yellow", Color.YELLOW));
        station.dropTree(grid.toTree());

        controller.setTheme(new EclipseTheme());
        controller.getProperties().set(EclipseTheme.TAB_PAINTER, RectGradientPainter.FACTORY);
}