vlcskineditor
Class Main

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by vlcskineditor.Main
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.TreeSelectionListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class Main
extends javax.swing.JFrame
implements java.awt.event.ActionListener, javax.swing.event.TreeSelectionListener, java.awt.event.WindowListener, java.awt.event.MouseListener

The main class holds the GUI

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static javax.swing.ImageIcon add_bitmap_icon
           
static javax.swing.ImageIcon add_font_icon
           
static javax.swing.ImageIcon add_icon
           
static javax.swing.ImageIcon add_layout_icon
           
static javax.swing.ImageIcon add_window_icon
           
static javax.swing.ImageIcon copy_icon
           
static javax.swing.ImageIcon delete_icon
           
static javax.swing.ImageIcon down_icon
           
static javax.swing.ImageIcon edit_icon
           
static javax.swing.ImageIcon edit_redo_icon
           
static javax.swing.ImageIcon edit_undo_icon
           
static javax.swing.ImageIcon editor_icon
           
static javax.swing.ImageIcon exit_icon
           
static javax.swing.ImageIcon help_icon
           
 History hist
          Handles undoing and redoing of actions
static javax.swing.ImageIcon icon
          The VLC Skin Editor icon.
static javax.swing.ImageIcon items_icon
           
protected  javax.swing.JTree items_tree
          The trees containing the resources/windows/items hierarchy
protected  javax.swing.tree.DefaultTreeModel items_tree_model
          The tree models of the trees containing the resources/windows/items hierarchy
static javax.swing.ImageIcon new_icon
           
static javax.swing.ImageIcon open_icon
           
static javax.swing.ImageIcon preview_icon
           
protected  PreviewWindow pvwin
          The preview window
protected  javax.swing.JTree res_tree
          The trees containing the resources/windows/items hierarchy
protected  javax.swing.tree.DefaultTreeModel res_tree_model
          The tree models of the trees containing the resources/windows/items hierarchy
static javax.swing.ImageIcon resources_icon
           
 Skin s
          The currently opened skin
static javax.swing.ImageIcon save_icon
           
 boolean saved
          Specifies whether changes were made without having saved the skin.
static int TEXTFIELD_WIDTH
          Textfield width for all editing dialogs
static javax.swing.ImageIcon up_icon
           
static java.lang.String VERSION
          The version identification of the current build.
static javax.swing.ImageIcon vlc_icon
           
static javax.swing.ImageIcon vlt_icon
           
protected  javax.swing.JTree win_tree
          The trees containing the resources/windows/items hierarchy
protected  javax.swing.tree.DefaultTreeModel win_tree_model
          The tree models of the trees containing the resources/windows/items hierarchy
static javax.swing.ImageIcon windows_icon
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Main(java.lang.String[] args)
          Launches the skin editor and initializes the GUI.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Reacts to GUI actions
static javax.swing.ImageIcon createIcon(java.lang.String filename)
          Creates an ImageIcon of an image included in the JAR
 java.lang.String getSelectedInWindows()
           
 java.lang.String getSelectedItem()
           
 java.lang.String getSelectedLayout()
           
 java.lang.String getSelectedResource()
           
 java.lang.String getSelectedWindow()
           
 void hideToolbar()
           
static void main(java.lang.String[] args)
          Creates a new instance of Main and thus launches the editor
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void setRedoEnabled(boolean enabled)
          Sets the activity state of the redo menu item to the given argument
 void setRedoString(java.lang.String s)
          Sets the action description that can be redone
 void setUndoEnabled(boolean enabled)
          Sets the activity state of the undo menu item to the given argument
 void setUndoString(java.lang.String s)
          Sets the action description that can be undone
 void showToolbar()
           
 void showWelcomeDialog()
          Shows a dialog from which the user can choose to either create a new skin, open an existing skin or quit the skin editor.
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
          Reacts to tree selections
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

VERSION

public static final java.lang.String VERSION
The version identification of the current build.

See Also:
Constant Field Values

res_tree

protected javax.swing.JTree res_tree
The trees containing the resources/windows/items hierarchy


win_tree

protected javax.swing.JTree win_tree
The trees containing the resources/windows/items hierarchy


items_tree

protected javax.swing.JTree items_tree
The trees containing the resources/windows/items hierarchy


res_tree_model

protected javax.swing.tree.DefaultTreeModel res_tree_model
The tree models of the trees containing the resources/windows/items hierarchy


