Changeset 99

Show
Ignore:
Timestamp:
18/03/08 14:06:43 (8 months ago)
Author:
altglass
Message:

Output XML code is now indented

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/README.TXT

    r90 r99  
    1 VLC Skin Editor release 0.6.1
     1VLC Skin Editor release 0.7.0
    22----------------------------------------------------------- 
    33Changelog: 
    44----------------------------------------------------------- 
    5 0.7.0a - Preview can be saved as image 
     50.7.0b - Preview can be saved as image 
    66       - Improved SubBitmap editing 
     7       - Resources/windows/layouts can be duplicated easily 
     8       - XML output is now indented 
     9       - Slider backgrounds can be generated in a wizard 
    7100.6.1b - Critical bufix for the Preview Window  
    811       - Bugfix for slider points parsing and XML parsing 
  • trunk/src/vlcskineditor/Item.java

    r96 r99  
    7777  public abstract void update(); 
    7878  /** Creates the XML code representing the item */ 
    79   public abstract String returnCode(); 
     79  public abstract String returnCode(String indent); 
    8080  /** Draws the item to a graphics context */ 
    8181  public abstract void draw(Graphics2D g); 
  • trunk/src/vlcskineditor/Layout.java

    r96 r99  
    364364  /** 
    365365   * Generates the XML code represented by this Layout. 
     366   * @param ident Indentation 
    366367   * @return The XML code. 
    367368   */ 
    368   public String returnCode() { 
    369     String code ="<Layout"; 
    370     if (id!=ID_DEFAULT) code+=" id=\""+id+"\""; 
     369  public String returnCode(String indent) { 
     370    String code =indent+"<Layout"; 
     371    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    371372    code+=" width=\""+String.valueOf(width)+"\" height=\""+String.valueOf(height)+"\""; 
    372373    if (minwidth!=MINWIDTH_DEFAULT) code+=" minwidth=\""+String.valueOf(minwidth)+"\""; 
     
    376377    code+=">"; 
    377378    for (int i=0;i<items.size();i++) { 
    378       code+="\n"+items.get(i).returnCode(); 
    379     } 
    380     code+="\n</Layout>"; 
     379      code+="\n"+items.get(i).returnCode(indent+Skin.indentation); 
     380    } 
     381    code+="\n"+indent+"</Layout>"; 
    381382    return code; 
    382383  } 
  • trunk/src/vlcskineditor/Main.java

    r98 r99  
    4747   
    4848  //The version identification of the current build.    
    49   public final String VERSION = "0.7.0.a"; 
     49  public final String VERSION = "0.7.0.b"; 
    5050  //The directory in which the VLC executable is found 
    5151  String vlc_dir = ""; 
     
    10361036      if(r.getClass()==Bitmap.class) { 
    10371037        Bitmap b = (Bitmap)r;         
    1038         Bitmap b2 = new Bitmap(b.returnCode(),s);         
     1038        Bitmap b2 = new Bitmap(b.returnCode(""),s);         
    10391039        b2.renameForCopy(p); 
    10401040        s.resources.add(b2); 
     
    10441044      else if(r.getClass()==SubBitmap.class) { 
    10451045        SubBitmap sb = (SubBitmap)r;         
    1046         SubBitmap sb2 = new SubBitmap(sb.returnCode(),s,sb.getParentBitmap()); 
     1046        SubBitmap sb2 = new SubBitmap(sb.returnCode(""),s,sb.getParentBitmap()); 
    10471047        sb2.renameForCopy(p); 
    10481048        sb.getParentBitmap().SubBitmaps.add(sb2); 
     
    10521052      else { 
    10531053        vlcskineditor.resources.Font f = (vlcskineditor.resources.Font)r;         
    1054         vlcskineditor.resources.Font f2 = new vlcskineditor.resources.Font(f.returnCode(),s); 
     1054        vlcskineditor.resources.Font f2 = new vlcskineditor.resources.Font(f.returnCode(""),s); 
    10551055        f2.renameForCopy(p); 
    10561056        s.resources.add(f2); 
     
    10681068            Window w = s.getWindow(selected_window); 
    10691069            if(w==null) return; 
    1070             Window w_ = new Window(w.returnCode(), s); 
     1070            Window w_ = new Window(w.returnCode(""), s); 
    10711071            w_.renameForCopy(p); 
    10721072            s.windows.add(w_); 
     
    10761076            Window w = s.getWindow(selected_window); 
    10771077            Layout l = w.getLayout(selected_layout); 
    1078             Layout l_ = new Layout(l.returnCode(), w, s); 
     1078            Layout l_ = new Layout(l.returnCode(""), w, s); 
    10791079            l_.renameForCopy(p); 
    10801080            w.layouts.add(l_); 
     
    10921092        if(i==null) return;         
    10931093        if(i.getClass()==Anchor.class) { 
    1094             Anchor a = new Anchor(i.returnCode(), s); 
     1094            Anchor a = new Anchor(i.returnCode(""), s); 
    10951095            //Because IDs of Anchors are not stored in the XML and can thus not be copied via returnCode() 
    10961096            a.id = i.id; 
     
    11011101        } 
    11021102        else if(i.getClass()==vlcskineditor.items.Button.class) { 
    1103             vlcskineditor.items.Button b = new vlcskineditor.items.Button(i.returnCode(), s); 
     1103            vlcskineditor.items.Button b = new vlcskineditor.items.Button(i.returnCode(""), s); 
    11041104            b.renameForCopy(p); 
    11051105            s.getParentListOf(i.id).add(b); 
     
    11081108        } 
    11091109        else if(i.getClass()==vlcskineditor.items.Checkbox.class) { 
    1110             vlcskineditor.items.Checkbox c = new vlcskineditor.items.Checkbox(i.returnCode(), s); 
     1110            vlcskineditor.items.Checkbox c = new vlcskineditor.items.Checkbox(i.returnCode(""), s); 
    11111111            c.renameForCopy(p); 
    11121112            s.getParentListOf(i.id).add(c); 
     
    11151115        } 
    11161116        else if(i.getClass()==Group.class) { 
    1117             Group g = new Group(i.returnCode(), s); 
     1117            Group g = new Group(i.returnCode(""), s); 
    11181118            g.renameForCopy(p); 
    11191119            s.getParentListOf(i.id).add(g); 
     
    11221122        }         
    11231123        else if(i.getClass()==vlcskineditor.items.Image.class) { 
    1124             vlcskineditor.items.Image im = new vlcskineditor.items.Image(i.returnCode(), s); 
     1124            vlcskineditor.items.Image im = new vlcskineditor.items.Image(i.returnCode(""), s); 
    11251125            im.renameForCopy(p); 
    11261126            s.getParentListOf(i.id).add(im); 
     
    11291129        } 
    11301130        else if(i.getClass()==vlcskineditor.items.Panel.class) { 
    1131             vlcskineditor.items.Panel pa = new vlcskineditor.items.Panel(i.returnCode(), s); 
     1131            vlcskineditor.items.Panel pa = new vlcskineditor.items.Panel(i.returnCode(""), s); 
    11321132            pa.renameForCopy(p); 
    11331133            s.getParentListOf(i.id).add(pa); 
     
    11361136        } 
    11371137        else if(i.getClass()==Playtree.class) { 
    1138             Playtree pl = new Playtree(i.returnCode(), s); 
     1138            Playtree pl = new Playtree(i.returnCode(""), s); 
    11391139            pl.renameForCopy(p); 
    11401140            s.getParentListOf(i.id).add(pl); 
     
    11431143        } 
    11441144        else if(i.getClass()==RadialSlider.class) { 
    1145             RadialSlider r = new RadialSlider(i.returnCode(), s); 
     1145            RadialSlider r = new RadialSlider(i.returnCode(""), s); 
    11461146            r.renameForCopy(p); 
    11471147            s.getParentListOf(i.id).add(r); 
     
    11501150        } 
    11511151        else if(i.getClass()==Slider.class) { 
    1152             Slider sl = new Slider(i.returnCode(), s); 
     1152            Slider sl = new Slider(i.returnCode(""), s); 
    11531153            sl.renameForCopy(p); 
    11541154            java.util.List<Item> l = s.getParentListOf(i.id); 
     
    11681168        } 
    11691169        else if(i.getClass()==Text.class) { 
    1170             Text t = new Text(i.returnCode(), s); 
     1170            Text t = new Text(i.returnCode(""), s); 
    11711171            t.renameForCopy(p); 
    11721172            s.getParentListOf(i.id).add(t); 
     
    11751175        } 
    11761176        else if(i.getClass()==Video.class) { 
    1177             Video v = new Video(i.returnCode(), s); 
     1177            Video v = new Video(i.returnCode(""), s); 
    11781178            v.renameForCopy(p); 
    11791179            s.getParentListOf(i.id).add(v); 
  • trunk/src/vlcskineditor/Resource.java

    r96 r99  
    4343  public abstract void update(); 
    4444  /** Creates the XML code representing the resource */   
    45   public abstract String returnCode(); 
     45  public abstract String returnCode(String indent); 
    4646  /** Creates a DefaultMutableTreeNode to be displayed in the resources tree */ 
    4747  public abstract DefaultMutableTreeNode getTreeNode();   
  • trunk/src/vlcskineditor/Skin.java

    r98 r99  
    7979  //Central window handle for all editing dialogs of res/win/layout/items 
    8080  public JFrame edit_frame;  
     81   
     82  //Default indentation of generated XML code 
     83  public static String indentation = "  "; 
    8184   
    8285  public Skin(Main m_) { 
     
    552555    if(theme_movealpha!=THEME_MOVEALPHA_DEFAULT) code+=" movealpha=\""+String.valueOf(theme_movealpha)+"\""; 
    553556    code+=">\n"; 
    554     code+="<ThemeInfo"; 
     557    code+=Skin.indentation+"<ThemeInfo"; 
    555558    code+=" name=\""+themeinfo_name+"\""; 
    556559    code+=" author=\""+themeinfo_author+"\""; 
    557560    code+=" email=\""+themeinfo_email+"\""; 
    558561    code+=" webpage=\""+themeinfo_webpage+"\""; 
    559     code+="/>\n";     
    560     code+="<!-- Created using the VLC Skin Editor "+m.VERSION+" (http://www.videolan.org/vlc/skineditor.php)-->\n"; 
     562    code+="/>\n\n";     
     563    code+=Skin.indentation+"<!-- Created using the VLC Skin Editor "+m.VERSION+" (http://www.videolan.org/vlc/skineditor.php)-->\n\n"; 
    561564    for (int i=0;i<resources.size();i++) { 
    562       code+=resources.get(i).returnCode(); 
     565      code+=resources.get(i).returnCode(Skin.indentation); 
    563566    } 
    564567    code+="\n"; 
    565568    for (int i=0;i<windows.size();i++) { 
    566       code+=windows.get(i).returnCode();       
     569      code+=windows.get(i).returnCode(Skin.indentation);       
    567570    } 
    568571    code += "\n</Theme>"; 
  • trunk/src/vlcskineditor/Window.java

    r96 r99  
    257257    layouts.add(new Layout(this,s)); 
    258258  } 
    259   public String returnCode() { 
    260     String code = "<Window"; 
    261     if(id!=ID_DEFAULT) code+=" id=\""+id+"\""; 
    262     if(visible!=VISIBLE_DEFAULT) code+=" visible=\""+String.valueOf(visible)+"\""; 
     259  public String returnCode(String indent) { 
     260    String code = indent+"<Window"; 
     261    if(!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
     262    if(!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+String.valueOf(visible)+"\""; 
    263263    if(x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    264264    if(y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 
     
    267267    code+=">"; 
    268268    for (int i=0;i<layouts.size();i++) { 
    269       code+="\n"+layouts.get(i).returnCode(); 
    270     } 
    271     code+="\n</Window>\n";     
     269      code+="\n"+layouts.get(i).returnCode(indent+Skin.indentation); 
     270    } 
     271    code+="\n"+indent+"</Window>\n";     
    272272    return code; 
    273273  } 
  • trunk/src/vlcskineditor/items/Anchor.java

    r92 r99  
    270270    } 
    271271  } 
    272   public String returnCode() { 
    273     String code = "<Anchor"; 
     272  public String returnCode(String indent) { 
     273    String code = indent+"<Anchor"; 
    274274    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    275275    if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 
  • trunk/src/vlcskineditor/items/Button.java

    r92 r99  
    372372    if(ae==action_ae) action_tf.setText(ae.getCode()); 
    373373  } 
    374   public String returnCode() { 
    375     String code = "<Button"; 
     374  public String returnCode(String indent) { 
     375    String code = indent+"<Button"; 
    376376    code+=" up=\""+up+"\""; 
    377377    if (!down.equals(DOWN_DEFAULT)) code+=" down=\""+down+"\""; 
  • trunk/src/vlcskineditor/items/Checkbox.java

    r92 r99  
    508508    else if(ae==action2_ae) action2_tf.setText(action2_ae.getCode()); 
    509509  } 
    510   public String returnCode() { 
    511     String code = "<Checkbox"; 
     510  public String returnCode(String indent) { 
     511    String code = indent+"<Checkbox"; 
    512512    code+=" state=\""+state+"\" up1=\""+up1+"\" up2=\""+up2+"\""; 
    513513    if (!down1.equals(ID_DEFAULT)) code+=" down1=\""+down1+"\""; 
  • trunk/src/vlcskineditor/items/Group.java

    r96 r99  
    246246    } 
    247247  } 
    248   public String returnCode() { 
    249     String code = "<Group";     
     248  public String returnCode(String indent) { 
     249    String code = indent+"<Group";     
    250250    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    251251    if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\"";     
     
    253253    //if (id!=ID_DEFAULT) code+="<!-- id=\""+id+"\" -->"; 
    254254    for (int i=0;i<items.size();i++) { 
    255       code+="\n"+items.get(i).returnCode(); 
    256     } 
    257     code+="\n</Group>"; 
     255      code+="\n"+items.get(i).returnCode(indent+Skin.indentation); 
     256    } 
     257    code+="\n"+indent+"</Group>"; 
    258258    return code; 
    259259  } 
  • trunk/src/vlcskineditor/items/Image.java

    r92 r99  
    355355    if(ae==action2_ae) action2_tf.setText(action2_ae.getCode()); 
    356356  } 
    357   public String returnCode() { 
    358     String code = "<Image";     
     357  public String returnCode(String indent) { 
     358    String code = indent+"<Image";     
    359359    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    360360    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
  • trunk/src/vlcskineditor/items/Panel.java

    r96 r99  
    353353    } 
    354354  } 
    355   public String returnCode() { 
    356     String code = "<Panel";     
     355  public String returnCode(String indent) { 
     356    String code = indent+"<Panel";     
    357357    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    358358    if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 
     
    365365    if (!id.equals(ID_DEFAULT)) code+="<!--  id=\""+id+"\" -->"; 
    366366    for (int i=0;i<items.size();i++) { 
    367       code+="\n"+items.get(i).returnCode(); 
    368     } 
    369     code+="\n</Panel>"; 
     367      code+="\n"+items.get(i).returnCode(indent+Skin.indentation); 
     368    } 
     369    code+="\n"+indent+"</Panel>"; 
    370370    return code; 
    371371  } 
  • trunk/src/vlcskineditor/items/Playtree.java

    r96 r99  
    602602    } 
    603603  } 
    604   public String returnCode() { 
    605     String code = "<Playtree"; 
     604  public String returnCode(String indent) { 
     605    String code = indent+"<Playtree"; 
    606606    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    607607    code+=" font=\""+font+"\""; 
     
    626626    if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\"";     
    627627    code+=">\n";     
    628     code+=slider.returnCode(); 
    629     code+="\n</Playtree>"; 
     628    code+=slider.returnCode(indent+Skin.indentation); 
     629    code+="\n"+indent+"</Playtree>"; 
    630630    return code; 
    631631  } 
  • trunk/src/vlcskineditor/items/RadialSlider.java

    r71 r99  
    2525import vlcskineditor.*; 
    2626import java.awt.*; 
    27 import javax.swing.*; 
    2827import javax.swing.tree.*; 
    2928 
     
    7776     
    7877  } 
    79   public String returnCode() { 
    80     String code = "<RadialSlider"; 
    81     if (id!=ID_DEFAULT) code+=" id=\""+id+"\""; 
     78  public String returnCode(String indent) { 
     79    String code = indent+"<RadialSlider"; 
     80    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    8281    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    8382    if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 
     
    8584    if (minangle!=MINANGLE_DEFAULT) code+=" minangle=\""+String.valueOf(minangle)+"\""; 
    8685    if (maxangle!=MAXANGLE_DEFAULT) code+=" maxangle=\""+String.valueOf(maxangle)+"\""; 
    87     if (value!=VALUE_DEFAULT) code+=" value=\""+value+"\""; 
    88     if (tooltiptext!=TOOLTIPTEXT_DEFAULT) code+=" tooltiptext=\""+tooltiptext+"\""; 
    89     if (lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\""; 
    90     if (rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\""; 
     86    if (!value.equals(VALUE_DEFAULT)) code+=" value=\""+value+"\""; 
     87    if (!tooltiptext.equals(TOOLTIPTEXT_DEFAULT)) code+=" tooltiptext=\""+tooltiptext+"\""; 
     88    if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 
     89    if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 
    9190    if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 
    9291    if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 
    93     if (help!=HELP_DEFAULT) code+=" help=\""+help+"\""; 
    94     if (visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\""; 
     92    if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 
     93    if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 
    9594    code+="/>"; 
    9695    return code; 
  • trunk/src/vlcskineditor/items/Slider.java

    r96 r99  
    516516    sbg_btn.setEnabled(false); 
    517517  } 
    518   public String returnCode() { 
    519     String code = "<Slider"; 
     518  public String returnCode(String indent) { 
     519    String code = indent+"<Slider"; 
    520520    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    521521    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
     
    538538    } 
    539539    else { 
    540       code+=">\n"+sbg.returnCode(); 
    541       code+="\n</Slider>"; 
     540      code+=">\n"+sbg.returnCode(indent+Skin.indentation); 
     541      code+="\n"+indent+"</Slider>"; 
    542542    } 
    543543    return code; 
  • trunk/src/vlcskineditor/items/SliderBackground.java

    r94 r99  
    252252    }     
    253253  }   
    254   public String returnCode() { 
    255     String code = "<SliderBackground"; 
     254  public String returnCode(String indent) { 
     255    String code = indent+"<SliderBackground"; 
    256256    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    257257    code+=" image=\""+image+"\""; 
  • trunk/src/vlcskineditor/items/Text.java

    r92 r99  
    384384    } 
    385385  } 
    386   public String returnCode() { 
    387     String code = "<Text"; 
     386  public String returnCode(String indent) { 
     387    String code = indent+"<Text"; 
    388388    code+=" text=\""+text+"\""; 
    389389    code+=" font=\""+font+"\""; 
  • trunk/src/vlcskineditor/items/Video.java

    r92 r99  
    327327    } 
    328328  } 
    329   public String returnCode() { 
    330     String code = "<Video"; 
     329  public String returnCode(String indent) { 
     330    String code = indent+"<Video"; 
    331331    if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 
    332332    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
  • trunk/src/vlcskineditor/resources/Bitmap.java

    r98 r99  
    151151            else if(image.getRGB(x,y)!=alphargb && alpha>0) { 
    152152              float amount = alpha; 
    153               amount = amount/255; 
    154               System.out.println(alpha +" --> "+amount); 
     153              amount = amount/255;               
    155154              g2d.setColor(new Color((int)(red*amount), (int)(green*amount), (int)(blue*amount)));               
    156155              g2d.drawRect(x,y,0,0); 
     
    353352    } 
    354353  } 
    355   public String returnCode() { 
    356     String code = "<Bitmap id=\""+id+"\" file=\""+file+"\""; 
     354  public String returnCode(String indent) { 
     355    String code = indent+"<Bitmap id=\""+id+"\" file=\""+file+"\""; 
    357356    code+=" alphacolor=\""+alphacolor+"\""; 
    358357    if (nbframes!=NBFRAMES_DEFAULT) code+=" nbframes=\""+String.valueOf(nbframes)+"\""; 
     
    361360      code+=">\n"; 
    362361      for (int i=0;i<SubBitmaps.size();i++) { 
    363         code+=SubBitmaps.get(i).returnCode(); 
    364       } 
    365       code+="</Bitmap>\n"; 
     362        code+=SubBitmaps.get(i).returnCode(indent+Skin.indentation); 
     363      } 
     364      code+=indent+"</Bitmap>\n"; 
    366365    } 
    367366    else { 
  • trunk/src/vlcskineditor/resources/BitmapFont.java

    r71 r99  
    5353     
    5454  } 
    55   public String returnCode() { 
    56     String code="<BitmapFont id=\""+id+"\" file=\""+file+"\""; 
     55  public String returnCode(String indent) { 
     56    String code=indent+"<BitmapFont id=\""+id+"\" file=\""+file+"\""; 
    5757    if (type!=TYPE_DEFAULT) code+=" type=\""+type+"\""; 
    5858    code+="/>\n"; 
  • trunk/src/vlcskineditor/resources/Font.java

    r92 r99  
    2525import vlcskineditor.*; 
    2626import vlcskineditor.history.*; 
    27 import java.util.*; 
    2827import javax.swing.*; 
    2928import javax.swing.tree.*; 
    3029import javax.swing.border.*; 
    31 import javax.imageio.*; 
    3230import java.awt.*; 
    3331import java.awt.event.*; 
     
    251249            desktop = Desktop.getDesktop(); 
    252250            try { 
    253               desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#Font")); 
     251              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skinedhlp/res-font.html")); 
    254252            } 
    255253            catch (Exception ex) { 
     
    258256      } 
    259257      else { 
    260         JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     258        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skinedhlp/res-font.html",JOptionPane.WARNING_MESSAGE);     
    261259      } 
    262260    } 
     
    267265    } 
    268266  } 
    269   public String returnCode() { 
    270     String code="<Font id=\""+id+"\" file=\""+file+"\""; 
     267  public String returnCode(String indent) { 
     268    String code=indent+"<Font id=\""+id+"\" file=\""+file+"\""; 
    271269    if (size!=SIZE_DEFAULT) code+=" size=\""+String.valueOf(size)+"\""; 
    272270    code+="/>\n"; 
  • trunk/src/vlcskineditor/resources/SubBitmap.java

    r92 r99  
    2424 
    2525import vlcskineditor.*; 
    26 import java.util.*; 
    2726import javax.swing.*; 
    2827import javax.swing.tree.*; 
    2928import javax.swing.border.*; 
    30 import javax.imageio.*; 
    3129import java.awt.*; 
    3230import java.awt.image.*; 
    3331import java.awt.event.*; 
    34 import java.io.*; 
    3532import vlcskineditor.history.SubBitmapAddEvent; 
    3633/** 
     
    284281            desktop = Desktop.getDesktop(); 
    285282            try { 
    286               desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#Bitmap")); 
     283              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skinedhlp/res-subbitmap.html")); 
    287284            } 
    288285            catch (Exception ex) { 
     
    291288      } 
    292289      else { 
    293         JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     290        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skinedhlp/res-subbitmap.html",JOptionPane.WARNING_MESSAGE);     
    294291      } 
    295292    } 
     
    313310    sbew = null; 
    314311  } 
    315   public String returnCode() { 
    316     String code="<SubBitmap id=\""+id+"\" x=\""+String.valueOf(x)+"\" y=\""+String.valueOf(y)+"\""; 
     312  public String returnCode(String indent) { 
     313    String code=indent+"<SubBitmap id=\""+id+"\" x=\""+String.valueOf(x)+"\" y=\""+String.valueOf(y)+"\""; 
    317314    code+=" width=\""+String.valueOf(width)+"\"  height=\""+String.valueOf(height)+"\""; 
    318315    if (nbframes!=NBFRAMES_DEFAULT) code+=" nbframes=\""+String.valueOf(nbframes)+"\"";