use of org.eclipse.draw2d.ToolbarLayout in project archi by archimatetool.
the class DrawerFigure method setLayoutMode.
public void setLayoutMode(int layoutMode) {
if (this.layoutMode == layoutMode) {
return;
}
this.layoutMode = layoutMode;
LayoutManager manager;
if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
manager = new ColumnsLayout();
getContentPane().setBorder(SCROLL_PANE_BORDER);
} else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS) {
PaletteContainerFlowLayout fl = new PaletteContainerFlowLayout();
fl.setMinorSpacing(0);
fl.setMajorSpacing(0);
manager = fl;
getContentPane().setBorder(SCROLL_PANE_BORDER);
} else {
manager = new ToolbarLayout();
getContentPane().setBorder(SCROLL_PANE_LIST_BORDER);
}
getContentPane().setLayoutManager(manager);
}
use of org.eclipse.draw2d.ToolbarLayout in project archi by archimatetool.
the class GroupEditPart method refreshVisuals.
/**
* @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
*/
@Override
protected void refreshVisuals() {
int layout = getLayoutSetting();
if (cachedLayout == layout)
return;
cachedLayout = layout;
LayoutManager manager;
if (layout == PaletteViewerPreferences.LAYOUT_COLUMNS) {
manager = new ColumnsLayout();
getContentPane().setBorder(SCROLL_PANE_BORDER);
} else if (layout == PaletteViewerPreferences.LAYOUT_ICONS) {
PaletteContainerFlowLayout flow = new PaletteContainerFlowLayout();
flow.setMajorSpacing(0);
flow.setMinorSpacing(0);
manager = flow;
getContentPane().setBorder(SCROLL_PANE_BORDER);
} else {
manager = new ToolbarLayout();
getContentPane().setBorder(SCROLL_PANE_LIST_BORDER);
}
getContentPane().setLayoutManager(manager);
}
use of org.eclipse.draw2d.ToolbarLayout in project xtext-eclipse by eclipse.
the class RailroadDiagram method createLayoutManager.
@Override
protected LayoutManager createLayoutManager() {
ToolbarLayout layout = new ToolbarLayout();
layout.setSpacing(ILayoutConstants.VSPACE_BETWEEN_TRACKS);
return layout;
}
use of org.eclipse.draw2d.ToolbarLayout in project jbosstools-hibernate by jbosstools.
the class NodeHeaderFigure method addEmbeddedParent.
private void addEmbeddedParent(String nodeName, String nodeType, String iconDescriptor, boolean hideName) {
embeddedFigure = new Figure();
ToolbarLayout layout = new ToolbarLayout(true);
layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
embeddedFigure.setLayoutManager(layout);
addIconLabel(iconDescriptor);
addTypeAndNameColumn(nodeType, nodeName, hideName);
add(embeddedFigure);
}
Aggregations