use of com.archimatetool.editor.diagram.figures.IconicDelegate in project archi by archimatetool.
the class NoteFigure method setUI.
@Override
protected void setUI() {
setLayoutManager(new GridLayout());
FlowPage page = new FlowPage();
fTextFlow = new TextFlow();
fTextFlow.setLayoutManager(new ParagraphTextLayout(fTextFlow, ParagraphTextLayout.WORD_WRAP_SOFT));
page.add(fTextFlow);
setOpaque(true);
GridData gd = new GridData(SWT.LEFT, SWT.TOP, true, true);
add(page, gd);
fTextPositionDelegate = new TextPositionDelegate(this, page, getDiagramModelObject());
setIconicDelegate(new IconicDelegate(getDiagramModelObject()));
}
use of com.archimatetool.editor.diagram.figures.IconicDelegate in project archi by archimatetool.
the class IconSection method refreshPreviewImage.
private void refreshPreviewImage() {
// Check also if the selected object has been orphaned in case the Properties View is still showing the object if it has the focus
if (isAlive(getFirstSelectedObject())) {
disposeImage();
// Use an IconicDelegate to create the image which may come from the object or via a profile image
IconicDelegate iconicDelegate = new IconicDelegate((IIconic) getFirstSelectedObject());
iconicDelegate.updateImage();
fImage = iconicDelegate.getImage();
fCanvas.redraw();
}
}
use of com.archimatetool.editor.diagram.figures.IconicDelegate in project archi by archimatetool.
the class CanvasBlockFigure method setUI.
@Override
protected void setUI() {
setLayoutManager(new DelegatingLayout());
Locator mainLocator = new Locator() {
@Override
public void relocate(IFigure target) {
Rectangle bounds = getBounds().getCopy();
translateFromParent(bounds);
target.setBounds(bounds);
}
};
FlowPage flowPage = new FlowPage();
fTextFlow = new TextFlow();
fTextFlow.setLayoutManager(new ParagraphTextLayout(fTextFlow, ParagraphTextLayout.WORD_WRAP_HARD));
flowPage.add(fTextFlow);
Figure textWrapperFigure = new Figure();
textWrapperFigure.setLayoutManager(new GridLayout());
textWrapperFigure.add(flowPage, new GridData(SWT.CENTER, SWT.CENTER, true, true));
add(textWrapperFigure, mainLocator);
fTextPositionDelegate = new TextPositionDelegate(textWrapperFigure, flowPage, getDiagramModelObject());
// This last
add(getMainFigure(), mainLocator);
setIconicDelegate(new IconicDelegate(getDiagramModelObject(), MAX_ICON_SIZE));
}
use of com.archimatetool.editor.diagram.figures.IconicDelegate in project archi by archimatetool.
the class CanvasStickyFigure method setUI.
@Override
protected void setUI() {
setLayoutManager(new GridLayout());
FlowPage flowPage = new FlowPage();
fTextFlow = new TextFlow();
fTextFlow.setLayoutManager(new ParagraphTextLayout(fTextFlow, ParagraphTextLayout.WORD_WRAP_HARD));
flowPage.add(fTextFlow);
add(flowPage, new GridData(SWT.CENTER, SWT.CENTER, true, true));
fTextPositionDelegate = new TextPositionDelegate(this, flowPage, getDiagramModelObject());
setIconicDelegate(new IconicDelegate(getDiagramModelObject(), MAX_ICON_SIZE));
}
Aggregations