Search in sources :

Example 1 with ColumnsLayout

use of org.eclipse.gef.internal.ui.palette.editparts.ColumnsLayout in project tdi-studio-se by Talend.

the class TalendDrawerFigure method setLayoutMode.

@Override
public void setLayoutMode(int layoutMode) {
    if (this.talendLayoutMode == layoutMode) {
        return;
    }
    this.talendLayoutMode = layoutMode;
    LayoutManager manager;
    if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
        manager = new ColumnsLayout();
        getContentPane().setBorder(customizedCSSStyleSetting.getScrollPaneBorder());
    } else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS) {
        PaletteContainerFlowLayout fl = new PaletteContainerFlowLayout();
        fl.setMinorSpacing(0);
        fl.setMajorSpacing(0);
        manager = fl;
        getContentPane().setBorder(customizedCSSStyleSetting.getScrollPaneBorder());
    } else {
        manager = new ToolbarLayout();
        getContentPane().setBorder(customizedCSSStyleSetting.getScrollPaneListBorder());
    }
    getContentPane().setLayoutManager(manager);
}
Also used : ToolbarLayout(org.eclipse.draw2d.ToolbarLayout) LayoutManager(org.eclipse.draw2d.LayoutManager) ColumnsLayout(org.eclipse.gef.internal.ui.palette.editparts.ColumnsLayout) PaletteContainerFlowLayout(org.eclipse.gef.internal.ui.palette.editparts.PaletteContainerFlowLayout)

Aggregations

LayoutManager (org.eclipse.draw2d.LayoutManager)1 ToolbarLayout (org.eclipse.draw2d.ToolbarLayout)1 ColumnsLayout (org.eclipse.gef.internal.ui.palette.editparts.ColumnsLayout)1 PaletteContainerFlowLayout (org.eclipse.gef.internal.ui.palette.editparts.PaletteContainerFlowLayout)1