public int getChildCount() { if (children == null) { return 0; } final EncryptionModel encryptionModel = EncryptionModel.getModel(this); return encryptionModel == null || encryptionModel.isAccessible() ? children.size() : 0; }
public void setFolded(boolean folded) { if (this.folded == folded) { return; } final EncryptionModel encryptionModel = EncryptionModel.getModel(this); if (encryptionModel != null && !encryptionModel.isAccessible() && folded == false) { folded = true; } else if (AlwaysUnfoldedNode.isConnectorNode(this)) { folded = false; } if (this.folded == folded) { return; } this.folded = folded; fireNodeChanged( new NodeChangeEvent( this, NodeChangeType.FOLDING, Boolean.valueOf(!folded), Boolean.valueOf(folded))); }
private boolean isAccessible() { final EncryptionModel encryptionModel = EncryptionModel.getModel(this); return encryptionModel == null || encryptionModel.isAccessible(); }