use of edu.cmu.cs.hcii.cogtool.model.Association in project cogtool by cogtool.
the class FrameEditorMouseState method dynamicResizeGroup.
protected void dynamicResizeGroup(Association<?> group, double ratioX, double ratioY, double newLeft, double newTop, boolean childrenToo) {
Iterator<? extends FrameElement> groupElts = group.iterator();
while (groupElts.hasNext()) {
FrameElement elt = groupElts.next();
if (elt instanceof IWidget) {
IWidget w = (IWidget) elt;
GraphicalWidget<?> gw = ui.frameUI.getWidgetFigure(w);
dynamicResizeWidget(w, gw, ratioX, ratioY, newLeft, newTop);
if (childrenToo && (w instanceof AParentWidget)) {
AParentWidget pw = (AParentWidget) w;
SimpleWidgetGroup children = pw.getChildren();
if (children != null) {
dynamicResizeGroup(children, ratioX, ratioY, newLeft, newTop, childrenToo);
}
}
} else if (elt instanceof Association<?>) {
dynamicResizeGroup((Association<?>) elt, ratioX, ratioY, newLeft, newTop, childrenToo);
}
}
}
Aggregations