Class BundleTree

All Implemented Interfaces:
DragGestureListener, DragSourceListener, DropTargetListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, Scrollable

public class BundleTree extends DndTree
Class BundleTree Gives a tree gui for editing bundles
Version:
$Revision: 1.34 $
Author:
IDV Development Team
See Also:
  • Field Details

  • Constructor Details

    • BundleTree

      public BundleTree(IdvUIManager uiManager, int bundleType)
      Create the tree with the given bundle type
      Parameters:
      uiManager - The UI manager
      bundleType - The type of the bundles we are showing
  • Method Details

    • doOpen

      public void doOpen(SavedBundle bundle)
      Open the bundle
      Parameters:
      bundle - the bundle
    • doRename

      public void doRename(SavedBundle bundle)
      Rename the bundle
      Parameters:
      bundle - the bundle
    • doExport

      public void doExport(SavedBundle bundle)
      Export the bundle
      Parameters:
      bundle - the bundle
    • doExportToPlugin

      public void doExportToPlugin(SavedBundle bundle)
      Export the bundle
      Parameters:
      bundle - the bundle
    • doClose

      public void doClose()
      close
    • doExportToPlugin

      public void doExportToPlugin()
      Export the selected bundles to the plugin creator
    • doExport

      public void doExport()
      Export the selected bundles
    • setVisible

      public void setVisible(boolean visible)
      Show or hide frame.
      Overrides:
      setVisible in class JComponent
      Parameters:
      visible - if true, show frame. Otherwise hides frame.
    • okToDrag

      protected boolean okToDrag(DefaultMutableTreeNode sourceNode)
      Ok to drag the node
      Overrides:
      okToDrag in class DndTree
      Parameters:
      sourceNode - The node to drag
      Returns:
      Ok to drag
    • okToDrop

      protected boolean okToDrop(DefaultMutableTreeNode sourceNode, DefaultMutableTreeNode destNode)
      Ok to drop the node
      Overrides:
      okToDrop in class DndTree
      Parameters:
      sourceNode - The dragged node
      destNode - Where to drop
      Returns:
      Ok to drop
    • doDrop

      protected void doDrop(DefaultMutableTreeNode sourceNode, DefaultMutableTreeNode destNode)
      Handle the DND drop
      Overrides:
      doDrop in class DndTree
      Parameters:
      sourceNode - The dragged node
      destNode - Where to drop
    • deleteSelected

      public void deleteSelected()
      Delete the selected item in the tree
    • findSelectedBundle

      public SavedBundle findSelectedBundle()
      Find and return the selected bundle. May return null if none selected
      Returns:
      Selected bundle
    • loadBundles

      protected void loadBundles()
      Load in the bundles into the tree
    • deleteBundle

      public void deleteBundle(SavedBundle bundle)
      Delete the given bundle
      Parameters:
      bundle - The bundle to delete
    • addCategory

      public void addCategory(DefaultMutableTreeNode parentNode)
      Create a new category under the given node
      Parameters:
      parentNode - The parent tree node
    • doImport

      public void doImport(DefaultMutableTreeNode parentNode)
      Create a new category under the given node
      Parameters:
      parentNode - The parent tree node
    • deleteCategory

      public void deleteCategory(String category)
      Delete the given bundle category
      Parameters:
      category - The category to delete