Search in sources :

Example 1 with TableContainerLayout

use of org.talend.designer.gefabstractmap.figures.layout.TableContainerLayout in project tdi-studio-se by Talend.

the class AbstractTableContainer method createContents.

protected void createContents() {
    setLayoutManager(new TableContainerLayout(tableModelManager));
    this.setBorder(new LineBorder(ColorProviderMapper.getColor(ColorInfo.COLOR_TREE_BORDER)));
    header = new Figure();
    header.setOpaque(true);
    header.setBackgroundColor(ColorConstants.tooltipBackground);
    header.setBorder(new RowBorder());
    header.setLayoutManager(new EqualWidthLayout());
    Label tableName = new Label();
    // tableName.setBorder(new LineBorder(ColorConstants.black));
    tableName.setText(getTreeDisplayName());
    tableName.setFont(FontProviderMapper.getFont(FontInfo.FONT_SYSTEM_BOLD));
    tableName.setLabelAlignment(PositionConstants.LEFT);
    tableName.setBorder(new MarginBorder(5, 10, 5, -1));
    header.add(tableName);
    toolBarContainer = createToolBarContainer();
    header.setOpaque(true);
    header.setBackgroundColor(ColorProviderMapper.getColor(ColorInfo.ZONE_BACKGROUND_COLOR));
    this.add(header);
    if (toolBarContainer != null) {
        header.add(toolBarContainer);
    }
    createTreeSettings(this);
    if (withScroll) {
        ScrollPane scroll = new ScrollPane();
        scroll.setVerticalScrollBarVisibility(ScrollPane.NEVER);
        scroll.getViewport().setContents(createTable());
        scroll.getViewport().setContentsTracksWidth(true);
        // ///
        scroll.setBackgroundColor(ColorConstants.white);
        scroll.setOpaque(true);
        this.add(scroll);
    } else {
        this.add(createTable());
    }
}
Also used : RowBorder(org.talend.designer.gefabstractmap.figures.borders.RowBorder) ScrollPane(org.eclipse.draw2d.ScrollPane) LineBorder(org.eclipse.draw2d.LineBorder) MarginBorder(org.eclipse.draw2d.MarginBorder) Label(org.eclipse.draw2d.Label) TableContainerLayout(org.talend.designer.gefabstractmap.figures.layout.TableContainerLayout) EqualWidthLayout(org.talend.designer.gefabstractmap.figures.layout.EqualWidthLayout) IFigure(org.eclipse.draw2d.IFigure) GenericFigure(org.talend.designer.gefabstractmap.figures.GenericFigure) Figure(org.eclipse.draw2d.Figure)

Aggregations

Figure (org.eclipse.draw2d.Figure)1 IFigure (org.eclipse.draw2d.IFigure)1 Label (org.eclipse.draw2d.Label)1 LineBorder (org.eclipse.draw2d.LineBorder)1 MarginBorder (org.eclipse.draw2d.MarginBorder)1 ScrollPane (org.eclipse.draw2d.ScrollPane)1 GenericFigure (org.talend.designer.gefabstractmap.figures.GenericFigure)1 RowBorder (org.talend.designer.gefabstractmap.figures.borders.RowBorder)1 EqualWidthLayout (org.talend.designer.gefabstractmap.figures.layout.EqualWidthLayout)1 TableContainerLayout (org.talend.designer.gefabstractmap.figures.layout.TableContainerLayout)1