net.sourceforge.squirrel_sql.client.Version类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中net.sourceforge.squirrel_sql.client.Version类的一些代码示例,展示了Version类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version类的具体详情如下:
包路径:net.sourceforge.squirrel_sql.client.Version
类名称:Version

Version介绍

[英]Application version information.
[中]应用程序版本信息。

代码示例

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public static void main(String[] args) {
  System.out.println("Version: "+getShortVersion());
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

/**
 * Constructs the text that gets rendered.
 *
 * @return version and copyright info ( and possibly website url )
 */
private String getContent() {
  StringBuffer text = new StringBuffer();
  text.append(Version.getVersion());
  text.append("\n");
  text.append(Version.getCopyrightStatement());
   if (_showWebsite) {
     text.append("\n");
     if (!Desktop.isDesktopSupported()) {
       text.append(Version.getWebSite());
     }
   }
  return text.toString();
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public static String getVersion()
{
  StringBuffer buf = new StringBuffer();
  buf.append(APP_NAME);
  buf.append(" ");
  if (!isSnapshotVersion()) {
    buf.append("Version ");
  }
  buf.append(getShortVersion());
  return buf.toString();
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

/**
 * Load from preferences file.
 */
private void loadPrefs()
{
  try
  {
    XMLBeanReader doc = new XMLBeanReader();
    FileWrapper prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
    doc.load(prefFile, _prefs.getClass().getClassLoader());
    Iterator<Object> it = doc.iterator();
    if (it.hasNext())
    {
      _prefs = (IQueryTokenizerPreferenceBean) it.next();
    }
  }
  catch (FileNotFoundException ignore)
  {
    s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
  }
  catch (Exception ex)
  {
    s_log.error("Error occured reading from preferences file: " + USER_PREFS_FILE_NAME, ex);
  }
  _prefs.setClientName(Version.getApplicationName() + "/" + plugin.getDescriptiveName());
  _prefs.setClientVersion(Version.getShortVersion() + "/" + plugin.getVersion());
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

private void paintCopyrigthAndVersion(FontMetrics fontMetrics)
{
 String[] splits = Version.getCopyrightStatement().split("\\n");
 int xVers = (_splashScreen.getSize().width - fontMetrics.getStringBounds(Version.getVersion(), _graphics).getBounds().width) / 2;
 int yVers = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length + 1) * (fontMetrics.getHeight() + 5)));
 _graphics.drawString(Version.getVersion(), xVers, yVers);
 for (int i = 0; i < splits.length; i++)
 {
   int xSpilt = (_splashScreen.getSize().width - fontMetrics.getStringBounds(splits[i], _graphics).getBounds().width) / 2;
   int ySplit = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length - i) * (fontMetrics.getHeight() + 5)));
   _graphics.drawString(splits[i], xSpilt, ySplit);
 }
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

/**
 * Application entry point.
 *
 * @param    args    Arguments passed on command line.
 */
public static void main(String[] args) throws IOException
{
  if (ApplicationArguments.initialize(args))
  {
   if(false == Version.supportsUsedJDK())
   {
    JOptionPane.showMessageDialog(null, Version.getUnsupportedJDKMessage());
    System.exit(-1);
   }
    final ApplicationArguments appArgs = ApplicationArguments.getInstance();
    if (appArgs.getShowHelp())
    {
      appArgs.printHelp();
    }
    else
    {
    startApp();
   }
  }
}

代码示例来源:origin: realXuJiang/bigtable-sql

/**
 * Returns the home page for this plugin.
 *
 * @return    the home page for this plugin.
 */
