예제 #1
0
public interface MoonIcons {
  final String PATH = "/icons/";

  final Icon MOON_ICON = IconLoader.findIcon(PATH + "Moon.png");
  final Icon MOON_FUNCTION = IconLoader.findIcon(PATH + "function.png");

  final Icon MOON_IDEA_MODULE_ICON = IconLoader.findIcon(PATH + "logo_24x24.png");
  final Icon TAIL_RECURSION = IconLoader.findIcon(PATH + "repeat-icon-16x16.png");
}
예제 #2
0
/** @author mrubino */
public class RobotFeatureFileType extends LanguageFileType {

  private static final Icon ROBOT_ICON = IconLoader.findIcon("/images/robot_icon.png");
  private static final RobotFeatureFileType INSTANCE = new RobotFeatureFileType();

  public static RobotFeatureFileType getInstance() {
    return INSTANCE;
  }

  private RobotFeatureFileType() {
    super(RobotLanguage.INSTANCE);
  }

  @NotNull
  public String getName() {
    return "Robot Feature";
  }

  @NotNull
  public String getDescription() {
    return "Robot Feature Files";
  }

  @NotNull
  public String getDefaultExtension() {
    return "robot";
  }

  @Nullable
  public Icon getIcon() {
    return ROBOT_ICON;
  }
}
예제 #3
0
 @NotNull
 private static Icon createEmptyIconLike(@NotNull String baseIconPath) {
   Icon baseIcon = IconLoader.findIcon(baseIconPath);
   if (baseIcon == null) {
     return EmptyIcon.ICON_16;
   }
   return new EmptyIcon(baseIcon.getIconWidth(), baseIcon.getIconHeight());
 }
 protected Icon icon(String... iconPaths) {
   try {
     for (String iconPath : iconPaths) {
       Icon icon = IconLoader.findIcon(iconPath, getClass(), true);
       if (icon != null) return icon;
     }
   } catch (Exception e) {
   }
   return null;
 }
예제 #5
0
  protected Object parseValue(String key, @NotNull String value) {
    if ("null".equals(value)) {
      return null;
    }

    if (key.endsWith("Insets")) {
      return parseInsets(value);
    } else if (key.endsWith("Border") || key.endsWith("border")) {

      try {
        if (StringUtil.split(value, ",").size() == 4) {
          return new BorderUIResource.EmptyBorderUIResource(parseInsets(value));
        } else {
          return Class.forName(value).newInstance();
        }
      } catch (Exception e) {
        log(e);
      }
    } else {
      final Color color = parseColor(value);
      final Integer invVal = getInteger(value);
      final Boolean boolVal =
          "true".equals(value) ? Boolean.TRUE : "false".equals(value) ? Boolean.FALSE : null;
      Icon icon = value.startsWith("AllIcons.") ? IconLoader.getIcon(value) : null;
      if (icon == null && value.endsWith(".png")) {
        icon = IconLoader.findIcon(value, DarculaLaf.class, true);
      }
      if (color != null) {
        return new ColorUIResource(color);
      } else if (invVal != null) {
        return invVal;
      } else if (icon != null) {
        return new IconUIResource(icon);
      } else if (boolVal != null) {
        return boolVal;
      }
    }
    return value;
  }
/**
 * @author VISTALL
 * @since 12.04.2015
 */
public interface ConsuloSandboxIcons {
  Icon Icon16_Sandbox = IconLoader.findIcon("/icon16-sandbox.png");
}
 private MyUseSoftWrapsAction(boolean turned) {
   super("Use soft wraps");
   myIcon = IconLoader.findIcon("/actions/checked.png");
 }
예제 #8
0
 public static Icon loadIcon(String iconName) {
   return IconLoader.findIcon(
       "/com/intellij/ide/ui/laf/icons/" + iconName, DarculaLaf.class, true);
 }