private static final boolean debugLogging = false;
private ApplicationConnection connection;
- private final Set<Element> measuredNonPaintableElements = new HashSet<Element>();
+ private final Set<Element> measuredNonConnectorElements = new HashSet<Element>();
private final MeasuredSize nullSize = new MeasuredSize();
private LayoutDependencyTree currentDependencyTree;
measuredSize = new MeasuredSize();
if (ConnectorMap.get(connection).getConnector(element) == null) {
- measuredNonPaintableElements.add(element);
+ measuredNonConnectorElements.add(element);
}
setMeasuredSize(element, measuredSize);
}
}
needsMeasure.clear();
- measureNonPaintables();
+ measureNonConnectors();
VConsole.log("Layout init in " + totalDuration.elapsedMillis() + " ms");
}
}
- private void measureNonPaintables() {
- for (Element element : measuredNonPaintableElements) {
+ private void measureNonConnectors() {
+ for (Element element : measuredNonConnectorElements) {
measuredAndUpdate(element, getMeasuredSize(element, null));
}
- VConsole.log("Measured " + measuredNonPaintableElements.size()
- + " non paintable elements");
+ VConsole.log("Measured " + measuredNonConnectorElements.size()
+ + " non connector elements");
}
private MeasureResult measuredAndUpdate(Element element,
}
}
- private static boolean isManagedLayout(ComponentConnector paintable) {
- return paintable instanceof ManagedLayout;
+ private static boolean isManagedLayout(ComponentConnector connector) {
+ return connector instanceof ManagedLayout;
}
public void forceLayout() {
- ConnectorMap paintableMap = connection.getConnectorMap();
- ComponentConnector[] paintableWidgets = paintableMap
+ ConnectorMap connectorMap = connection.getConnectorMap();
+ ComponentConnector[] componentConnectors = connectorMap
.getComponentConnectors();
- for (ComponentConnector connector : paintableWidgets) {
+ for (ComponentConnector connector : componentConnectors) {
if (connector instanceof ManagedLayout) {
setNeedsLayout((ManagedLayout) connector);
}
private void stopMeasuringIfUnecessary(Element element) {
if (!needsMeasure(element)) {
- measuredNonPaintableElements.remove(element);
+ measuredNonConnectorElements.remove(element);
setMeasuredSize(element, null);
}
}