Commit 95bc4acc authored by Daniel Dreibrodt's avatar Daniel Dreibrodt

Slider in Playtree VALUE fix

parent 7e5856fc
/***************************************************************************** /*****************************************************************************
* Language.java * Language.java
***************************************************************************** *****************************************************************************
* Copyright (C) 2007 Daniel Dreibrodt * Copyright (C) 2009 Daniel Dreibrodt
* *
* VLC Skin Editor * VLC Skin Editor
* *
......
...@@ -124,7 +124,7 @@ public class Playtree extends Item implements ActionListener{ ...@@ -124,7 +124,7 @@ public class Playtree extends Item implements ActionListener{
NodeList nodes = n.getChildNodes(); NodeList nodes = n.getChildNodes();
for(int i=0;i<nodes.getLength();i++) { for(int i=0;i<nodes.getLength();i++) {
if(nodes.item(i).getNodeName().equals("Slider")) { if(nodes.item(i).getNodeName().equals("Slider")) {
slider = new Slider(nodes.item(i), s); slider = new Slider(nodes.item(i), s, true);
} }
} }
......
...@@ -118,6 +118,17 @@ public class Slider extends Item implements ActionListener{ ...@@ -118,6 +118,17 @@ public class Slider extends Item implements ActionListener{
created = true; created = true;
} }
/**
* Parses a slider contained in a Playtree from a XML node
* @param n The XML node
* @param s_ The parent skin
* @param inPt The boolean value indicating whether the slider is inside a playtree or not
*/
public Slider(Node n, Skin s_, boolean iPt) {
this(n, s_);
inPlaytree = iPt;
}
/** Creates a new instance of Slider /** Creates a new instance of Slider
* @param xmlcode The XML code * @param xmlcode The XML code
* @param s_ The parent skin * @param s_ The parent skin
...@@ -701,7 +712,7 @@ public class Slider extends Item implements ActionListener{ ...@@ -701,7 +712,7 @@ public class Slider extends Item implements ActionListener{
if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\"";
code+=" points=\""+points+"\""; code+=" points=\""+points+"\"";
if (thickness!=THICKNESS_DEFAULT) code+=" thickness=\""+String.valueOf(thickness)+"\""; if (thickness!=THICKNESS_DEFAULT) code+=" thickness=\""+String.valueOf(thickness)+"\"";
if (!value.equals(VALUE_DEFAULT)) code+=" value=\""+value+"\""; if(!inPlaytree) if (!value.equals(VALUE_DEFAULT)) code+=" value=\""+value+"\"";
if (!tooltiptext.equals(TOOLTIPTEXT_DEFAULT)) code+=" tooltiptext=\""+tooltiptext+"\""; if (!tooltiptext.equals(TOOLTIPTEXT_DEFAULT)) code+=" tooltiptext=\""+tooltiptext+"\"";
code+=" up=\""+up+"\""; code+=" up=\""+up+"\"";
if (!down.equals(DOWN_DEFAULT)) code+=" down=\""+down+"\""; if (!down.equals(DOWN_DEFAULT)) code+=" down=\""+down+"\"";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment