use of org.whole.lang.ui.layout.EntityXYLayout in project whole by wholeplatform.
the class AbstractConnectedFreeformRootPart method createFigure.
protected IFigure createFigure() {
// Figure figure = new FreeformLayer();
IEntityFigure figure = new EntityFigure() {
{
setLayoutManager(new EntityXYLayout());
setOpaque(false);
}
// FIXME workaround
public int getIndent() {
return getInsets().left;
}
public int getAscent() {
return getPreferredSize().height / 2;
}
public static final int MINIMUM_SIZE = 50;
public Dimension getPreferredSize(int wHint, int hHint) {
Dimension size = super.getPreferredSize(wHint, hHint);
size.width = Math.max(size.width, MINIMUM_SIZE);
size.height = Math.max(size.height, MINIMUM_SIZE);
return size;
}
};
// figure.setLayoutManager(new EntityXYLayout());
// figure.setOpaque(false);
setConnectionRouter(createConnectionRouter(figure));
return figure;
}
use of org.whole.lang.ui.layout.EntityXYLayout in project whole by wholeplatform.
the class FreeformRootPart method createFigure.
protected IFigure createFigure() {
return new EntityFigure() {
{
setLayoutManager(new EntityXYLayout());
setOpaque(false);
}
// FIXME workaround
public int getIndent() {
return getInsets().left;
}
public int getAscent() {
return getPreferredSize().height / 2;
}
public static final int MINIMUM_SIZE = 600;
public Dimension getPreferredSize(int wHint, int hHint) {
Dimension size = super.getPreferredSize(wHint, hHint);
size.width = Math.max(size.width, MINIMUM_SIZE);
size.height = Math.max(size.height, MINIMUM_SIZE);
return size;
}
};
}
Aggregations