/** * use all kinds of properties to calculate a hash for the layout * * @param node * @return */ private Integer calculateHashcode(Node node) { StringBuffer lStringBuffer = new StringBuffer(); lStringBuffer.append(node.minWidth(-1)); lStringBuffer.append("x"); lStringBuffer.append(node.minHeight(-1)); lStringBuffer.append("/"); lStringBuffer.append(node.prefWidth(-1)); lStringBuffer.append("x"); lStringBuffer.append(node.prefHeight(-1)); lStringBuffer.append("/"); lStringBuffer.append(node.maxWidth(-1)); lStringBuffer.append("x"); lStringBuffer.append(node.maxHeight(-1)); lStringBuffer.append("/"); lStringBuffer.append(node.getLayoutBounds().getWidth()); lStringBuffer.append("x"); lStringBuffer.append(node.getLayoutBounds().getHeight()); lStringBuffer.append("/"); lStringBuffer.append(node.isVisible()); return lStringBuffer.toString().hashCode(); }
// as of JDK 1.6: @Override public boolean isVisible() { return node.isVisible(); }