vlcskineditor.items
Class SliderBackground

java.lang.Object
  extended by vlcskineditor.Item
      extended by vlcskineditor.items.SliderBackground
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class SliderBackground
extends Item
implements java.awt.event.ActionListener

SliderBackground item


Field Summary
 javax.swing.JTextField id_tf
           
 java.lang.String image
           
 javax.swing.JTextField image_tf
           
 int nbhoriz
           
 int NBHORIZ_DEFAULT
           
 javax.swing.JTextField nbhoriz_tf
           
 int nbvert
           
 int NBVERT_DEFAULT
           
 javax.swing.JTextField nbvert_tf
           
 int padhoriz
           
 int PADHORIZ_DEFAULT
           
 javax.swing.JTextField padhoriz_tf
           
 int padvert
           
 int PADVERT_DEFAULT
           
 javax.swing.JTextField padvert_tf
           
 
Fields inherited from class vlcskineditor.Item
clicked, created, help, HELP_DEFAULT, hovered, id, ID_DEFAULT, lefttop, LEFTTOP_DEFAULT, offsetx, offsety, rightbottom, RIGHTBOTTOM_DEFAULT, s, selected, type, vis, visible, VISIBLE_DEFAULT, x, X_DEFAULT, xkeepratio, XKEEPRATIO_DEFAULT, y, Y_DEFAULT, ykeepratio, YKEEPRATIO_DEFAULT
 
Constructor Summary
SliderBackground(org.w3c.dom.Node n, Skin s_, Slider pr)
          Parses a SliderBackground from a XML node
SliderBackground(Skin s_, Slider sl_)
           
SliderBackground(java.lang.String xmlcode, Skin s_)
          Creates a new instance of SliderBackground
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 boolean contains(int x_, int y_)
          Checks whether the given point is inside the Item
 void draw(java.awt.Graphics2D g, int z)
          Draws the item to a graphics context
 void draw(java.awt.Graphics2D g, int x_, int y_, int z)
          Draws the item to a graphics context with the offset x,y
 Slider getParentSlider()
           
 javax.swing.tree.DefaultMutableTreeNode getTreeNode()
          Creates a DefaultMutableTreeNode to be displayed in the items tree
 void resourceRenamed(java.lang.String oldid, java.lang.String newid)
          Changes all references to the resource formerly identfied by oldid to the resources newid
 java.lang.String returnCode(java.lang.String indent)
          Creates the XML code representing the item
 void showOptions()
          Show a dialog to modify the items's parameters
 void update()
          Update the Item's attributes according to the user input
 void updateToGlobalVariables()
          Invokes the item to update its variables that depend on the global variables, that is e.g. visibility
 boolean uses(java.lang.String id_)
          Checks whether the resource with the given ID is used by this Item or one of its subitems
 
Methods inherited from class vlcskineditor.Item
actionWasEdited, getItem, getParentListOf, getParentOf, renameForCopy, setClicked, setHover, setOffset, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NBHORIZ_DEFAULT

public final int NBHORIZ_DEFAULT
See Also:
Constant Field Values

NBVERT_DEFAULT

public final int NBVERT_DEFAULT
See Also:
Constant Field Values

PADHORIZ_DEFAULT

public final int PADHORIZ_DEFAULT
See Also:
Constant Field Values

PADVERT_DEFAULT

public final int PADVERT_DEFAULT
See Also:
Constant Field Values

image

public java.lang.String image

nbhoriz

public int nbhoriz

nbvert

public int nbvert

padhoriz

public int padhoriz

padvert

public int padvert

id_tf

public javax.swing.JTextField id_tf

image_tf

public javax.swing.JTextField image_tf

nbhoriz_tf

public javax.swing.JTextField nbhoriz_tf

nbvert_tf

public javax.swing.JTextField nbvert_tf

padhoriz_tf

public javax.swing.JTextField padhoriz_tf

padvert_tf

public javax.swing.JTextField padvert_tf
Constructor Detail

SliderBackground

public SliderBackground(org.w3c.dom.Node n,
                        Skin s_,
                        Slider pr)
Parses a SliderBackground from a XML node

Parameters:
n - The XML node
s_ - The parent skin
pr - The parent slider

SliderBackground

public SliderBackground(java.lang.String xmlcode,
                        Skin s_)
Creates a new instance of SliderBackground

Parameters:
xmlcode - The XML code
s_ - The parent skin

SliderBackground

public SliderBackground(Skin s_,
                        Slider sl_)
Method Detail

update

public void update()
Description copied from class: Item
Update the Item's attributes according to the user input

Specified by:
update in class Item

showOptions

public void showOptions()
Description copied from class: Item
Show a dialog to modify the items's parameters

Specified by:
showOptions in class Item

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

returnCode

public java.lang.String returnCode(java.lang.String indent)
Description copied from class: Item
Creates the XML code representing the item

Specified by:
returnCode in class Item
Parameters:
indent - The indentation string
Returns:
The indented XML code

draw

public void draw(java.awt.Graphics2D g,
                 int z)
Description copied from class: Item
Draws the item to a graphics context

Specified by:
draw in class Item
Parameters:
g - graphics context
z - zoom factor

draw

public void draw(java.awt.Graphics2D g,
                 int x_,
                 int y_,
                 int z)
Description copied from class: Item
Draws the item to a graphics context with the offset x,y

Specified by:
draw in class Item
Parameters:
g - Graphics context
x_ - X offset
y_ - Y offset
z - Zoom factor

contains

public boolean contains(int x_,
                        int y_)
Description copied from class: Item
Checks whether the given point is inside the Item

Overrides:
contains in class Item
Parameters:
x_ - The point's x coordinate
y_ - The point's y coordinate
Returns:
True when the point is contained in the Item, false otherwise

getTreeNode

public javax.swing.tree.DefaultMutableTreeNode getTreeNode()
Description copied from class: Item
Creates a DefaultMutableTreeNode to be displayed in the items tree

Specified by:
getTreeNode in class Item
Returns:
The DefaultMutableTreeNode representation of this Item

uses

public boolean uses(java.lang.String id_)
Description copied from class: Item
Checks whether the resource with the given ID is used by this Item or one of its subitems

Overrides:
uses in class Item
Parameters:
id_ - The resource's id
Returns:
True if used, false otherwise

updateToGlobalVariables

public void updateToGlobalVariables()
Description copied from class: Item
Invokes the item to update its variables that depend on the global variables, that is e.g. visibility

Overrides:
updateToGlobalVariables in class Item

resourceRenamed

public void resourceRenamed(java.lang.String oldid,
                            java.lang.String newid)
Description copied from class: Item
Changes all references to the resource formerly identfied by oldid to the resources newid

Overrides:
resourceRenamed in class Item
Parameters:
oldid - The former ID of the renamed resource
newid - The new ID of the renamed resource

getParentSlider

public Slider getParentSlider()