Beispiel #1
0
  private void refreshNodeContent(final DBRProgressMonitor monitor, Object source)
      throws DBException {
    if (isDisposed()) {
      return;
    }
    this.locked = true;
    DBNModel model = getModel();
    try {
      model.fireNodeUpdate(source, this, DBNEvent.NodeChange.LOCK);

      this.reloadChildren(monitor);

      model.fireNodeUpdate(source, this, DBNEvent.NodeChange.REFRESH);
    } finally {
      this.locked = false;

      // Unlock node
      model.fireNodeUpdate(source, this, DBNEvent.NodeChange.UNLOCK);
    }
    // new RefreshJob("Refresh node " + getNodeName()).schedule();
  }
Beispiel #2
0
 @Override
 public DBPImage getNodeIcon() {
   DBPImage image = null;
   final DBSObject object = getObject();
   if (object instanceof DBPImageProvider) {
     image = ((DBPImageProvider) object).getObjectImage();
   }
   if (image == null) {
     DBXTreeNode meta = getMeta();
     if (meta != null) {
       image = meta.getIcon(this);
     }
   }
   if (image != null && object instanceof DBPStatefulObject) {
     image = DBNModel.getStateOverlayImage(image, ((DBPStatefulObject) object).getObjectState());
   }
   return image;
 }
Beispiel #3
0
 protected void unregisterNode(boolean reflect) {
   DBNModel model = getModel();
   if (model != null) {
     model.removeNode(this, reflect);
   }
 }
Beispiel #4
0
 protected void registerNode() {
   DBNModel model = getModel();
   if (model != null) {
     model.addNode(this);
   }
 }