Package net.sourceforge.squirrel_sql.client.gui.desktopcontainer

Examples of net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogWidget


  private JMenuItem addMenuItem(final IApplication application, final String title,
      final int sheetType, final ISession session) {
    JMenuItem menuItem = new JMenuItem(title);
    menuItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        DialogWidget frame = (DialogWidget) isInternalFrameUsed(application, sheetType);
        if (frame == null) {
          if (sheetType == ST_SHEET_TYPE_FIND_VALUES) {
            frame = new SmarttoolFindBadNullValuesFrame(session, title);
          } else if (sheetType == ST_SHEET_TYPE_CHANGE_VALUES) {
            frame = new SmarttoolChangeValuesFrame(session, title);
          } else if (sheetType == ST_SHEET_TYPE_MISSING_INICES) {
            frame = new SmarttoolMissingIndicesFrame(session, title);
          }
          application.getMainFrame().addWidget(frame);
          frame.pack();
          if (frame instanceof SmarttoolFindBadNullValuesFrame) {
            frame.setSize(new Dimension(frame.getWidth(), 500));
          } else if (frame instanceof SmarttoolChangeValuesFrame) {
            frame.setSize(new Dimension(frame.getWidth(), 500));
          } else if (frame instanceof SmarttoolMissingIndicesFrame) {
            frame.setSize(new Dimension(frame.getWidth(), 500));
          }
          DialogWidget.centerWithinDesktop(frame);
        } else {
          frame.setVisible(true);
          frame.moveToFront();
        }


        try {
          frame.setSelected(true);
          if (frame instanceof ISmarttoolFrame) {
            ((ISmarttoolFrame)frame).setFocusToFirstEmptyInputField();
          }
        } catch (PropertyVetoException e) {
          log.error(e.getLocalizedMessage());
View Full Code Here


  private JMenuItem addMenuItem(final IApplication application, String title,
      final int sheetType, final ISession session) {
    JMenuItem menuItem = new JMenuItem(title);
    menuItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        DialogWidget frame = (DialogWidget) isInternalFrameUsed(application, sheetType);
        if (frame == null) {
          if (sheetType == FB_SHEET_TYPE_ROLE) {
            frame = new FirebirdManagerRoleFrame(session);
          } else if (sheetType == FB_SHEET_TYPE_GRANT) {
            frame = new FirebirdManagerGrantFrame(session);
          } else if (sheetType == FB_SHEET_TYPE_BACKUP){
            frame = new FirebirdManagerBackupRestoreFrame(session.getApplication());
          } else if (sheetType == FB_SHEET_TYPE_CREATE){
            frame = new FirebirdManagerCreateDatabaseFrame(session.getApplication());
          } else if (sheetType == FB_SHEET_TYPE_USER){
            frame = new FirebirdManagerUserManagerFrame(session.getApplication());
          }
          application.getMainFrame().addWidget(frame);
          frame.pack();
          if (frame instanceof FirebirdManagerBackupRestoreFrame) {
            frame.setSize(new Dimension(650, frame.getHeight()));
          } else if (frame instanceof FirebirdManagerUserManagerFrame) {
            frame.setSize(new Dimension(frame.getWidth(), 500));
          }
          DialogWidget.centerWithinDesktop(frame);
        } else {
          frame.setVisible(true);
          frame.moveToFront();
        }


        try {
          frame.setSelected(true);
          if (frame instanceof IFirebirdManagerFrame) {
            ((IFirebirdManagerFrame)frame).setFocusToFirstEmptyInputField();
          }
        } catch (PropertyVetoException e) {
          log.error(e.getLocalizedMessage());
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.