Class NodeModelDatabase

java.lang.Object
com.jsql.view.swing.tree.model.AbstractNodeModel
com.jsql.view.swing.tree.model.NodeModelDatabase

public class NodeModelDatabase extends AbstractNodeModel
Database model displaying the database icon on the label.
  • Constructor Details

    • NodeModelDatabase

      public NodeModelDatabase(Database database)
      Node as a database model.
      Parameters:
      database - Element database coming from model
  • Method Details

    • getLeafIcon

      protected Icon getLeafIcon(boolean leaf)
      Description copied from class: AbstractNodeModel
      Get icon displayed next to the node text.
      Specified by:
      getLeafIcon in class AbstractNodeModel
      Parameters:
      leaf - True will display an arrow icon, false won't
      Returns:
      Icon to display
    • runAction

      public void runAction()
      Description copied from class: AbstractNodeModel
      Run injection process (see GUIMediator.model().dao). Used by database and table nodes.
      Specified by:
      runAction in class AbstractNodeModel
    • isPopupDisplayable

      public boolean isPopupDisplayable()
      Description copied from class: AbstractNodeModel
      Check if menu should be opened. i.e: does not show menu on database except during injection.
      Specified by:
      isPopupDisplayable in class AbstractNodeModel
      Returns:
      True if popupup should be opened, false otherwise
    • buildMenu

      protected void buildMenu(JPopupMenuCustomExtract tablePopupMenu, TreePath path)
      Description copied from class: AbstractNodeModel
      Display a popupmenu on mouse right click if needed.
      Specified by:
      buildMenu in class AbstractNodeModel
      Parameters:
      tablePopupMenu - Menu to display
      path - Treepath of current node