Search in sources :

Example 6 with IEntityLayout

use of org.whole.lang.ui.layout.IEntityLayout in project whole by wholeplatform.

the class LiteralTerminalPart method setDetailed.

@Override
public void setDetailed(boolean value, IEntityPart childPart) {
    if (isDetailed() == value)
        return;
    super.setDetailed(value, childPart);
    IEntityLayout lm = (IEntityLayout) getFigure().getLayoutManager();
    lm.setSpacedChild(value ? IEntityLayout.SPACED_ALL : IEntityLayout.SPACED_NONE);
    new AnimableRunnable() {

        public void doRun() {
            getFigure().revalidate();
            getFigure().repaint();
        }
    }.syncExec();
}
Also used : IEntityLayout(org.whole.lang.ui.layout.IEntityLayout) AnimableRunnable(org.whole.lang.ui.util.AnimableRunnable)

Example 7 with IEntityLayout

use of org.whole.lang.ui.layout.IEntityLayout in project whole by wholeplatform.

the class AbstractCompositePart method setDetailed.

@Override
public void setDetailed(boolean value, IEntityPart childPart) {
    if (isDetailed() == value)
        return;
    super.setDetailed(value, childPart);
    IEntityLayout lm = (IEntityLayout) getFigure().getLayoutManager();
    int childIndex = getChildren().indexOf(childPart);
    lm.setSpacedChild(value ? (childIndex != -1 ? childIndex : IEntityLayout.SPACED_ALL) : IEntityLayout.SPACED_NONE);
    new AnimableRunnable() {

        public void doRun() {
            getFigure().revalidate();
            getFigure().repaint();
        }
    }.syncExec();
}
Also used : IEntityLayout(org.whole.lang.ui.layout.IEntityLayout) AnimableRunnable(org.whole.lang.ui.util.AnimableRunnable)

Aggregations

IEntityLayout (org.whole.lang.ui.layout.IEntityLayout)7 AnimableRunnable (org.whole.lang.ui.util.AnimableRunnable)6 MonoLayout (org.whole.lang.ui.layout.MonoLayout)1