win_tree_model

protected javax.swing.tree.DefaultTreeModel win_tree_model
The tree models of the trees containing the resources/windows/items hierarchy


items_tree_model

protected javax.swing.tree.DefaultTreeModel items_tree_model
The tree models of the trees containing the resources/windows/items hierarchy


s

public Skin s
The currently opened skin


add_bitmap_icon

public static javax.swing.ImageIcon add_bitmap_icon

add_font_icon

public static javax.swing.ImageIcon add_font_icon

copy_icon

public static javax.swing.ImageIcon copy_icon

edit_icon

public static javax.swing.ImageIcon edit_icon

edit_undo_icon

public static javax.swing.ImageIcon edit_undo_icon

edit_redo_icon

public static javax.swing.ImageIcon edit_redo_icon

editor_icon

public static javax.swing.ImageIcon editor_icon

delete_icon

public static javax.swing.ImageIcon delete_icon

add_window_icon

public static javax.swing.ImageIcon add_window_icon

add_layout_icon

public static javax.swing.ImageIcon add_layout_icon

add_icon

public static javax.swing.ImageIcon add_icon

up_icon

public static javax.swing.ImageIcon up_icon

down_icon

public static javax.swing.ImageIcon down_icon

help_icon

public static javax.swing.ImageIcon help_icon

icon

public static javax.swing.ImageIcon icon
The VLC Skin Editor icon.


open_icon

public static javax.swing.ImageIcon open_icon

save_icon

public static javax.swing.ImageIcon save_icon

vlc_icon

public static javax.swing.ImageIcon vlc_icon

vlt_icon

public static javax.swing.ImageIcon vlt_icon

new_icon

public static javax.swing.ImageIcon new_icon

exit_icon

public static javax.swing.ImageIcon exit_icon

resources_icon

public static javax.swing.ImageIcon resources_icon

windows_icon

public static javax.swing.ImageIcon windows_icon

items_icon

public static javax.swing.ImageIcon items_icon

preview_icon

public static javax.swing.ImageIcon preview_icon

pvwin

protected PreviewWindow pvwin
The preview window


saved

public boolean saved
Specifies whether changes were made without having saved the skin.


hist

public History hist
Handles undoing and redoing of actions


TEXTFIELD_WIDTH

public static final int TEXTFIELD_WIDTH
Textfield width for all editing dialogs

See Also:
Constant Field Values
Constructor Detail

Main

public Main(java.lang.String[] args)
Launches the skin editor and initializes the GUI.

Parameters:
args - Command line arguments passed by the console. If there exist one or more arguments, the first argument is intepreted as a file locator for a skin to be loaded.
Method Detail

showToolbar

public void showToolbar()

hideToolbar

public void hideToolbar()

showWelcomeDialog

public void showWelcomeDialog()
Shows a dialog from which the user can choose to either create a new skin, open an existing skin or quit the skin editor.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Reacts to GUI actions

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - The performed action

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Reacts to tree selections

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

setUndoEnabled

public void setUndoEnabled(boolean enabled)
Sets the activity state of the undo menu item to the given argument

Parameters:
enabled - Activity state

setRedoEnabled

public void setRedoEnabled(boolean enabled)
Sets the activity state of the redo menu item to the given argument

Parameters:
enabled - Activity state

setUndoString

public void setUndoString(java.lang.String s)
Sets the action description that can be undone

Parameters:
s - Action description

setRedoString

public void setRedoString(java.lang.String s)
Sets the action description that can be redone

Parameters:
s - Action description

createIcon

public static javax.swing.ImageIcon createIcon(java.lang.String filename)
Creates an ImageIcon of an image included in the JAR

Parameters:
filename - The path to the image file inside the JAR
Returns:
An ImageIcon representing the given file

main

public static void main(java.lang.String[] args)
Creates a new instance of Main and thus launches the editor

Parameters:
args - the command line arguments

getSelectedResource

public java.lang.String getSelectedResource()
Returns:
the selected resource in the resources window

getSelectedInWindows

public java.lang.String getSelectedInWindows()
Returns:
the object selected in the windows/layouts window

getSelectedWindow

public java.lang.String getSelectedWindow()
Returns:
the selected window

getSelectedLayout

public java.lang.String getSelectedLayout()
Returns:
the selected layout

getSelectedItem

public java.lang.String getSelectedItem()
Returns:
the selected item in the items window