|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvlcskineditor.Skin
public class Skin
Represents a skin file. Stores all Resources and Windows, which in turn store the Layouts that contain the items.
| Field Summary | |
|---|---|
GlobalVariables |
gvars
|
static java.lang.String |
indentation
|
Main |
m
|
java.util.List<Resource> |
resources
|
java.lang.String |
skinfolder
|
int |
theme_alpha
|
int |
theme_magnet
|
int |
theme_movealpha
|
java.lang.String |
themeinfo_author
|
java.lang.String |
themeinfo_email
|
java.lang.String |
themeinfo_name
|
java.lang.String |
themeinfo_webpage
|
java.util.List<Window> |
windows
|
| Constructor Summary | |
|---|---|
Skin(Main m_)
Constructs a new skin manager |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
createNew(java.io.File f)
Creates a new empty skins in the given file |
void |
expandItem(java.lang.String id)
Make an item of the given id visible in the tree (expand the TreePath) |
void |
expandLayout(java.lang.String id)
Make a Layout of the given id visible |
void |
expandResource(java.lang.String id)
Make an Resource of the given id visible in the tree (expand the TreePath) |
javax.swing.tree.TreePath |
findInTree(javax.swing.JTree jt,
java.lang.String id)
Finds the first occurence of id in the first expanded tree in the given JTree |
java.awt.image.BufferedImage |
getBitmapImage(java.lang.String id)
Deprecated. Use getImageResource instead |
java.awt.Font |
getFont(java.lang.String id)
|
ImageResource |
getImageResource(java.lang.String id)
|
Item |
getItem(java.lang.String id_)
Return the item with the given id |
javax.swing.tree.DefaultMutableTreeNode |
getItemsTree()
Creates the layout's items hierarchy |
java.util.List<Item> |
getListOf(java.lang.String id_)
Returns the list of the given Group/Panel that contains the items |
int |
getNewId()
Generates a new number for unnamed items so that every id is unique |
java.util.List<Item> |
getParentListOf(java.lang.String id_)
Returns the parent element that contains the item of the given id |
Resource |
getResource(java.lang.String id)
Returns the resource represented by the given id |
javax.swing.tree.DefaultMutableTreeNode |
getResourcesTree()
Creates the resources hierarchy |
Window |
getWindow(java.lang.String id)
Returns the window represented by the given id |
javax.swing.tree.DefaultMutableTreeNode |
getWindowsTree()
Creates the windows hierarchy |
boolean |
idExists(java.lang.String id)
Checks whether an id exists already |
boolean |
isUsed(java.lang.String id_)
Returns true if the resource with the given id is in use by any item of the skin |
void |
open(java.io.File f)
Handles the parsing of a given file into the skin structure |
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()
Creates the XML of the skin |
void |
save()
Saves the XML Code into the skinfile |
void |
showThemeOptions()
Show the theme setting editing dialog |
void |
update()
Updates everything |
void |
updateItems()
Recreates the item hierarchies |
void |
updateResources()
Recreates the resource hierarchies |
void |
updateWindows()
Recreates the window hierarchies |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.List<Resource> resources
public java.util.List<Window> windows
public int theme_magnet
public int theme_alpha
public int theme_movealpha
public java.lang.String themeinfo_name
public java.lang.String themeinfo_author
public java.lang.String themeinfo_email
public java.lang.String themeinfo_webpage
public java.lang.String skinfolder
public Main m
public GlobalVariables gvars
public static java.lang.String indentation
| Constructor Detail |
|---|
public Skin(Main m_)
m_ - The current instance of the main interface, needed for GUI interaction| Method Detail |
|---|
public void createNew(java.io.File f)
f - The target filepublic void open(java.io.File f)
f - public void save()
public void showThemeOptions()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic int getNewId()
public boolean idExists(java.lang.String id)
public ImageResource getImageResource(java.lang.String id)
public Resource getResource(java.lang.String id)
public java.awt.image.BufferedImage getBitmapImage(java.lang.String id)
id - The id of the Bitmap resource
public java.awt.Font getFont(java.lang.String id)
public Window getWindow(java.lang.String id)
public boolean isUsed(java.lang.String id_)
public void resourceRenamed(java.lang.String oldid,
java.lang.String newid)
oldid - The former ID of the renamed resourcenewid - The new ID of the renamed resourcepublic java.util.List<Item> getParentListOf(java.lang.String id_)
public java.util.List<Item> getListOf(java.lang.String id_)
public Item getItem(java.lang.String id_)
public javax.swing.tree.DefaultMutableTreeNode getResourcesTree()
public javax.swing.tree.DefaultMutableTreeNode getWindowsTree()
public javax.swing.tree.DefaultMutableTreeNode getItemsTree()
public java.lang.String returnCode()
public void updateResources()
public void updateWindows()
public void updateItems()
public void update()
public void expandResource(java.lang.String id)
public void expandLayout(java.lang.String id)
public void expandItem(java.lang.String id)
id - The id of the item to expand
public javax.swing.tree.TreePath findInTree(javax.swing.JTree jt,
java.lang.String id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||