Package org.sylfra.idea.plugins.revu.settings.app

Examples of org.sylfra.idea.plugins.revu.settings.app.RevuAppSettings


  /**
   * {@inheritDoc}
   */
  public boolean isModified()
  {
    RevuAppSettings appSettings = retrieveAppSettings();

    if (!tfLogin.getText().equals(appSettings.getLogin()))
    {
      return true;
    }

    for (Map.Entry<IssueStatus, JPanel> entry : pnIssueStatusColors.entrySet())
    {
      if (!appSettings.getIssueStatusColors().get(entry.getKey()).equals(
        RevuUtils.getHex(entry.getValue().getBackground())))
      {
        return true;
      }
    }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  public void apply() throws ConfigurationException
  {
    RevuAppSettings appSettings = retrieveAppSettings();

    appSettings.setLogin(tfLogin.getText());

    for (Map.Entry<IssueStatus, JPanel> entry : pnIssueStatusColors.entrySet())
    {
      appSettings.getIssueStatusColors().put(entry.getKey(), RevuUtils.getHex(entry.getValue().getBackground()));
    }

    ServiceManager.getService(RevuAppSettingsComponent.class).loadState(appSettings);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void reset()
  {
    RevuAppSettings appSettings = retrieveAppSettings();

    tfLogin.setText(appSettings.getLogin());

    for (Map.Entry<IssueStatus, JPanel> entry : pnIssueStatusColors.entrySet())
    {
      entry.getValue().setBackground(Color.decode(appSettings.getIssueStatusColors().get(entry.getKey())));
    }
  }
View Full Code Here

  private void checkMessagePane()
  {
    String message = null;

    // Login set
    RevuAppSettings appSettings = RevuUtils.getAppSettings();

    if ((appSettings.getLogin() == null) || (appSettings.getLogin().trim().length() == 0))
    {
      message = RevuBundle.message("general.form.noLogin.text");
      messageClickHandler.setType(MessageClickHandler.Type.NO_LOGIN);
    }
    else
View Full Code Here

  }

  @Nullable
  public static User getCurrentUser()
  {
    RevuAppSettings appSettings = ServiceManager.getService(RevuAppSettingsComponent.class).getState();
    if ((appSettings.getLogin() == null) || (appSettings.getLogin().trim().length() == 0))
    {
      return null;
    }

    User user = new User();
    user.setLogin(appSettings.getLogin());
    user.setPassword(appSettings.getPassword());
    user.setDisplayName(appSettings.getLogin());

    return user;
  }
View Full Code Here

  }

  public static Color getIssueStatusColor(@NotNull IssueStatus status)
  {
    // @TODO manage Colors in cache (already done in IssueTable)
    RevuAppSettings appSettings = ApplicationManager.getApplication().getComponent(RevuAppSettingsComponent.class)
      .getState();
    return Color.decode(appSettings.getIssueStatusColors().get(status));
  }
View Full Code Here

  }

  @Nullable
  public static User getCurrentUser()
  {
    RevuAppSettings appSettings = ServiceManager.getService(RevuAppSettingsComponent.class).getState();
    if (appSettings.getLogin() == null)
    {
      return null;
    }

    User user = new User();
    user.setLogin(appSettings.getLogin());
    user.setPassword(appSettings.getPassword());
    user.setDisplayName(appSettings.getLogin());

    return user;
  }
View Full Code Here

  }

  public static Color getIssueStatusColor(@NotNull IssueStatus status)
  {
    // @TODO manage Colors in cache (already done in IssueTable)
    RevuAppSettings appSettings = ApplicationManager.getApplication().getComponent(RevuAppSettingsComponent.class)
      .getState();
    return Color.decode(appSettings.getIssueStatusColors().get(status));
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public boolean isModified()
  {
    RevuAppSettings appSettings = retrieveAppSettings();

    if (!tfLogin.getText().equals(appSettings.getLogin()))
    {
      return true;
    }

    for (Map.Entry<IssueStatus, JPanel> entry : pnIssueStatusColors.entrySet())
    {
      if (!appSettings.getIssueStatusColors().get(entry.getKey()).equals(
        RevuUtils.getHex(entry.getValue().getBackground())))
      {
        return true;
      }
    }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void apply() throws ConfigurationException
  {
    RevuAppSettings appSettings = retrieveAppSettings();

    appSettings.setLogin(tfLogin.getText());

    for (Map.Entry<IssueStatus, JPanel> entry : pnIssueStatusColors.entrySet())
    {
      appSettings.getIssueStatusColors().put(entry.getKey(), RevuUtils.getHex(entry.getValue().getBackground()));
    }

    ServiceManager.getService(RevuAppSettingsComponent.class).loadState(appSettings);
  }
View Full Code Here

TOP

Related Classes of org.sylfra.idea.plugins.revu.settings.app.RevuAppSettings

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.