public ObjectResultController(ISession session, HibernatePluginResources resource) {
   _session = session;
   _resource = resource;
   final SessionProperties props = session.getProperties();
   _objectResultTabbedPane =
       UIFactory.getInstance().createTabbedPane(props.getSQLExecutionTabPlacement());
 }
예제 #2
0
 private JTabbedPane buildMainPanel() throws SQLException {
   final JTabbedPane tabPanel = UIFactory.getInstance().createTabbedPane();
   // i18n[mssql.general=General]
   tabPanel.addTab(s_stringMgr.getString("mssql.general"), null, buildGeneralPanel());
   // i18n[mssql.foematting=Formatting]
   tabPanel.addTab(s_stringMgr.getString("mssql.foematting"), null, buildFormattingPanel());
   // i18n[mssql.options=Options]
   tabPanel.addTab(s_stringMgr.getString("mssql.options"), null, buildOptionsPanel());
   return tabPanel;
 }
  private void createGUI() {
    final SessionProperties props = _session.getProperties();
    _tabbedExecutionsPanel =
        UIFactory.getInstance().createTabbedPane(props.getSQLExecutionTabPlacement(), true);

    createTabPopup();

    setLayout(new BorderLayout());

    add(_tabbedExecutionsPanel, BorderLayout.CENTER);
  }
예제 #4
0
  private void createGUI() {
    setLayout(new BorderLayout());

    _tabbedExecutionsPanel =
        UIFactory.getInstance()
            .createTabbedPane(_session.getProperties().getSQLExecutionTabPlacement());

    initTabPopup();

    add(_tabbedExecutionsPanel, BorderLayout.CENTER);
  }
예제 #5
0
  /**
   * Load this plugin.
   *
   * @param app Application API.
   */
  public synchronized void load(IApplication app) throws PluginException {
    super.load(app);

    // Load resources.
    _resources = new LAFPluginResources(this);

    // Folder within plugins folder that belongs to this
    // plugin.
    FileWrapper pluginAppFolder = null;
    try {
      pluginAppFolder = getPluginAppSettingsFolder();
    } catch (IOException ex) {
      throw new PluginException(ex);
    }

    // Folder that stores Look and Feel jars.
    _lafFolder = fileWrapperFactory.create(pluginAppFolder, "lafs");
    if (!_lafFolder.exists()) {
      _lafFolder.mkdir();
    }

    // Folder to store user settings.
    try {
      _userSettingsFolder = getPluginUserSettingsFolder();
    } catch (IOException ex) {
      throw new PluginException(ex);
    }

    // Folder to contain extra LAFs supplied by the user.
    _userExtraLAFFolder =
        fileWrapperFactory.create(_userSettingsFolder, ILAFConstants.USER_EXTRA_LAFS_FOLDER);

    // Create empty required files in user settings directory.
    createEmptyRequiredUserFiles();

    // Load plugin preferences.
    loadPrefs();

    // Create the Look and Feel register.
    _lafRegister = new LAFRegister(app, this);

    // Listen for GUI components being created.
    UIFactory.getInstance().addListener(new UIFactoryListener());

    // Update font used for status bars.
    _lafRegister.updateStatusBarFont();
  }