// Path: src/com/github/kennedyoliveira/ultimatepastebin/i18n/MessageBundle.java
// @Nullable
// public static String getMessage(String key, Object... params) {
//   return CommonBundle.message(getBundle(), key, params);
// }


import com.github.kennedyoliveira.pastebin4j.UserInformation;
import javax.swing.*;
import static com.github.kennedyoliveira.ultimatepastebin.i18n.MessageBundle.getMessage;
package com.github.kennedyoliveira.ultimatepastebin.ui;




/**
 * <p>Wrapper for a {@link com.github.kennedyoliveira.pastebin4j.UserInformation}</p>
 *
 * @author kennedy
 */
public class UserNode implements IconVisitable {

  private UserInformation userInformation;

  public UserNode(UserInformation userInformation) {
    this.userInformation = userInformation;
  }

  public UserInformation getUserInformation() {
    return userInformation;
  }

  public void setUserInformation(UserInformation userInformation) {
    this.userInformation = userInformation;
  }

  @Override
  public String toString() {
// Path: src/com/github/kennedyoliveira/ultimatepastebin/i18n/MessageBundle.java
// @Nullable
// public static String getMessage(String key, Object... params) {
//   return CommonBundle.message(getBundle(), key, params);
// }


// Path: src/com/github/kennedyoliveira/ultimatepastebin/ui/UserNode.java
import com.github.kennedyoliveira.pastebin4j.UserInformation;
import javax.swing.*;
import static com.github.kennedyoliveira.ultimatepastebin.i18n.MessageBundle.getMessage;

package com.github.kennedyoliveira.ultimatepastebin.ui;




/**
 * <p>Wrapper for a {@link com.github.kennedyoliveira.pastebin4j.UserInformation}</p>
 *
 * @author kennedy
 */
public class UserNode implements IconVisitable {

  private UserInformation userInformation;

  public UserNode(UserInformation userInformation) {
    this.userInformation = userInformation;
  }

  public UserInformation getUserInformation() {
    return userInformation;
  }

  public void setUserInformation(UserInformation userInformation) {
    this.userInformation = userInformation;
  }

  @Override
  public String toString() {
    return userInformation != null ? getMessage("ultimatepastebin.user.loggedin", userInformation.getUsername()) : getMessage("ultimatepastebin.user.loggedout");