use of com.revolsys.swing.tree.BaseTreeNode in project com.revolsys.open by revolsys.
the class LayerGroupTreeNode method loadChildrenDo.
@Override
protected List<BaseTreeNode> loadChildrenDo() {
final List<BaseTreeNode> children = new ArrayList<>();
final LayerGroup group = getGroup();
for (final Layer child : group) {
final BaseTreeNode childNode = newTreeNode(child);
children.add(childNode);
}
return children;
}
use of com.revolsys.swing.tree.BaseTreeNode in project com.revolsys.open by revolsys.
the class PathRecordStoreTreeNode method loadChildrenDo.
@Override
protected List<BaseTreeNode> loadChildrenDo() {
final RecordStore recordStore = getRecordStore();
if (recordStore != null) {
final RecordStoreSchema schema = recordStore.getRootSchema();
if (schema != null) {
schema.refresh();
final List<BaseTreeNode> children = new ArrayList<>();
for (final RecordStoreSchemaElement element : schema.getElements()) {
final BaseTreeNode node = BaseTreeNode.newTreeNode(element);
children.add(node);
}
return children;
}
}
return Collections.emptyList();
}
use of com.revolsys.swing.tree.BaseTreeNode in project com.revolsys.open by revolsys.
the class PathRecordStoreTreeNode method getRecordStoreConnectionMap.
@Override
public Map<String, Object> getRecordStoreConnectionMap() {
final BaseTreeNode parent = getParent();
final Path path = getPath();
final URL url = getUrl(parent, path);
return Collections.<String, Object>singletonMap("url", url.toString());
}
use of com.revolsys.swing.tree.BaseTreeNode in project com.revolsys.open by revolsys.
the class MultipleLayerRenderer method addRendererEdit.
default void addRendererEdit(final C renderer) {
addRenderer(-1, renderer);
final Object item = MenuFactory.getMenuSource();
if (item instanceof BaseTreeNode) {
final BaseTreeNode node = (BaseTreeNode) item;
final BaseTree tree = node.getTree();
if (tree.isPropertyEqual("treeType", Project.class.getName())) {
final Layer layer = renderer.getLayer();
layer.showRendererProperties(renderer);
}
}
}
use of com.revolsys.swing.tree.BaseTreeNode in project com.revolsys.open by revolsys.
the class ProjectFrame method getTreeNode.
public BaseTreeNode getTreeNode(final Layer layer) {
final List<Layer> layerPath = layer.getPathList();
final TreePath treePath = this.tocTree.getTreePath(layerPath);
if (treePath == null) {
return null;
} else {
return (BaseTreeNode) treePath.getLastPathComponent();
}
}
Aggregations