All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.squirrel_sql.client.gui.desktopcontainer.SessionDialogWidget Maven / Gradle / Ivy

Go to download

This is the jar that contains the main application classes which are very specific to SQuirreLSQL.

There is a newer version: 3.5.0
Show newest version
package net.sourceforge.squirrel_sql.client.gui.desktopcontainer;

import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.session.ISession;

import javax.swing.*;
import javax.swing.event.InternalFrameEvent;
import java.awt.*;

public abstract class SessionDialogWidget extends DialogWidget implements ISessionWidget
{
   private ISession _session;

   public SessionDialogWidget(String title, boolean resizeable, boolean closeable, boolean maximizeable, boolean iconifiable, ISession session)
   {
      super(title, resizeable, closeable, maximizeable, iconifiable, session.getApplication());
      _session = session;

      setupSheet();
      
   }

   public SessionDialogWidget(String title, boolean resizeable, ISession session)
   {
      this(title, resizeable, true, false, false, session);
   }

   public ISession getSession()
   {
      return _session;
   }

   public void closeFrame(boolean withEvents)
   {
      if (!_session.isfinishedLoading())
      {
         return;
      }
      if (withEvents)
      {
         fireWidgetClosing();
      }
      dispose();

      if (withEvents)
      {
         fireWidgetClosed();
      }
   }

   public boolean hasSQLPanelAPI()
   {
      return false;
   }

   private final void setupSheet()
   {
      _session.getApplication().getWindowManager().registerSessionSheet(this);
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy