Search in sources :

Example 6 with TransferableNode

use of org.apache.cayenne.modeler.dialog.db.load.TransferableNode in project cayenne by apache.

the class DbImportTree method printIncludeTables.

private void printIncludeTables(Collection<IncludeTable> collection, DbImportTreeNode parent) {
    for (IncludeTable includeTable : collection) {
        DbImportTreeNode node = !isTransferable ? new DbImportTreeNode(includeTable) : new TransferableNode(includeTable);
        if (!node.getSimpleNodeName().equals("")) {
            if (isTransferable && includeTable.getIncludeColumns().isEmpty() && includeTable.getExcludeColumns().isEmpty()) {
                printParams(Collections.singletonList(new IncludeColumn("Loading...")), node);
            }
            printParams(includeTable.getIncludeColumns(), node);
            printParams(includeTable.getExcludeColumns(), node);
            parent.add(node);
        }
    }
}
Also used : DbImportTreeNode(org.apache.cayenne.modeler.dialog.db.load.DbImportTreeNode) IncludeTable(org.apache.cayenne.dbsync.reverse.dbimport.IncludeTable) IncludeColumn(org.apache.cayenne.dbsync.reverse.dbimport.IncludeColumn) TransferableNode(org.apache.cayenne.modeler.dialog.db.load.TransferableNode)

Aggregations

DbImportTreeNode (org.apache.cayenne.modeler.dialog.db.load.DbImportTreeNode)6 TransferableNode (org.apache.cayenne.modeler.dialog.db.load.TransferableNode)6 IncludeTable (org.apache.cayenne.dbsync.reverse.dbimport.IncludeTable)4 IncludeColumn (org.apache.cayenne.dbsync.reverse.dbimport.IncludeColumn)2 FlowLayout (java.awt.FlowLayout)1 TreeExpansionEvent (javax.swing.event.TreeExpansionEvent)1 TreeExpansionListener (javax.swing.event.TreeExpansionListener)1 TreePath (javax.swing.tree.TreePath)1 Catalog (org.apache.cayenne.dbsync.reverse.dbimport.Catalog)1 ReverseEngineering (org.apache.cayenne.dbsync.reverse.dbimport.ReverseEngineering)1 Schema (org.apache.cayenne.dbsync.reverse.dbimport.Schema)1 LoadDbSchemaAction (org.apache.cayenne.modeler.action.LoadDbSchemaAction)1 ColorTreeRenderer (org.apache.cayenne.modeler.editor.dbimport.tree.ColorTreeRenderer)1