@Deprecated | @Deprecated | ||||
public void unregisterPaintable(ServerConnector p) { | public void unregisterPaintable(ServerConnector p) { | ||||
System.out.println("unregisterPaintable (unnecessarily) called for " | System.out.println("unregisterPaintable (unnecessarily) called for " | ||||
+ p.getConnectorId()); | |||||
+ Util.getConnectorString(p)); | |||||
// connectorMap.unregisterConnector(p); | // connectorMap.unregisterConnector(p); | ||||
} | } | ||||
// TODO paintables inside lists/maps get rendered as | // TODO paintables inside lists/maps get rendered as | ||||
// components in the debug console | // components in the debug console | ||||
String formattedValue = value instanceof ServerConnector ? c | String formattedValue = value instanceof ServerConnector ? c | ||||
.getConnectorMap() | |||||
.getConnectorId((ServerConnector) value) : String | |||||
.getConnectorMap().getConnectorId( | |||||
(ServerConnector) value) : String | |||||
.valueOf(value); | .valueOf(value); | ||||
formattedParams = parameters[0] + " : " + formattedValue; | formattedParams = parameters[0] + " : " + formattedValue; | ||||
} | } | ||||
/** | /** | ||||
* Performs a shallow comparison of the collections. | * Performs a shallow comparison of the collections. | ||||
* | * | ||||
* @param collection1 The first collection | |||||
* @param collection2 The second collection | |||||
* @param collection1 | |||||
* The first collection | |||||
* @param collection2 | |||||
* The second collection | |||||
* @return true if the collections contain the same elements in the same | * @return true if the collections contain the same elements in the same | ||||
* order, false otherwise | * order, false otherwise | ||||
*/ | */ | ||||
public static boolean collectionsEquals(Collection collection1, Collection collection2) { | |||||
public static boolean collectionsEquals(Collection collection1, | |||||
Collection collection2) { | |||||
if (collection1 == null) { | if (collection1 == null) { | ||||
return collection2 == null; | return collection2 == null; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
public static String getConnectorString(ServerConnector p) { | |||||
if (p == null) { | |||||
return "null"; | |||||
} | |||||
return p.getClass().getName() + " (" + p.getConnectorId() + ")"; | |||||
} | |||||
} | } |
*/ | */ | ||||
public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) { | public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) { | ||||
// TODO Remove debug info | // TODO Remove debug info | ||||
VConsole.log("Hierarchy changed for " + Util.getSimpleName(this) + " (" | |||||
+ getConnectorId() + ")"); | |||||
VConsole.log("Hierarchy changed for " + Util.getConnectorString(this)); | |||||
String oldChildren = "* Old children: "; | String oldChildren = "* Old children: "; | ||||
for (ComponentConnector child : event.getOldChildren()) { | for (ComponentConnector child : event.getOldChildren()) { | ||||
oldChildren += Util.getSimpleName(child) + " (" | |||||
+ child.getConnectorId() + ") "; | |||||
oldChildren += Util.getConnectorString(child) + " "; | |||||
} | } | ||||
VConsole.log(oldChildren); | VConsole.log(oldChildren); | ||||
String newChildren = "* New children: "; | String newChildren = "* New children: "; | ||||
for (ComponentConnector child : getChildren()) { | for (ComponentConnector child : getChildren()) { | ||||
newChildren += Util.getSimpleName(child) + " (" | |||||
+ child.getConnectorId() + ") "; | |||||
newChildren += Util.getConnectorString(child) + " "; | |||||
} | } | ||||
VConsole.log(newChildren); | VConsole.log(newChildren); | ||||
} | } |