use of org.eclipse.draw2d.MarginBorder in project dbeaver by serge-rider.
the class ERDOutlinePage method createControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
// create canvas and lws
overview = new Canvas(parent, SWT.NONE);
LightweightSystem lws = new LightweightSystem(overview);
// create thumbnail
thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
thumbnail.setBorder(new MarginBorder(3));
thumbnail.setSource(rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
lws.setContents(thumbnail);
}
use of org.eclipse.draw2d.MarginBorder in project tdi-studio-se by Talend.
the class GlobalMapKeysTable method createColumns.
/*
* (non-Javadoc)
*
* @see org.talend.designer.gefabstractmap.figures.table.AbstractTable#createColumns()
*/
@Override
protected void createColumns() {
layoutManager.setAjustToTableWidth(false);
if (inputxmlTree != null && inputxmlTree.isLookup()) {
expressionColumn = new TableColumn(ColumnKeyConstant.KEY_EXPRESSION);
expressionColumn.setText(Messages.getString("InputTreeGlobalMapKeysTable.expressionTitle"));
addColumn(expressionColumn);
columnSash = new ColumnSash(this);
columnSash.setLeftColumn(expressionColumn);
addSeparator(columnSash);
globalMapKeyColumn = new TableColumn(ColumnKeyConstant.KEY_NAME);
globalMapKeyColumn.setText(Messages.getString("InputTreeGlobalMapKeysTable.globalMapKeyTitle"));
columnSash.setRightColumn(globalMapKeyColumn);
addColumn(globalMapKeyColumn);
columnSash = new ColumnSash(this);
columnSash.setLeftColumn(globalMapKeyColumn);
addSeparator(columnSash);
addColumn = new TableColumn(ColumnKeyConstant.KEY_VARIABLE);
addColumn.setIcon(ImageProviderMapper.getImage(ImageInfo.ADD));
addColumn.setLabelAlignment(PositionConstants.BOTTOM);
columnSash.setRightColumn(addColumn);
addColumn.setBorder(new MarginBorder(2));
addColumn(addColumn);
// add Listener
addColumn.addMouseListener(new MouseListener() {
@Override
public void mousePressed(MouseEvent me) {
GlobalMapNode defaultGlobalMapNode = XmlmapFactory.eINSTANCE.createGlobalMapNode();
defaultGlobalMapNode.setExpression("");
defaultGlobalMapNode.setName("\"myKey\"");
inputxmlTree.getGlobalMapKeysValues().add(defaultGlobalMapNode);
}
@Override
public void mouseReleased(MouseEvent me) {
}
@Override
public void mouseDoubleClicked(MouseEvent me) {
}
});
}
}
use of org.eclipse.draw2d.MarginBorder in project tdi-studio-se by Talend.
the class TalendDrawerFigure method getTitleBorder.
protected Border getTitleBorder() {
Insets insets = cssStyleSetting.getTitleMarginBorder().getInsets(null);
Border talendTitleBorder = new MarginBorder(insets.top, insets.left + customizedCSSStyleSetting.getXOffset() * childLevel, insets.bottom, insets.right);
return talendTitleBorder;
}
use of org.eclipse.draw2d.MarginBorder in project tdi-studio-se by Talend.
the class MapperRootEditPart method createFigure.
@Override
protected IFigure createFigure() {
Figure mainFigure = new Figure();
XmlMapDataLayout manager2 = new XmlMapDataLayout(getRootModelManager().getGraphicalViewer());
mainFigure.setLayoutManager(manager2);
// input
Figure inputZone = new Figure();
inputZone.setLayoutManager(new ZoneLayout());
inputToolBar = createInputZoneToolBar();
inputToolBar.setBorder(new LineBorder(ColorProviderMapper.getColor(ColorInfo.COLOR_TREE_BORDER)));
inputZone.add(inputToolBar);
inputScroll = new ScrollPane();
inputScroll.setHorizontalScrollBarVisibility(ScrollPane.NEVER);
leftFigure = new Figure();
// ToolbarLayout subManager = new ToolbarLayout();
ToolbarLayout subManager = createZoneContentLayout();
subManager.setSpacing(20);
subManager.setVertical(true);
leftFigure.setLayoutManager(subManager);
leftFigure.setBorder(new MarginBorder(20, 40, 20, 40));
inputScroll.getViewport().setContents(leftFigure);
inputScroll.getViewport().setContentsTracksWidth(true);
inputZone.add(inputScroll);
mainFigure.add(inputZone);
// separator 1
SashSeparator separatorLeft = new SashSeparator();
separatorLeft.setImage(ImageProviderMapper.getImage(ImageInfo.ZONE_SASH));
mainFigure.add(separatorLeft);
// search , var
searchToolBar = createSearchZoneToolBar();
searchToolBar.setBorder(new LineBorder(ColorProviderMapper.getColor(ColorInfo.COLOR_TREE_BORDER)));
varScroll = new ScrollPane();
varScroll.setHorizontalScrollBarVisibility(ScrollPane.NEVER);
centerFigure = new Figure();
subManager = createZoneContentLayout();
subManager.setSpacing(20);
subManager.setVertical(true);
centerFigure.setLayoutManager(subManager);
centerFigure.setBorder(new MarginBorder(10, 40, 10, 40));
varScroll.getViewport().setContents(centerFigure);
varScroll.getViewport().setContentsTracksWidth(true);
centerFigure.add(searchToolBar);
mainFigure.add(varScroll);
// separetor 2
SashSeparator separatorRight = new SashSeparator();
separatorRight.setImage(ImageProviderMapper.getImage(ImageInfo.ZONE_SASH));
mainFigure.add(separatorRight);
// output
Figure outputZone = new Figure();
outputZone.setLayoutManager(new ZoneLayout());
outputToolBar = createOutputZoneToolBar();
outputToolBar.setBorder(new LineBorder(ColorProviderMapper.getColor(ColorInfo.COLOR_TREE_BORDER)));
outputZone.add(outputToolBar);
outputScroll = new ScrollPane();
outputScroll.setHorizontalScrollBarVisibility(ScrollPane.NEVER);
rightFigure = new Figure();
subManager = createZoneContentLayout();
subManager.setSpacing(20);
subManager.setVertical(true);
rightFigure.setLayoutManager(subManager);
rightFigure.setBorder(new MarginBorder(20, 40, 20, 40));
outputScroll.getViewport().setContents(rightFigure);
outputScroll.getViewport().setContentsTracksWidth(true);
outputZone.add(outputScroll);
mainFigure.add(outputZone);
mainFigure.setOpaque(true);
mainFigure.setBackgroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_BACKGROUND_LINKS_ZONE));
separatorLeft.setLeftFigure(inputZone);
separatorLeft.setRightFigure(varScroll);
separatorLeft.setParentFigure(mainFigure);
separatorRight.setLeftFigure(varScroll);
separatorRight.setRightFigure(outputZone);
separatorRight.setParentFigure(mainFigure);
return mainFigure;
}
use of org.eclipse.draw2d.MarginBorder in project tdi-studio-se by Talend.
the class FilterContainer method createContent.
private void createContent() {
FilterContainerLayout manager = new FilterContainerLayout();
manager.setVertical(false);
manager.setSpacing(5);
setLayoutManager(manager);
textArea = new FilterTextArea();
textArea.setText(tableManager.getExpressionFilter());
this.add(textArea);
textArea.setOpaque(true);
setBackgroundColor(ColorConstants.white);
button = new ImageFigure(ImageProviderMapper.getImage(ImageInfo.FILTER_BUTTON));
addButtonListener();
this.add(button);
setOpaque(true);
setBackgroundColor(ColorConstants.yellow);
setBorder(new MarginBorder(2));
}
Aggregations