use of org.whole.lang.ui.figures.IFoldableFigure in project whole by wholeplatform.
the class AbstractPart method getFigure.
public IFigure getFigure() {
if (figure == null) {
super.getFigure();
if (figure instanceof IFoldableFigure) {
ActionListener toggleListener = null;
for (Iterator<Toggle> iter = ((IFoldableFigure) figure).getFoldingToggles().iterator(); iter.hasNext(); ) {
EntityToggle toggleFigure = (EntityToggle) iter.next();
if (toggleListener == null)
toggleListener = createToggleListener();
toggleFigure.addActionListener(toggleListener);
}
;
}
}
return figure;
}
use of org.whole.lang.ui.figures.IFoldableFigure in project whole by wholeplatform.
the class WholeExtendedExposeHelper method getFoldableAncestors.
private List<IFoldableFigure> getFoldableAncestors(IFigure figure) {
IFigure hostFigure = hostPart.getFigure();
List<IFoldableFigure> result = new ArrayList<IFoldableFigure>(1);
IFigure foldableFigure = figure;
do {
// FIXME ? workaround
if (foldableFigure == null)
break;
foldableFigure = foldableFigure.getParent();
if (foldableFigure instanceof IFoldableFigure)
result.add((IFoldableFigure) foldableFigure);
} while (foldableFigure != hostFigure);
return result;
}
Aggregations