public String getWebSite()
{
  return Version.getWebSite();
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

super(Version.getVersion());
if (app == null)

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public UpdateSettings()
{
  if (Version.isSnapshotVersion())
  {
    updateServerChannel = "snapshot";
  }
}

代码示例来源:origin: realXuJiang/bigtable-sql

/**
 * Load from preferences file.
 */
private void loadPrefs()
{
  try
  {
    XMLBeanReader doc = new XMLBeanReader();
    FileWrapper prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
    doc.load(prefFile, _prefs.getClass().getClassLoader());
    Iterator<Object> it = doc.iterator();
    if (it.hasNext())
    {
      _prefs = (IQueryTokenizerPreferenceBean) it.next();
    }
  }
  catch (FileNotFoundException ignore)
  {
    s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
  }
  catch (Exception ex)
  {
    s_log.error("Error occured reading from preferences file: " + USER_PREFS_FILE_NAME, ex);
  }
  _prefs.setClientName(Version.getApplicationName() + "/" + plugin.getDescriptiveName());
  _prefs.setClientVersion(Version.getShortVersion() + "/" + plugin.getVersion());
}

代码示例来源:origin: realXuJiang/bigtable-sql

private void paintCopyrigthAndVersion(FontMetrics fontMetrics)
{
 String[] splits = Version.getCopyrightStatement().split("\\n");
 int xVers = (_splashScreen.getSize().width - fontMetrics.getStringBounds(Version.getVersion(), _graphics).getBounds().width) / 2;
 int yVers = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length + 1) * (fontMetrics.getHeight() + 5)));
 _graphics.drawString(Version.getVersion(), xVers, yVers);
 for (int i = 0; i < splits.length; i++)
 {
   int xSpilt = (_splashScreen.getSize().width - fontMetrics.getStringBounds(splits[i], _graphics).getBounds().width) / 2;
   int ySplit = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length - i) * (fontMetrics.getHeight() + 5)));
   _graphics.drawString(splits[i], xSpilt, ySplit);
 }
}

代码示例来源:origin: realXuJiang/bigtable-sql

/**
 * Application entry point.
 *
 * @param    args    Arguments passed on command line.
 */
public static void main(String[] args) throws IOException
{
  if (ApplicationArguments.initialize(args))
  {
   if(false == Version.supportsUsedJDK())
   {
    JOptionPane.showMessageDialog(null, Version.getUnsupportedJDKMessage());
    System.exit(-1);
   }
    final ApplicationArguments appArgs = ApplicationArguments.getInstance();
    if (appArgs.getShowHelp())
    {
      appArgs.printHelp();
    }
    else
    {
    startApp();
   }
  }
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

/**
 * Returns the home page for this plugin.
 *
 * @return    the home page for this plugin.
 */
public String getWebSite()
{
  return Version.getWebSite();
}

代码示例来源:origin: realXuJiang/bigtable-sql

super(Version.getVersion());
if (app == null)

代码示例来源:origin: realXuJiang/bigtable-sql

public UpdateSettings()
{
  if (Version.isSnapshotVersion())
  {
    updateServerChannel = "snapshot";
  }
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/sqlval

_prefs.setClientName(Version.getApplicationName() + "/" + getDescriptiveName());
_prefs.setClientVersion(Version.getShortVersion() + "/" + getVersion());

代码示例来源:origin: realXuJiang/bigtable-sql

public static void main(String[] args) {
  System.out.println("Version: "+getShortVersion());
}

代码示例来源:origin: realXuJiang/bigtable-sql

public static String getVersion()
{
  StringBuffer buf = new StringBuffer();
  buf.append(APP_NAME);
  buf.append(" ");
  if (!isSnapshotVersion()) {
    buf.append("Version ");
  }
  buf.append(getShortVersion());
  return buf.toString();
}

代码示例来源:origin: realXuJiang/bigtable-sql

/**
 * Constructs the text that gets rendered.
 *
 * @return version and copyright info ( and possibly website url )
 */
private String getContent() {
  StringBuffer text = new StringBuffer();
  text.append(Version.getVersion());
  text.append("\n");
  text.append(Version.getCopyrightStatement());
   if (_showWebsite) {
     text.append("\n");
     if (!Desktop.isDesktopSupported()) {
       text.append(Version.getWebSite());
     }
   }
  return text.toString();
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

private void doStartupLogging()
  {
    final ILogger log = createLogger(getClass());
    log.info("#############################################################################################################");
    log.info("# Starting " + Version.getVersion() + " at " + DateFormat.getInstance().format(new Date()));
    log.info("#############################################################################################################");
    log.info(Version.getVersion() + " started: " + Calendar.getInstance().getTime());
    log.info(Version.getCopyrightStatement());
    log.info("java.vendor: " + System.getProperty("java.vendor"));
    log.info("java.version: " + System.getProperty("java.version"));
    log.info("java.runtime.name: " + System.getProperty("java.runtime.name"));
    log.info("os.name: " + System.getProperty("os.name"));
    log.info("os.version: " + System.getProperty("os.version"));
    log.info("os.arch: " + System.getProperty("os.arch"));
    log.info("user.dir: " + System.getProperty("user.dir"));
    log.info("user.home: " + System.getProperty("user.home"));
    log.info("java.home: " + System.getProperty("java.home"));
    log.info("java.class.path: " + System.getProperty("java.class.path"));
  }
}

相关文章