Object helpedObject = NSKeyValueCodingAdditions.Utility.valueForKeyPath(targetObject, keyPath); Class helpedClass; if (helpedObject != null) {
@Override protected Dataset createDataset() { AccumulatingPieDataset dataset = new AccumulatingPieDataset(); for(Enumeration<?> items = items().objectEnumerator(); items.hasMoreElements(); ) { Object item = items.nextElement(); Comparable<?> name = (Comparable<?>)NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, nameKey()); Number value = (Number)NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, valueKey()); dataset.setValue(name, value); } return dataset; }
public String listItemID() { Object item = valueForBinding("item"); String listItemIDKeyPath = (String) valueForBinding("listItemIDKeyPath"); String itemID = String.valueOf(NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, listItemIDKeyPath)); String listItemID = listItemID(itemID); return listItemID; }
@Override protected Dataset createDataset() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); for(Enumeration<?> items = items().objectEnumerator(); items.hasMoreElements(); ) { Object item = items.nextElement(); Comparable<?> name = (Comparable<?>)NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, nameKey()); Number value = (Number)NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, valueKey()); Comparable<?> category = null; if(categoryKey() != null) { category = (Comparable<?>)NSKeyValueCodingAdditions.Utility.valueForKeyPath(item, categoryKey()); } dataset.setValue(value, name, category); } return dataset; } }
public boolean isLeaf(Object node) { boolean isLeaf; if (_isLeafKeyPath == null) { NSArray childrenTreeNodes = childrenTreeNodes(node); isLeaf = childrenTreeNodes == null || childrenTreeNodes.count() == 0; } else if (_delegate.respondsTo("isLeaf")) { isLeaf = _delegate.booleanPerform("isLeaf", node); } else { Boolean isLeafBoolean = (Boolean) NSKeyValueCodingAdditions.Utility.valueForKeyPath(node, _isLeafKeyPath); isLeaf = isLeafBoolean.booleanValue(); } return isLeaf; }
public String currentTabName() { return (String)NSKeyValueCodingAdditions.Utility.valueForKeyPath(currentTab, tabNameKey()); }
public String displayStringForItem() { String displayStringForItem = null; if (itemDisplayKey()!=null) { displayStringForItem = (String) NSKeyValueCodingAdditions.Utility.valueForKeyPath(currentItem, itemDisplayKey()); } else { displayStringForItem = (String) NSKeyValueCoding.Utility.valueForKey(currentItem, "userPresentableDescription"); } return displayStringForItem; }
public Object parentTreeNode(Object node) { Object parentTreeNode = null; if (_delegate.respondsTo("parentTreeNode")) { parentTreeNode = _delegate.perform("parentTreeNode", node); } else if (node != null) { parentTreeNode = NSKeyValueCodingAdditions.Utility.valueForKeyPath(node, _parentTreeNodeKeyPath); } return parentTreeNode; }
public String selectedTabName() { return (String)NSKeyValueCodingAdditions.Utility.valueForKeyPath(selectedTab(), tabNameKey()); }
public NSArray childrenTreeNodes(Object node) { NSArray childrenTreeNodes; if (_delegate.respondsTo("childrenTreeNodes")) { childrenTreeNodes = (NSArray) _delegate.perform("childrenTreeNodes", node); } else { childrenTreeNodes = (NSArray) NSKeyValueCodingAdditions.Utility.valueForKeyPath(node, _childrenTreeNodesKeyPath); } return childrenTreeNodes; }