Examples of RGBPaletteReader


Examples of org.jwildfire.create.tina.io.RGBPaletteReader

      List<String> resLst = Arrays.asList(ressources);
      Collections.sort(resLst);
      ressources = (String[]) resLst.toArray();

      // for the base path inside the jar file
      RGBPaletteReader reader = new Flam3GradientReader();
      DefaultMutableTreeNode defaultFolderNode = null;
      for (String ressource : ressources) {
        try {
          InputStream is = reader.getClass().getResourceAsStream(ressource);
          if (is != null) {
            List<RGBPalette> palettes = reader.readPalettes(is);
            if (palettes.size() > 0) {
              GradientInternalNode node = new GradientInternalNode(ressource);
              node.getGradientLibraryList().addAll(palettes);
              if (defaultFolderNode == null) {
                defaultFolderNode = new DefaultMutableTreeNode("Built-in gradients (read-only)", true);
View Full Code Here

Examples of org.jwildfire.create.tina.io.RGBPaletteReader

  public void runScript(String filename, boolean internal) {
    try {
      String script;
      if (internal) {
        RGBPaletteReader reader = new Flam3GradientReader();
        InputStream is = reader.getClass().getResourceAsStream(filename);
        script = Tools.readUTF8Textfile(is);
      }
      else {
        script = Tools.readUTF8Textfile(filename);
      }
View Full Code Here

Examples of org.jwildfire.create.tina.io.RGBPaletteReader

      List<String> resLst = Arrays.asList(ressources);
      Collections.sort(resLst);
      ressources = (String[]) resLst.toArray();

      // for the base path inside the jar file
      RGBPaletteReader reader = new Flam3GradientReader();
      DefaultMutableTreeNode defaultFolderNode = null;
      for (String ressource : ressources) {
        try {
          String resFilename = "scripts/" + ressource + "." + Tools.FILEEXT_JWFSCRIPT;
          InputStream is = reader.getClass().getResourceAsStream(resFilename);
          if (is != null) {

            ScriptInternalNode node = new ScriptInternalNode(ressource, resFilename);

            if (defaultFolderNode == null) {
View Full Code Here

Examples of org.jwildfire.create.tina.io.RGBPaletteReader

    @Override
    public String getScript() throws Exception {
      if (script == null) {
        // for the base path inside the jar file
        RGBPaletteReader reader = new Flam3GradientReader();
        InputStream is = reader.getClass().getResourceAsStream(resFilename);
        if (is != null) {
          script = Tools.readUTF8Textfile(is);
        }
        else {
          script = "";
View Full Code Here

Examples of org.jwildfire.create.tina.io.RGBPaletteReader

    @Override
    public String getDescription() throws Exception {
      if (description == null) {
        // for the base path inside the jar file
        RGBPaletteReader reader = new Flam3GradientReader();
        String filename = resFilename.substring(0, resFilename.length() - Tools.FILEEXT_JWFSCRIPT.length()) + Tools.FILEEXT_TXT;
        InputStream is = reader.getClass().getResourceAsStream(filename);
        if (is != null) {
          description = Tools.readUTF8Textfile(is);
        }
        else {
          description = "";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.