Search in sources :

Example 1 with AnimableRunnable

use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.

the class FilterPart 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 2 with AnimableRunnable

use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.

the class AsPart 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 3 with AnimableRunnable

use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.

the class ContentPaneFigure method createFoldingToggle.

public Toggle createFoldingToggle(Toggle toggle, final int paneIndexOrTag, int... paneIndexes) {
    toggle.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            new AnimableRunnable() {

                public void doRun() {
                    toggleVisibility(paneIndexOrTag);
                }
            }.syncExec();
        }
    });
    createActionableFoldingToggle(toggle, paneIndexes);
    bindFoldingToggle(foldingToggles.size() - 1, paneIndexOrTag);
    return toggle;
}
Also used : ActionListener(org.eclipse.draw2d.ActionListener) ActionEvent(org.eclipse.draw2d.ActionEvent) AnimableRunnable(org.whole.lang.ui.util.AnimableRunnable)

Example 4 with AnimableRunnable

use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.

the class SingletonPart 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 5 with AnimableRunnable

use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.

the class DataTerminalPart 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)

Aggregations

AnimableRunnable (org.whole.lang.ui.util.AnimableRunnable)8 IEntityLayout (org.whole.lang.ui.layout.IEntityLayout)6 ActionEvent (org.eclipse.draw2d.ActionEvent)1 ActionListener (org.eclipse.draw2d.ActionListener)1 IEntity (org.whole.lang.model.IEntity)1