Commit f58ace30 authored by Daniel Dreibrodt's avatar Daniel Dreibrodt

Updated translations

Improved playtree & slider background rendering performance
Visual slider editing first functionality
Removal of deprecated API uses
Text rendering fix when width = 0 (auto-width)
parent 15f7b3cd
This diff is collapsed.
This diff is collapsed.
......@@ -73,12 +73,12 @@ MENU_HELP_ABOUT|Over
MENU_HELP_ABOUT_MN|O
#The toolbar
TOOLBAR_OPEN|Openen
TOOLBAR_SAVE|Opslaan
TOOLBAR_OPEN|Een thema openen...
TOOLBAR_SAVE|Thema-aanpassingen opslaan
TOOLBAR_UNDO|Ongedaan maken
TOOLBAR_REDO|Herhalen
TOOLBAR_MOVE|Verplaats gereedschap
TOOLBAR_PATH|Bewerk schuifknop gereedschap
TOOLBAR_MOVE|Item verplaatsen
TOOLBAR_PATH|Schuiver bewerken
#Resource Window
WIN_RES_TITLE|Bronnen
......@@ -124,7 +124,7 @@ WIN_PREFS_TITLE|Voorkeuren
WIN_PREFS_UPDATE_L|Auto-update activeren:
WIN_PREFS_LANG_L|Taal:
WIN_PREFS_LAF_L|Programma-uiterlijk:
WIN_PREFS_TBAR_L|Toon werkbalk:
WIN_PREFS_TBAR_L|Gereedschapsbalk weergeven:
WIN_PREFS_RESTART_L|<html><i>Enkele instellingen worden pas van kracht na een herstart van het programma.</i></html>
#SubBitmap Edit and Skin Preview window
......
......@@ -72,12 +72,12 @@ MENU_HELP_ABOUT|O programe
MENU_HELP_ABOUT_MN|P
#The toolbar
TOOLBAR_OPEN|Otvoriť
TOOLBAR_SAVE|Uložiť
TOOLBAR_UNDO|Dozadu
TOOLBAR_REDO|Opakovať
TOOLBAR_MOVE|Pohybujú nástroje
TOOLBAR_PATH|Posuvník editačné nástroje
TOOLBAR_OPEN|Otvoriť súbor so vzhľadom
TOOLBAR_SAVE|Uložiť úpravy vzhľadu
TOOLBAR_UNDO|Späť
TOOLBAR_REDO|Dopredu
TOOLBAR_MOVE|Nástroj na presúvanie objektov
TOOLBAR_PATH|Nástroj na úpravu posuvníkov
#Resource Window
WIN_RES_TITLE|Zdrojové súbory
......@@ -123,7 +123,7 @@ WIN_PREFS_TITLE|Nastavenia
WIN_PREFS_UPDATE_L|Aktivovať automatické aktualizácie:
WIN_PREFS_LANG_L|Jazyk:
WIN_PREFS_LAF_L|Vzhľad programu:
WIN_PREFS_TBAR_L|Show toolbar:
WIN_PREFS_TBAR_L|Zobraziť panel nástrojov:
WIN_PREFS_RESTART_L|<html><i>Niektoré nastavenia sa aktivujú až po reštartovaní programu.</i></html>
#SubBitmap Edit and Skin Preview window
......
......@@ -117,6 +117,7 @@ public class GlobalVariables implements ActionListener{
* @return The evaluated expression
*/
public boolean parseBoolean(String bool) {
if(bool==null) return false;
String rName = bool;
rName = rName.replaceAll("equalizer.isEnabled",String.valueOf(equalizer_isEnabled));
rName = rName.replaceAll("vlc.hasVout",String.valueOf(vlc_hasVout));
......
/*****************************************************************************
* Helper.java
*****************************************************************************
* Copyright (C) 2007 Daniel Dreibrodt
* Copyright (C) 2007-2009 Daniel Dreibrodt
*
* This file is part of VLC Skin Editor
*
......@@ -25,13 +25,8 @@ package vlcskineditor;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
......@@ -39,12 +34,25 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.channels.FileChannel;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.swing.JOptionPane;
import vlcskineditor.items.Anchor;
import vlcskineditor.items.Button;
import vlcskineditor.items.Checkbox;
import vlcskineditor.items.Group;
import vlcskineditor.items.Image;
import vlcskineditor.items.Panel;
import vlcskineditor.items.Playtree;
import vlcskineditor.items.RadialSlider;
import vlcskineditor.items.Slider;
import vlcskineditor.items.SliderBackground;
import vlcskineditor.items.Text;
import vlcskineditor.items.Video;
/**
* Provides helper method
* Provides helper methods
* @author Daniel Dreibrodt
*/
public class Helper {
......@@ -156,7 +164,7 @@ public class Helper {
*/
public static Cursor createImageCursor(String imageFileName, int x, int y, Component com) {
Toolkit tk = Toolkit.getDefaultToolkit();
Image src = tk.createImage(Main.class.getResource(imageFileName));
java.awt.Image src = tk.createImage(Main.class.getResource(imageFileName));
/*Dimension d = tk.getBestCursorSize(src.getWidth(null), src.getHeight(null));
BufferedImage c = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = c.createGraphics();
......@@ -164,4 +172,25 @@ public class Helper {
return tk.createCustomCursor(src, new Point(x,y), imageFileName);
}
/**
* Copies items from one list to the other
* @param src The source item list
* @param target The target list, filled with copies of the source items
*/
public static void copyItems(List<Item> src, List<Item> target) {
for(Item i:src) {
if(i.getClass().equals(Anchor.class)) target.add(new Anchor((Anchor)i));
else if(i.getClass().equals(Button.class)) target.add(new Button((Button)i));
else if(i.getClass().equals(Checkbox.class)) target.add(new Checkbox((Checkbox)i));
else if(i.getClass().equals(Group.class)) target.add(new Group((Group)i));
else if(i.getClass().equals(Image.class)) target.add(new Image((Image)i));
else if(i.getClass().equals(Panel.class)) target.add(new Panel((Panel)i));
else if(i.getClass().equals(Playtree.class)) target.add(new Playtree((Playtree)i));
else if(i.getClass().equals(RadialSlider.class)) target.add(new RadialSlider((RadialSlider)i));
else if(i.getClass().equals(Slider.class)) target.add(new Slider((Slider)i));
else if(i.getClass().equals(Text.class)) target.add(new Text((Text)i));
else if(i.getClass().equals(Video.class)) target.add(new Video((Video)i));
}
}
}
......@@ -89,6 +89,29 @@ public abstract class Item {
/** Determines whether the process of creating the object has finished **/
public boolean created = false;
public Item() {
}
/**
* Creates a copy of the given item
* @param i The item to copy
*/
public Item(Item i) {
s = i.s;
id = i.id;
x = i.x;
y = i.y;
lefttop = i.lefttop;
rightbottom = i.rightbottom;
xkeepratio = i.xkeepratio;
ykeepratio = i.ykeepratio;
visible = i.visible;
help = i.help;
//The rest is implemented in the different item classes
created = true;
}
/** Show a dialog to modify the items's parameters */
public abstract void showOptions();
......@@ -216,8 +239,8 @@ public abstract class Item {
* @param p The rename pattern, where %oldid% will be replaced by the Item's old ID
*/
public void renameForCopy(String p) {
p = p.replaceAll("%oldid%", id);
String newid_base = p;
String p_ = p.replaceAll("%oldid%", id);
String newid_base = p_;
String newid = newid_base;
int i = 1;
while (s.idExists(newid)) {
......@@ -235,13 +258,4 @@ public abstract class Item {
vis = s.gvars.parseBoolean(visible);
}
/**
* Changes all references to the resource formerly identfied by <i>oldid</i> to the resources <i>newid</id>
* @param oldid The former ID of the renamed resource
* @param newid The new ID of the renamed resource
*/
public void resourceRenamed(String oldid, String newid) {
}
}
......@@ -119,15 +119,13 @@ public class Language {
String[] lines = text.split("\\n");
for(String line:lines) {
//line = line.trim();
line = line.trim();
if(line.startsWith("@include")) {
String file = line.substring(9);
load(new File(f.getParent() + File.separator + file));
} else if(!line.startsWith("#")) {
System.out.println(line);
String[] fields = line.split("\\|");
if(fields.length == 2) {
System.out.println(fields[0]+"-->"+fields[1]);
strings.put(fields[0], fields[1].replaceAll("\\\\n", "\n"));
}
}
......
......@@ -93,97 +93,6 @@ public class Layout implements ActionListener{
created = true;
}
/**
* Creates a new Layout from XML.
* @param xmlcode The XML code from which the Layout should be created.
* @param w_ The Window to which this Layout will belong
* @param s_ The Skin in which the Layout is used.
*/
public Layout(String xmlcode, Window w_, Skin s_) {
s=s_;
parent=w_;
String[] code = xmlcode.split("\n");
width = XML.getIntValue(code[0],"width");
height = XML.getIntValue(code[0],"height");
if(code[0].indexOf("id=\"")!=-1) id = XML.getValue(code[0],"id");
else id = Language.get("UNNAMED").replaceAll("%t",type).replaceAll("%i",String.valueOf(s.getNewId()));
if(code[0].indexOf("minwidth=\"")!=-1) minwidth = XML.getIntValue(code[0],"minwidth");
if(code[0].indexOf("maxwidth=\"")!=-1) maxwidth = XML.getIntValue(code[0],"maxwidth");
if(code[0].indexOf("minheight=\"")!=-1) minheight = XML.getIntValue(code[0],"minheight");
if(code[0].indexOf("maxheight=\"")!=-1) maxheight = XML.getIntValue(code[0],"maxheight");
for(int i=0;i<code.length;i++) code[i] = code[i].trim();
for(int i=1;i<code.length;i++) {
if (code[i].startsWith("<!--")) {
while(code[i].indexOf("-->")==-1) {
i++;
}
}
else if(code[i].startsWith("<Anchor")) items.add(new Anchor(code[i],s));
else if(code[i].startsWith("<Button")) items.add(new vlcskineditor.items.Button(code[i],s));
else if(code[i].startsWith("<Checkbox")) items.add(new vlcskineditor.items.Checkbox(code[i],s));
else if(code[i].startsWith("<Image")) items.add(new vlcskineditor.items.Image(code[i],s));
else if(code[i].startsWith("<Text")) items.add(new Text(code[i],s));
else if(code[i].startsWith("<Video")) items.add(new Video(code[i],s));
else if(code[i].startsWith("<RadialSlider")) items.add(new RadialSlider(code[i],s));
else if(code[i].startsWith("<Group")) {
String itemcode = code[i];
i++;
while(!code[i].startsWith("</Group>")) {
itemcode += "\n"+code[i];
i++;
}
itemcode += "\n"+code[i];
items.add(new Group(itemcode,s));
}
else if(code[i].startsWith("<Panel")) {
String itemcode = code[i];
i++;
while(!code[i].startsWith("</Panel>")) {
itemcode += "\n"+code[i];
i++;
}
itemcode += "\n"+code[i];
items.add(new vlcskineditor.items.Panel(itemcode,s));
}
else if(code[i].startsWith("<Playlist")) {
String itemcode = code[i];
i++;
while(!code[i].startsWith("</Playlist>")) {
itemcode += "\n"+code[i];
i++;
}
itemcode += "\n"+code[i];
items.add(new Playtree(itemcode,s));
}
else if(code[i].startsWith("<Playtree")) {
String itemcode = code[i];
i++;
while(!code[i].startsWith("</Playtree>")) {
itemcode += "\n"+code[i];
i++;
}
itemcode += "\n"+code[i];
items.add(new Playtree(itemcode,s));
}
else if(code[i].startsWith("<Slider")) {
if(code[i].indexOf("/>")!=-1) {
items.add(new Slider(code[i],s));
}
else {
String itemcode = code[i];
i++;
while(!code[i].startsWith("</Slider>")) {
itemcode += "\n"+code[i];
i++;
}
itemcode += "\n"+code[i];
items.add(new Slider(itemcode,s));
}
}
}
created = true;
}
/**
* Creates a new Layout from user input.
* @param w_ The Window to which this Layout will belong
......@@ -197,6 +106,24 @@ public class Layout implements ActionListener{
height=0;
showOptions();
}
/**
* Creates a copy of a Layout
* @param l The layout to copy
*/
public Layout(Layout l) {
s = l.s;
parent = l.parent;
id = l.id;
width = l.width;
height = l.height;
minwidth = l.minwidth;
minheight = l.minheight;
maxwidth = l.maxwidth;
maxheight = l.maxheight;
Helper.copyItems(l.items, items);
created = true;
}
/**
* Updates the Layout's attributes according to the user input.
*/
......@@ -544,14 +471,7 @@ public class Layout implements ActionListener{
return false;
}
/**
* Changes all references to the resource formerly identfied by <i>oldid</i> to the resources <i>newid</id>
* @param oldid The former ID of the renamed resource
* @param newid The new ID of the renamed resource
*/
public void resourceRenamed(String oldid, String newid) {
for(Item i:items) i.resourceRenamed(oldid, newid);
}
/**
* Renames the Layout and all its content after the copy process
* @param p The renaming pattern, %oldid% will be replaced by the Layout's/Item's old ID
......
/*****************************************************************************
* Main.java
*****************************************************************************
* Copyright (C) 2009 Daniel Dreibrodt
* Copyright (C) 2007-2009 Daniel Dreibrodt
*
* VLC Skin Editor
*
......@@ -38,13 +38,14 @@ import com.ice.jni.registry.*;
import javax.swing.plaf.basic.BasicToolBarUI;
import javax.swing.plaf.metal.*;
import vlcskineditor.history.*;
import vlcskineditor.items.Checkbox;
import vlcskineditor.resources.Bitmap;
import vlcskineditor.resources.SubBitmap;
/**
* The main class holds the GUI
* @author Daniel
* @author Daniel Dreibrodt <daniel.dreibrodt@gmail.com>
*/
public class Main extends JFrame implements ActionListener, TreeSelectionListener, WindowListener, MouseListener {
......@@ -948,6 +949,7 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
pwin.setVisible(true);
setTitle(f.toString()+" - VLC Skin Editor "+VERSION);
m_file_png.setEnabled(false);
s = new Skin(this);
s.open(f);
selected_resource = null;
selected_in_windows = null;
......@@ -1275,19 +1277,19 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
if(getSelectedLayout()==null) {
Window w = s.getWindow(getSelectedWindow());
if(w==null) return;
Window w_ = new Window(w.returnCode(""), s);
w_.renameForCopy(p);
s.windows.add(w_);
Window wCopy = new Window(w);
wCopy.renameForCopy(p);
s.windows.add(wCopy);
s.updateWindows();
}
else {
Window w = s.getWindow(getSelectedWindow());
Layout l = w.getLayout(getSelectedLayout());
Layout l_ = new Layout(l.returnCode(""), w, s);
l_.renameForCopy(p);
w.layouts.add(l_);
Layout lCopy = new Layout(l);
lCopy.renameForCopy(p);
w.layouts.add(lCopy);
s.updateWindows();
s.expandLayout(l_.id);
s.expandLayout(lCopy.id);
}
}
// </editor-fold>
......@@ -1298,65 +1300,63 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
Item i = s.getItem(getSelectedItem());
if(i==null) return;
if(i.getClass()==Anchor.class) {
Anchor a = new Anchor(i.returnCode(""), s);
//Because IDs of Anchors are not stored in the XML and can thus not be copied via returnCode()
a.id = i.id;
Anchor a = new Anchor((Anchor)i);
a.renameForCopy(p);
s.getParentListOf(i.id).add(a);
s.updateItems();
s.expandItem(a.id);
}
else if(i.getClass()==vlcskineditor.items.Button.class) {
vlcskineditor.items.Button b = new vlcskineditor.items.Button(i.returnCode(""), s);
vlcskineditor.items.Button b = new vlcskineditor.items.Button((vlcskineditor.items.Button)i);
b.renameForCopy(p);
s.getParentListOf(i.id).add(b);
s.updateItems();
s.expandItem(b.id);
}
else if(i.getClass()==vlcskineditor.items.Checkbox.class) {
vlcskineditor.items.Checkbox c = new vlcskineditor.items.Checkbox(i.returnCode(""), s);
Checkbox c = new Checkbox((Checkbox)i);
c.renameForCopy(p);
s.getParentListOf(i.id).add(c);
s.updateItems();
s.expandItem(c.id);
}
else if(i.getClass()==Group.class) {
Group g = new Group(i.returnCode(""), s);
Group g = new Group((Group)i);
g.renameForCopy(p);
s.getParentListOf(i.id).add(g);
s.updateItems();
s.expandItem(g.id);
}
else if(i.getClass()==vlcskineditor.items.Image.class) {
vlcskineditor.items.Image im = new vlcskineditor.items.Image(i.returnCode(""), s);
vlcskineditor.items.Image im = new vlcskineditor.items.Image((vlcskineditor.items.Image)i);
im.renameForCopy(p);
s.getParentListOf(i.id).add(im);
s.updateItems();
s.expandItem(im.id);
}
else if(i.getClass()==vlcskineditor.items.Panel.class) {
vlcskineditor.items.Panel pa = new vlcskineditor.items.Panel(i.returnCode(""), s);
vlcskineditor.items.Panel pa = new vlcskineditor.items.Panel((vlcskineditor.items.Panel)i);
pa.renameForCopy(p);
s.getParentListOf(i.id).add(pa);
s.updateItems();
s.expandItem(pa.id);
}
else if(i.getClass()==Playtree.class) {
Playtree pl = new Playtree(i.returnCode(""), s);
Playtree pl = new Playtree((Playtree)i);
pl.renameForCopy(p);
s.getParentListOf(i.id).add(pl);
s.updateItems();
s.expandItem(pl.id);
}
else if(i.getClass()==RadialSlider.class) {
RadialSlider r = new RadialSlider(i.returnCode(""), s);
RadialSlider r = new RadialSlider((RadialSlider)i);
r.renameForCopy(p);
s.getParentListOf(i.id).add(r);
s.updateItems();
s.expandItem(r.id);
}
else if(i.getClass()==Slider.class) {
Slider sl = new Slider(i.returnCode(""), s);
Slider sl = new Slider((Slider)i);
sl.renameForCopy(p);
java.util.List<Item> l = s.getParentListOf(i.id);
if(l!=null) {
......@@ -1374,14 +1374,14 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
JOptionPane.showMessageDialog(this,"A slider cannot contain more than one background!","SliderBackgrounds cannot be duplicated",JOptionPane.INFORMATION_MESSAGE);
}
else if(i.getClass()==Text.class) {
Text t = new Text(i.returnCode(""), s);
Text t = new Text((Text)i);
t.renameForCopy(p);
s.getParentListOf(i.id).add(t);
s.updateItems();
s.expandItem(t.id);
}
else if(i.getClass()==Video.class) {
Video v = new Video(i.returnCode(""), s);
Video v = new Video((Video)i);
v.renameForCopy(p);
s.getParentListOf(i.id).add(v);
s.updateItems();
......
......@@ -64,6 +64,8 @@ public class PreviewWindow extends JPanel implements MouseListener, MouseMotionL
private int dragstartx, dragstarty, dragstartitemx, dragstartitemy;
/** The move event added to the history when the dragging action has finished */
private ItemMoveEvent ime = null;
/** The slider edit event added to the history when the slider point dragging action has finished */
private SliderEditEvent see = null;
/** The main program */
private Main m;
......@@ -208,7 +210,30 @@ public class PreviewWindow extends JPanel implements MouseListener, MouseMotionL
}
public void mouseClicked(MouseEvent e) {
if(mode==CURSOR_PATH) {
if(selected_item.getClass().equals(Slider.class)) {
Slider s = (Slider)selected_item;
int mx = e.getX()/z-s.offsetx-s.x;
int my = e.getY()/z-s.offsety-s.y;
int over = -1;
for(int i=0; i<s.getControlPointNum(); i++) {
int dx = Math.abs(mx-s.getControlX(i));
int dy = Math.abs(my-s.getControlY(i));
if(dx<2 && dy<2) over = i;
}
if(over!=-1) {
if(e.isAltDown()) {
s.removeControlPoint(over);
} else {
setCursor(path_active_c);
}
} else {
if(e.isShiftDown()) {
s.addControlPoint(mx, my);
} else {
setCursor(path_normal_c);
}
}
}
}
}
public void mouseDragged(MouseEvent e) {
......
......@@ -19,45 +19,96 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
package vlcskineditor;
import java.util.LinkedList;
import java.util.List;
import javax.swing.tree.DefaultMutableTreeNode;
import vlcskineditor.resources.ResourceChangeListener;
import vlcskineditor.resources.ResourceChangedEvent;
/**
* Abstract superclass representing a Bitmap, SubBitmap or Font
* @author Daniel Dreibrodt
*/
public abstract class Resource {
/** Value should be either Bitmap or Font */
public String id;
/** The resource type */
public String type;
/** Represents the skin to which the resource belongs */
public Skin s;
/** The resource change listeners registered at this resource */
public List<ResourceChangeListener> resourceChangeListeners = new LinkedList<ResourceChangeListener>();
public Resource() {
}
}
/** Show a dialog to modify the resource's parameters */
public abstract void showOptions();
public abstract void showOptions();
/** Update the Resource's attributes according to user input */
public abstract void update();
/** Creates the XML code representing the resource */
/**
* Creates the XML code representing the resource
* @param indent The indentation
*/
public abstract String returnCode(String indent);
/** Creates a DefaultMutableTreeNode to be displayed in the resources tree */
public abstract DefaultMutableTreeNode getTreeNode();
/** If a Resource does contain another Resource of the given id (e.g. a SubBitmap) the containing Resource is returned **/
public abstract DefaultMutableTreeNode getTreeNode();
/**
* If a Resource does contain another Resource of the given id (e.g. a SubBitmap) the containing Resource is returned
* @param id_ The resource to look for
*/
public Resource getParentOf(String id_) {
return null;
}
/** Renames the Resource after the copy process **/
public void renameForCopy(String p) {
p = p.replaceAll("%oldid%", id);
String newid_base = p;
/**
* Renames the Resource after the copy process
* @param p The renaming pattern
*/
public void renameForCopy(String p) {
p = p.replaceAll("%oldid%", id);
String newid_base = p;
String newid = newid_base;
int i = 1;
while(s.idExists(newid)) {
i++;
newid = newid_base+"_"+String.valueOf(i);
newid = newid_base + "_" + String.valueOf(i);
}
id = newid;
}
/**
* Register a resource change listener with this resource. It will be notified as soon as this resource has changed.
* @param rcl The resource change listener
*/
public void addResourceChangeListener(ResourceChangeListener rcl) {
resourceChangeListeners.add(rcl);
}
/**
* Removes a resource change listener
* @param rcl The resource change listener
*/
public void removeResourceChangeListener(ResourceChangeListener rcl) {
resourceChangeListeners.remove(rcl);
}
/**
* Notifies all registered resource change listeners of a change
* @param oldID The old id of the resource, so that items can identify what to do
*/
protected void fireResourceChangedEvent(String oldID) {
ResourceChangedEvent rce = new ResourceChangedEvent(oldID, this);
for(ResourceChangeListener rcl : resourceChangeListeners) {
rcl.onResourceChanged(rce);
}
}
}
......@@ -139,16 +139,11 @@ public class Skin implements ActionListener{
skinfile=f;
skinfolder = f.getParentFile().getAbsolutePath()+File.separator;
try {
//parse(f);
parseXML(f);
}
catch (Exception ex) {
ex.printStackTrace();
String stackTrace ="";
/*for (int i=0;i<ex.getStackTrace().length;i++) {
stackTrace+=ex.getStackTrace()[i].toString()+"\n";
}*/
JOptionPane.showMessageDialog(null,ex.toString()+"\n\n"+stackTrace,ex.getMessage(),JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);
update();
m.showWelcomeDialog();
}
......@@ -162,123 +157,6 @@ public class Skin implements ActionListener{
}
}
/**
* Parses the given file line by line, expecting each xml-tag to be in his own single line
* @deprecated parseXML(File f) should now be used, as it is more flexible
* @param f The file that should be parsed
* @throws java.lang.Exception
*/
@Deprecated
private void parse(File f) throws Exception {
//System.out.println("Creating Buffered Reader...");
BufferedReader br = new BufferedReader(new FileReader(f));
//System.out.println("Ready...");
//System.out.println("Reading Header...");
String header = br.readLine();
//System.out.println("Header read");
if (header.indexOf("//VideoLAN//DTD VLC Skins")==-1) {
br.close();