Package net.sourceforge.squirrel_sql.client.resources

Examples of net.sourceforge.squirrel_sql.client.resources.SquirrelResources


  private void createUserInterface()
  {
    setVisible(false);
    setDefaultCloseOperation(MainFrame.DO_NOTHING_ON_CLOSE);

    final SquirrelResources rsrc = _app.getResources();

    getDesktopContainer().setDesktopManager(new SquirrelDesktopManager(_app));

    final Container content = getContentPane();

    content.setLayout(new BorderLayout());
    final JScrollPane sp = new JScrollPane(getDesktopContainer().getComponent());
    sp.setBorder(BorderFactory.createEmptyBorder());

    _msgPnl = new MessagePanel()
      {
         public void setSize(int width, int height)
         {
            super.setSize(width, height);
            if(0 < width && 0 < height)
            {
               // The call here is the result of a desperate fight
               // to find a place where the components in the split
               // had not height = 0. If someone knows a better way
               // please tell me I'll apreciate any advice.
               // gerdwagner@users.sourceforge.net
               resizeSplitOnStartup();
            }
         }
      };
      _msgPnl.setName(MessagePanel.class.toString());
    _msgPnl.setEditable(false);


    _splitPn = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    _splitPn.add(sp);
    _splitPn.add(new JScrollPane(_msgPnl));

      _splitPn.setResizeWeight(1);

      //i18n[MainFrame.saveSize=Save size]
      String key = s_stringMgr.getString("MainFrame.saveSize");
      Action splitDividerLocAction = new AbstractAction(key)
      {
         public void actionPerformed(ActionEvent e)
         {
            int msgPanelHeight = _splitPn.getBottomComponent().getSize().height;
            Preferences.userRoot().putInt(PREFS_KEY_MESSAGEPANEL_HEIGHT, msgPanelHeight);
         }
      };
      _msgPnl.addToMessagePanelPopup(splitDividerLocAction);

      //i18n[MainFrame.restoreSize=Restore saved size]
      key = s_stringMgr.getString("MainFrame.restoreSize");
     
      Action setSplitDividerLocAction = new AbstractAction(key)
      {
         public void actionPerformed(ActionEvent e)
         {
            int prefMsgPanelHeight = Preferences.userRoot().getInt(PREFS_KEY_MESSAGEPANEL_HEIGHT, -1);
            if(-1 != prefMsgPanelHeight)
            {
               int divLoc = getDividerLocation(prefMsgPanelHeight, _splitPn);
               _splitPn.setDividerLocation(divLoc);
            }
         }
      };
      _msgPnl.addToMessagePanelPopup(setSplitDividerLocAction);



    content.add(_splitPn, BorderLayout.CENTER);

    _statusBar = new MainFrameStatusBar(_app);
    final Font fn = _app.getFontInfoStore().getStatusBarFontInfo().createFont();
    _statusBar.setFont(fn);

    setJMenuBar(new MainFrameMenuBar(_app, getDesktopContainer(), _app.getActionCollection()));

    setupFromPreferences();

    final ImageIcon icon = rsrc.getIcon(SquirrelResources.IImageNames.APPLICATION_ICON);
    if (icon != null)
    {
      setIconImage(icon.getImage());
    }
    else
View Full Code Here


   * Create user interface.
   */
  private void createGUI() throws IOException
  {
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    final SquirrelResources rsrc = _app.getResources();
    final ImageIcon icon = rsrc.getIcon(SquirrelResources.IImageNames.VIEW);
    if (icon != null)
    {
      setIconImage(icon.getImage());
    }

View Full Code Here

    _tree.setShowsRootHandles(true);
    _tree.addTreeSelectionListener(new ObjectTreeSelectionListener());

    // Renderer for tree.
    DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
    SquirrelResources rsrc = _app.getResources();
    renderer.setLeafIcon(rsrc.getIcon(SquirrelResources.IImageNames.HELP_TOPIC));
    renderer.setOpenIcon(rsrc.getIcon(SquirrelResources.IImageNames.HELP_TOC_OPEN));
    renderer.setClosedIcon(rsrc.getIcon(SquirrelResources.IImageNames.HELP_TOC_CLOSED));
    _tree.setCellRenderer(renderer);

     // First put the Welcome to SQuirreL node.
     File file = appFiles.getWelcomeFile();
     try
View Full Code Here

        private static final long serialVersionUID = 1L;

        AboutPanel(IApplication app)
    {
      super();
      final SquirrelResources rsrc = app.getResources();
      setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
      setLayout(new BorderLayout());
      setBackground(new Color(SquirrelResources.S_SPLASH_IMAGE_BACKGROUND));
      Icon icon = rsrc.getIcon(SquirrelResources.IImageNames.SPLASH_SCREEN);
      add(BorderLayout.CENTER, new JLabel(icon));
           
            VersionPane versionPane = new VersionPane(true);
            versionPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
            add(BorderLayout.SOUTH, versionPane);
View Full Code Here

        SquirrelPreferences prefs = _app.getSquirrelPreferences();
    @SuppressWarnings("unchecked")
        DriversCombo()
    {
      super();
      SquirrelResources res = _app.getResources();
      setRenderer(new DriverListCellRenderer(res.getIcon("list.driver.found"),
                      res.getIcon("list.driver.notfound")));
      List<ISQLDriver> list = new ArrayList<ISQLDriver>();
      for (Iterator it = AliasInternalFrame.this._app.getDataCache().drivers();
          it.hasNext();)
      {
        ISQLDriver sqlDriver = ((ISQLDriver) it.next());
View Full Code Here

    _app = app;
    _model = (DriversListModel) getList().getModel();

      getList().setLayout(new BorderLayout());

    SquirrelResources res = _app.getResources();
    getList().setCellRenderer(new DriverListCellRenderer(res.getIcon("list.driver.found"),res.getIcon("list.driver.notfound")));

    propertiesChanged(null);


    _app.getSquirrelPreferences().addPropertyChangeListener(new PropertyChangeListener()
View Full Code Here

  {
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());
    contentPane.add(new HtmlViewerPanel(_documentURL), BorderLayout.CENTER);
    final SquirrelResources rsrc = _app.getResources();
    final ImageIcon icon = rsrc.getIcon(SquirrelResources.IImageNames.APPLICATION_ICON);
    if (icon != null)
    {
      setIconImage(icon.getImage());
    }
    pack();
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.resources.SquirrelResources

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.