use of org.whole.lang.ui.util.AnimableRunnable 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();
}
use of org.whole.lang.ui.util.AnimableRunnable in project whole by wholeplatform.
the class AbstractPart method propertyChange.
/**
* Handles changes in properties of this. It is
* activated through the PropertyChangeListener.
* It updates children, source and target connections,
* and the visuals of this based on the property
* changed.
*
* @param evt Event which details the property change.
*/
public final void propertyChange(final PropertyChangeEvent evt) {
int millis = EntityUtils.isData((IEntity) evt.getSource()) ? AnimableRunnable.NO_ANIMATION : AnimableRunnable.DEFAULT_DELAY;
AnimableRunnable runnable = new AnimableRunnable(millis) {
public void doRun() {
propertyChangeUI(evt);
}
};
if (isSyncPropertyChange())
runnable.syncExec();
else
runnable.asyncExec();
}
use of org.whole.lang.ui.util.AnimableRunnable 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();
}
Aggregations