Search in sources :

Example 16 with LineBorder

use of org.eclipse.draw2d.LineBorder 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)

Example 17 with LineBorder

use of org.eclipse.draw2d.LineBorder in project tdi-studio-se by Talend.

the class ToolBarButtonImageFigure method addLineBorder.

private void addLineBorder() {
    if (getBorder() instanceof MarginBorder) {
        LineBorder outer = new LineBorder(ColorProviderMapper.getColor(ColorInfo.COLOR_TREE_BORDER));
        CustomCompoundBorder border = new CustomCompoundBorder(outer, getBorder());
        setBorder(border);
    }
}
Also used : MarginBorder(org.eclipse.draw2d.MarginBorder) LineBorder(org.eclipse.draw2d.LineBorder)

Example 18 with LineBorder

use of org.eclipse.draw2d.LineBorder in project knime-core by knime.

the class WorkflowAnnotationFigure method newContent.

@Override
public void newContent(final Annotation annotation) {
    super.newContent(annotation);
    AnnotationData data = annotation.getData();
    Color bg = AnnotationEditPart.RGBintToColor(data.getBgColor());
    setBackgroundColor(bg);
    m_page.setBackgroundColor(bg);
    // set border with specified annotation color
    if (data.getBorderSize() > 0) {
        Color col = AnnotationEditPart.RGBintToColor(data.getBorderColor());
        m_page.setBorder(new LineBorder(col, data.getBorderSize()));
    } else {
        m_page.setBorder(null);
    }
}
Also used : AnnotationData(org.knime.core.node.workflow.AnnotationData) Color(org.eclipse.swt.graphics.Color) LineBorder(org.eclipse.draw2d.LineBorder)

Aggregations

LineBorder (org.eclipse.draw2d.LineBorder)18 Label (org.eclipse.draw2d.Label)6 Figure (org.eclipse.draw2d.Figure)3 IFigure (org.eclipse.draw2d.IFigure)3 MarginBorder (org.eclipse.draw2d.MarginBorder)3 ToolbarLayout (org.eclipse.draw2d.ToolbarLayout)3 Image (org.eclipse.swt.graphics.Image)3 ImageFigure (org.eclipse.draw2d.ImageFigure)2 RectangleFigure (org.eclipse.draw2d.RectangleFigure)2 ScrollPane (org.eclipse.draw2d.ScrollPane)2 Point (org.eclipse.draw2d.geometry.Point)2 ECoreImage (org.talend.commons.ui.runtime.image.ECoreImage)2 SimpleHtmlFigure (org.talend.commons.ui.utils.workbench.gef.SimpleHtmlFigure)2 TableFigure (com.cubrid.common.ui.er.figures.TableFigure)1 List (java.util.List)1 Graphics (org.eclipse.draw2d.Graphics)1 MouseEvent (org.eclipse.draw2d.MouseEvent)1 MouseListener (org.eclipse.draw2d.MouseListener)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 Color (org.eclipse.swt.graphics.Color)1