Changeset 104

Show
Ignore:
Timestamp:
06/24/08 15:31:44 (3 months ago)
Author:
altglass
Message:

-New SpringLayout? for Resources, Window & Layout editing dialogs finished and perfected
-README.TXT : updated changelog in

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/README.TXT

    r100 r104  
    1 VLC Skin Editor release 0.7.0b 
     1VLC Skin Editor release 0.7.0 
    22----------------------------------------------------------- 
    33Changelog: 
    44----------------------------------------------------------- 
    5 0.7.0b - Preview can be saved as image 
     50.7.0 - Preview can be saved as image 
    66       - Improved SubBitmap editing 
    77       - Resources/windows/layouts can be duplicated easily 
     
    99       - Slider backgrounds can be generated in a wizard 
    1010       - Improved preview of skin (can be zoomed now) 
     11       - Improved cross platform behaviour 
     12       - Improved online help 
     13       - Some (critical) bugs were fixed 
     14        
    11150.6.1b - Critical bufix for the Preview Window  
    1216       - Bugfix for slider points parsing and XML parsing 
     17        
    13180.6.0b - Resources/windows/layouts/items can be edited by 
    1419         doubleclicking on them in the hiearchy trees 
     
    2126       - Many actions can be undone/redone 
    2227       - SubBitmaps can be edited visually 
     28        
    23290.5.0a - Boolean variables are interpreted in the preview 
    2430       - Global variables can be edited (boolean only atm) 
     
    2733       - Some bugfixes 
    2834       - New icons 
     35        
    29360.4.5a - Several bugfixes 
    3037       - Text variables are interpreted in the preview 
     38        
    31390.4.0a - Items can be positioned with the mouse 
    3240       - Trees don't collapse anymore completely when an 
    3341         element in it is updated, they automatically 
    3442               expand the path to the updated item and select it 
     43          
    35440.3.5b - NullPointerException fix for Playtree rendering 
    3645       - VLT files can be imported 
     46        
    37470.3.5a - Preview of Layouts 
    3848       - XML parsing/generating fixes 
     49        
    39500.3.0b - All items can be edited 
    4051       - Theme attributes can be edited 
     
    4253       - The open/save dialog will point by default to the 
    4354         VLC Skins directory on Windows and Linux 
     55          
    44560.3.0a - Items can be added 
    4557       - Items can be deleted 
    4658       - All items except SliderBGs, Playlists, Playtrees 
    4759         can be edited 
     60          
    48610.2.8a - Improved trees 
    4962       - Groups, Panels and Images can be edited 
    5063       - Several PNG files can be added at once 
    5164       - Confirmation of exiting if skin is unsafed 
     65        
    52660.2.5a - Windows and Layouts can be edited 
    5367       - Bitmaps, SubBitmaps and Fonts can be added 
     68        
    54690.2.0a - Now files can be saved 
    5570       - Font, Bitmap and SubBitmap resources can be edited 
     71        
    56720.1.0b - Initial Release 
    5773       - Complete XML parsing of a skins2 file 
  • trunk/src/vlcskineditor/Layout.java

    r101 r104  
    236236      ok_btn = new JButton("OK"); 
    237237      ok_btn.addActionListener(this); 
    238       ok_btn.setPreferredSize(new Dimension(70,25)); 
    239238      cancel_btn = new JButton("Cancel"); 
    240239      cancel_btn.addActionListener(this); 
    241       cancel_btn.setPreferredSize(new Dimension(70,25)); 
    242240      help_btn = new JButton("Help"); 
    243241      help_btn.addActionListener(this); 
    244       help_btn.setPreferredSize(new Dimension(70,25)); 
     242      JLabel attr_l = new JLabel("* Attributes marked with a star must be specified."); 
     243       
     244      //Distance of textfields to WEST edge of container 
     245      Component[] labels = { id_l, width_l, height_l, minwidth_l, minheight_l, maxwidth_l, maxheight_l}; 
     246      int tf_dx = Helper.maxWidth(labels)+10; 
     247      //Max. textfield width 
     248      int tf_wd = 200; 
    245249       
    246250      JPanel general = new JPanel(null); 
    247251      general.add(id_l); 
    248       general.add(id_tf); 
    249       id_l.setBounds(5,15,75,24); 
    250       id_tf.setBounds(85,15,150,24); 
     252      general.add(id_tf);       
     253      id_tf.setPreferredSize(new Dimension(tf_wd,id_tf.getPreferredSize().height)); 
    251254      general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes")); 
    252       general.setMinimumSize(new Dimension(240,45)); 
    253       general.setPreferredSize(new Dimension(240,45)); 
    254       general.setMaximumSize(new Dimension(240,45)); 
     255      SpringLayout general_layout = new SpringLayout(); 
     256      general.setLayout(general_layout); 
     257      general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general); 
     258      general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);       
     259      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, id_tf, 0, SpringLayout.VERTICAL_CENTER, id_l); 
     260      general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general);       
     261      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, id_tf); 
     262      general_layout.putConstraint(SpringLayout.SOUTH, general, 10, SpringLayout.SOUTH, id_l); 
    255263      frame.add(general); 
    256264       
    257265      JPanel dim = new JPanel(null); 
    258266      dim.add(width_l); 
    259       dim.add(width_tf); 
    260       width_l.setBounds(5,15,75,24); 
    261       width_tf.setBounds(85,15,150,24); 
     267      dim.add(width_tf);      
     268      width_tf.setPreferredSize(new Dimension(tf_wd,width_tf.getPreferredSize().height)); 
    262269      dim.add(height_l); 
    263270      dim.add(height_tf); 
    264       height_l.setBounds(5,45,75,24); 
    265       height_tf.setBounds(85,45,150,24); 
    266       dim.add(minwidth_l); 
     271      height_tf.setPreferredSize(new Dimension(tf_wd,height_tf.getPreferredSize().height)); 
     272      dim.add(minwidth_l);       
    267273      dim.add(minwidth_tf); 
    268       minwidth_l.setBounds(5,75,75,24); 
    269       minwidth_tf.setBounds(85,75,150,24); 
     274      minwidth_tf.setPreferredSize(new Dimension(tf_wd,minwidth_tf.getPreferredSize().height)); 
    270275      dim.add(minheight_l); 
    271276      dim.add(minheight_tf); 
    272       minheight_l.setBounds(5,105,75,24); 
    273       minheight_tf.setBounds(85,105,150,24); 
     277      minheight_tf.setPreferredSize(new Dimension(tf_wd,minheight_tf.getPreferredSize().height)); 
    274278      dim.add(maxwidth_l); 
    275279      dim.add(maxwidth_tf); 
    276       maxwidth_l.setBounds(5,135,75,24); 
    277       maxwidth_tf.setBounds(85,135,150,24); 
     280      maxwidth_tf.setPreferredSize(new Dimension(tf_wd,maxwidth_tf.getPreferredSize().height)); 
    278281      dim.add(maxheight_l); 
    279282      dim.add(maxheight_tf); 
    280       maxheight_l.setBounds(5,165,75,24); 
    281       maxheight_tf.setBounds(85,165,150,24); 
     283      maxheight_tf.setPreferredSize(new Dimension(tf_wd,maxheight_tf.getPreferredSize().height)); 
    282284      dim.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Dimensions")); 
    283       dim.setMinimumSize(new Dimension(240,195)); 
    284       dim.setPreferredSize(new Dimension(240,195)); 
    285       dim.setMaximumSize(new Dimension(240,195)); 
     285      SpringLayout dim_layout = new SpringLayout(); 
     286      dim.setLayout(dim_layout); 
     287      dim_layout.putConstraint(SpringLayout.NORTH, width_l, 5, SpringLayout.NORTH, dim); 
     288      dim_layout.putConstraint(SpringLayout.WEST, width_l, 5, SpringLayout.WEST, dim); 
     289       
     290      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, width_tf, 0, SpringLayout.VERTICAL_CENTER, width_l); 
     291      dim_layout.putConstraint(SpringLayout.WEST, width_tf, tf_dx, SpringLayout.WEST, dim); 
     292      dim_layout.putConstraint(SpringLayout.EAST, dim, 5, SpringLayout.EAST, width_tf); 
     293       
     294      dim_layout.putConstraint(SpringLayout.NORTH, height_l, 10, SpringLayout.SOUTH, width_l); 
     295      dim_layout.putConstraint(SpringLayout.WEST, height_l, 5, SpringLayout.WEST, dim); 
     296       
     297      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, height_tf, 0, SpringLayout.VERTICAL_CENTER, height_l); 
     298      dim_layout.putConstraint(SpringLayout.WEST, height_tf, tf_dx, SpringLayout.WEST, dim); 
     299      dim_layout.putConstraint(SpringLayout.EAST, height_tf, 0, SpringLayout.EAST, width_tf); 
     300       
     301      dim_layout.putConstraint(SpringLayout.NORTH, minwidth_l, 10, SpringLayout.SOUTH, height_l); 
     302      dim_layout.putConstraint(SpringLayout.WEST, minwidth_l, 5, SpringLayout.WEST, dim); 
     303       
     304      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, minwidth_tf, 0, SpringLayout.VERTICAL_CENTER, minwidth_l); 
     305      dim_layout.putConstraint(SpringLayout.WEST, minwidth_tf, tf_dx, SpringLayout.WEST, dim); 
     306      dim_layout.putConstraint(SpringLayout.EAST, minwidth_tf, 0, SpringLayout.EAST, width_tf); 
     307       
     308      dim_layout.putConstraint(SpringLayout.NORTH, minheight_l, 10, SpringLayout.SOUTH, minwidth_l); 
     309      dim_layout.putConstraint(SpringLayout.WEST, minheight_l, 5, SpringLayout.WEST, dim); 
     310       
     311      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, minheight_tf, 0, SpringLayout.VERTICAL_CENTER, minheight_l); 
     312      dim_layout.putConstraint(SpringLayout.WEST, minheight_tf, tf_dx, SpringLayout.WEST, dim); 
     313      dim_layout.putConstraint(SpringLayout.EAST, minheight_tf, 0, SpringLayout.EAST, width_tf); 
     314       
     315      dim_layout.putConstraint(SpringLayout.NORTH, maxwidth_l, 10, SpringLayout.SOUTH, minheight_l); 
     316      dim_layout.putConstraint(SpringLayout.WEST, maxwidth_l, 5, SpringLayout.WEST, dim); 
     317       
     318      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, maxwidth_tf, 0, SpringLayout.VERTICAL_CENTER, maxwidth_l); 
     319      dim_layout.putConstraint(SpringLayout.WEST, maxwidth_tf, tf_dx, SpringLayout.WEST, dim); 
     320      dim_layout.putConstraint(SpringLayout.EAST, maxwidth_tf, 0, SpringLayout.EAST, width_tf); 
     321       
     322      dim_layout.putConstraint(SpringLayout.NORTH, maxheight_l, 10, SpringLayout.SOUTH, maxwidth_l); 
     323      dim_layout.putConstraint(SpringLayout.WEST, maxheight_l, 5, SpringLayout.WEST, dim); 
     324       
     325      dim_layout.putConstraint(SpringLayout.VERTICAL_CENTER, maxheight_tf, 0, SpringLayout.VERTICAL_CENTER, maxheight_l); 
     326      dim_layout.putConstraint(SpringLayout.WEST, maxheight_tf, tf_dx, SpringLayout.WEST, dim); 
     327      dim_layout.putConstraint(SpringLayout.EAST, maxheight_tf, 0, SpringLayout.EAST, width_tf); 
     328       
     329      dim_layout.putConstraint(SpringLayout.SOUTH, dim, 10, SpringLayout.SOUTH, maxheight_l); 
     330       
    286331      frame.add(dim); 
    287332       
     
    289334      frame.add(cancel_btn); 
    290335      frame.add(help_btn); 
    291       frame.add(new JLabel("* required attribute")); 
    292        
    293       frame.setMinimumSize(new Dimension(250,350)); 
    294       frame.setPreferredSize(new Dimension(250,350)); 
    295       frame.setMaximumSize(new Dimension(250,350));       
     336      frame.add(attr_l);       
     337       
     338      SpringLayout layout = new SpringLayout(); 
     339      frame.setLayout(layout); 
     340       
     341      layout.putConstraint(SpringLayout.NORTH, general, 5, SpringLayout.NORTH, frame.getContentPane()); 
     342      layout.putConstraint(SpringLayout.WEST, general, 5, SpringLayout.WEST, frame.getContentPane()); 
     343       
     344      layout.putConstraint(SpringLayout.NORTH, dim, 5, SpringLayout.SOUTH, general); 
     345      layout.putConstraint(SpringLayout.WEST, dim, 5, SpringLayout.WEST, frame.getContentPane()); 
     346       
     347      layout.putConstraint(SpringLayout.NORTH, attr_l, 5, SpringLayout.SOUTH, dim); 
     348      layout.putConstraint(SpringLayout.WEST, attr_l, 5, SpringLayout.WEST, frame.getContentPane()); 
     349      layout.putConstraint(SpringLayout.EAST, attr_l, 5, SpringLayout.EAST, frame.getContentPane()); 
     350       
     351       
     352      layout.putConstraint(SpringLayout.NORTH, ok_btn, 5, SpringLayout.SOUTH, attr_l); 
     353      layout.putConstraint(SpringLayout.NORTH, cancel_btn, 5, SpringLayout.SOUTH, attr_l); 
     354      layout.putConstraint(SpringLayout.NORTH, help_btn, 5, SpringLayout.SOUTH, attr_l); 
     355       
     356      layout.putConstraint(SpringLayout.WEST, ok_btn, 5, SpringLayout.WEST, frame.getContentPane()); 
     357      layout.putConstraint(SpringLayout.WEST, cancel_btn, 5, SpringLayout.EAST, ok_btn); 
     358      layout.putConstraint(SpringLayout.WEST, help_btn, 5, SpringLayout.EAST, cancel_btn); 
     359       
     360      layout.putConstraint(SpringLayout.SOUTH, frame.getContentPane(), 5, SpringLayout.SOUTH, ok_btn); 
     361      layout.putConstraint(SpringLayout.EAST, frame.getContentPane(), 5, SpringLayout.EAST, general); 
     362       
     363      frame.pack(); 
     364       
     365      frame.getRootPane().setDefaultButton(ok_btn); 
    296366    } 
    297367    id_tf.setText(id); 
     
    335405            desktop = Desktop.getDesktop(); 
    336406            try { 
    337               desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#Layout")); 
     407              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skinedhlp/layout.html")); 
    338408            } 
    339409            catch (Exception ex) { 
     
    342412      } 
    343413      else { 
    344         JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     414        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skinedhlp/layout.html",JOptionPane.WARNING_MESSAGE);     
    345415      } 
    346416    } 
  • trunk/src/vlcskineditor/Window.java

    r103 r104  
    185185      general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);   
    186186       
    187       general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general); 
    188       general_layout.putConstraint(SpringLayout.NORTH, id_tf, 0, SpringLayout.NORTH, id_l);       
    189       general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, id_tf);  
     187      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, id_tf, 0, SpringLayout.VERTICAL_CENTER, id_l); 
     188      general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general);       
     189      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, id_tf); 
    190190       
    191191      general_layout.putConstraint(SpringLayout.NORTH, x_l, 10, SpringLayout.SOUTH, id_l); 
    192192      general_layout.putConstraint(SpringLayout.WEST, x_l, 5, SpringLayout.WEST, general); 
    193193       
    194       general_layout.putConstraint(SpringLayout.WEST, x_tf, tf_dx, SpringLayout.WEST, general); 
    195       general_layout.putConstraint(SpringLayout.NORTH, x_tf, 0, SpringLayout.NORTH, x_l); 
     194      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, x_tf, 0, SpringLayout.VERTICAL_CENTER, x_l); 
     195      general_layout.putConstraint(SpringLayout.WEST, x_tf, tf_dx, SpringLayout.WEST, general);       
    196196      general_layout.putConstraint(SpringLayout.EAST, x_tf, 0, SpringLayout.EAST, id_tf); 
    197197       
     
    199199      general_layout.putConstraint(SpringLayout.WEST, y_l, 5, SpringLayout.WEST, general); 
    200200       
    201       general_layout.putConstraint(SpringLayout.WEST, y_tf, tf_dx, SpringLayout.WEST, general); 
    202       general_layout.putConstraint(SpringLayout.NORTH, y_tf, 0, SpringLayout.NORTH, y_l); 
     201      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, y_tf, 0, SpringLayout.VERTICAL_CENTER, y_l); 
     202      general_layout.putConstraint(SpringLayout.WEST, y_tf, tf_dx, SpringLayout.WEST, general);       
    203203      general_layout.putConstraint(SpringLayout.EAST, y_tf, 0, SpringLayout.EAST, id_tf); 
    204204       
     
    206206      general_layout.putConstraint(SpringLayout.WEST, visible_l, 5, SpringLayout.WEST, general); 
    207207       
    208       general_layout.putConstraint(SpringLayout.WEST, visible_tf, tf_dx, SpringLayout.WEST, general); 
    209       general_layout.putConstraint(SpringLayout.NORTH, visible_tf, 0, SpringLayout.NORTH, visible_l); 
     208      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, visible_tf, 0, SpringLayout.VERTICAL_CENTER, visible_l); 
     209      general_layout.putConstraint(SpringLayout.WEST, visible_tf, tf_dx, SpringLayout.WEST, general);       
    210210      general_layout.putConstraint(SpringLayout.EAST, visible_tf, 0, SpringLayout.EAST, id_tf); 
    211211       
     
    226226      options_layout.putConstraint(SpringLayout.WEST, dragdrop_l, 5, SpringLayout.WEST, options); 
    227227       
    228       options_layout.putConstraint(SpringLayout.WEST, dragdrop_tf, tf_dx, SpringLayout.WEST, options); 
    229       options_layout.putConstraint(SpringLayout.NORTH, dragdrop_tf, 0, SpringLayout.NORTH, dragdrop_l); 
     228      options_layout.putConstraint(SpringLayout.VERTICAL_CENTER, dragdrop_tf, 0, SpringLayout.VERTICAL_CENTER, dragdrop_l); 
     229      options_layout.putConstraint(SpringLayout.WEST, dragdrop_tf, tf_dx, SpringLayout.WEST, options);       
    230230      options_layout.putConstraint(SpringLayout.EAST, options, 5, SpringLayout.EAST, dragdrop_tf); 
    231231       
     
    233233      options_layout.putConstraint(SpringLayout.WEST, playondrop_l, 5, SpringLayout.WEST, options); 
    234234       
    235       options_layout.putConstraint(SpringLayout.WEST, playondrop_tf, tf_dx, SpringLayout.NORTH, options); 
    236       options_layout.putConstraint(SpringLayout.NORTH, playondrop_tf, 0, SpringLayout.NORTH, playondrop_l); 
     235      options_layout.putConstraint(SpringLayout.VERTICAL_CENTER, playondrop_tf, 0, SpringLayout.VERTICAL_CENTER, playondrop_l); 
     236      options_layout.putConstraint(SpringLayout.WEST, playondrop_tf, tf_dx, SpringLayout.NORTH, options);       
    237237      options_layout.putConstraint(SpringLayout.EAST, playondrop_tf, 0, SpringLayout.EAST, dragdrop_tf); 
    238238       
  • trunk/src/vlcskineditor/resources/Bitmap.java

    r103 r104  
    239239      JLabel attr_l = new JLabel("* Attributes marked with a star must be specified."); 
    240240       
     241      //Distance of textfields to WEST edge of container 
     242      Component[] labels = { id_l, file_l, alphacolor_l, nbframes_l, fps_l}; 
     243      int tf_dx = Helper.maxWidth(labels)+10; 
     244      //Max. textfield width 
     245      int tf_wd = 200; 
     246      //Width of buttons 
     247      Component[] btns = { file_btn, alphacolor_btn }; 
     248      int btn_wd = Helper.maxWidth(btns);       
     249       
    241250      JPanel general = new JPanel(null); 
    242251      general.add(id_l); 
     
    248257      general.add(alphacolor_tf); 
    249258      general.add(alphacolor_btn); 
    250       general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));        
    251       frame.add(general); 
    252        
    253       //Distance of textfields to WEST edge of container 
    254       Component[] labels = { id_l, file_l, alphacolor_l, nbframes_l, fps_l}; 
    255       int tf_dx = Helper.maxWidth(labels)+10; 
    256       //Max. textfield width 
    257       int tf_wd = 200; 
    258       //Width of buttons 
    259       Component[] btns = { file_btn, alphacolor_btn }; 
    260       int btn_wd = Helper.maxWidth(btns); 
    261        
     259      file_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,file_tf.getPreferredSize().height)); 
     260      file_btn.setPreferredSize(new Dimension(btn_wd,file_btn.getPreferredSize().height)); 
     261      alphacolor_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,alphacolor_tf.getPreferredSize().height)); 
     262      alphacolor_btn.setPreferredSize(new Dimension(btn_wd,alphacolor_btn.getPreferredSize().height)); 
     263      general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));    
    262264      SpringLayout general_layout = new SpringLayout(); 
    263265      general.setLayout(general_layout);       
    264266       
    265267      general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general); 
    266       general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);       
     268      general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general); 
     269       
     270      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, id_tf, 0, SpringLayout.VERTICAL_CENTER, id_l); 
    267271      general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general); 
    268       general_layout.putConstraint(SpringLayout.NORTH, id_tf, 0, SpringLayout.NORTH, id_l); 
    269272      general_layout.putConstraint(SpringLayout.EAST, id_tf, 0, SpringLayout.EAST, file_btn); 
    270273       
    271274      general_layout.putConstraint(SpringLayout.NORTH, file_l, 10, SpringLayout.SOUTH, id_l); 
    272       general_layout.putConstraint(SpringLayout.WEST, file_l, 5, SpringLayout.WEST, general);       
     275      general_layout.putConstraint(SpringLayout.WEST, file_l, 5, SpringLayout.WEST, general); 
     276       
     277      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, file_tf, 0, SpringLayout.VERTICAL_CENTER, file_l); 
    273278      general_layout.putConstraint(SpringLayout.WEST, file_tf, tf_dx, SpringLayout.WEST, general); 
    274       general_layout.putConstraint(SpringLayout.NORTH, file_tf, 0, SpringLayout.NORTH, file_l);       
    275       file_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,file_tf.getPreferredSize().height)); 
    276       file_btn.setPreferredSize(new Dimension(btn_wd,file_btn.getPreferredSize().height)); 
     279       
     280      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, file_btn, 0, SpringLayout.VERTICAL_CENTER, file_l); 
    277281      general_layout.putConstraint(SpringLayout.WEST, file_btn, 5, SpringLayout.EAST, file_tf); 
    278       general_layout.putConstraint(SpringLayout.NORTH, file_btn, 0, SpringLayout.NORTH, file_l); 
    279282      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, file_btn); 
    280283       
    281284      general_layout.putConstraint(SpringLayout.NORTH, alphacolor_l, 10, SpringLayout.SOUTH, file_l); 
    282       general_layout.putConstraint(SpringLayout.WEST, alphacolor_l, 5, SpringLayout.WEST, general);       
     285      general_layout.putConstraint(SpringLayout.WEST, alphacolor_l, 5, SpringLayout.WEST, general); 
     286       
     287      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, alphacolor_tf, 0, SpringLayout.VERTICAL_CENTER, alphacolor_l); 
    283288      general_layout.putConstraint(SpringLayout.WEST, alphacolor_tf, tf_dx, SpringLayout.WEST, general); 
    284       general_layout.putConstraint(SpringLayout.NORTH, alphacolor_tf, 0, SpringLayout.NORTH, alphacolor_l); 
    285       alphacolor_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,alphacolor_tf.getPreferredSize().height)); 
    286       alphacolor_btn.setPreferredSize(new Dimension(btn_wd,alphacolor_btn.getPreferredSize().height)); 
     289       
     290      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, alphacolor_btn, 0, SpringLayout.VERTICAL_CENTER, alphacolor_l); 
    287291      general_layout.putConstraint(SpringLayout.WEST, alphacolor_btn, 5, SpringLayout.EAST, alphacolor_tf); 
    288       general_layout.putConstraint(SpringLayout.NORTH, alphacolor_btn, 0, SpringLayout.NORTH, alphacolor_l); 
    289292      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, alphacolor_btn); 
    290293       
    291294      general_layout.putConstraint(SpringLayout.SOUTH, general, 10, SpringLayout.SOUTH, alphacolor_l); 
     295      frame.add(general); 
    292296       
    293297      JPanel animation = new JPanel(null); 
     
    304308       
    305309      ani_layout.putConstraint(SpringLayout.NORTH, nbframes_l, 5, SpringLayout.NORTH, animation); 
    306       ani_layout.putConstraint(SpringLayout.WEST, nbframes_l, 5, SpringLayout.WEST, animation);       
     310      ani_layout.putConstraint(SpringLayout.WEST, nbframes_l, 5, SpringLayout.WEST, animation);      
     311       
     312      ani_layout.putConstraint(SpringLayout.VERTICAL_CENTER, nbframes_tf, 0, SpringLayout.VERTICAL_CENTER, nbframes_l); 
    307313      ani_layout.putConstraint(SpringLayout.WEST, nbframes_tf, tf_dx, SpringLayout.WEST, animation); 
    308       ani_layout.putConstraint(SpringLayout.NORTH, nbframes_tf, 0, SpringLayout.NORTH, nbframes_l); 
    309314      ani_layout.putConstraint(SpringLayout.EAST, animation, 5, SpringLayout.EAST, nbframes_tf); 
    310315       
    311316      ani_layout.putConstraint(SpringLayout.NORTH, fps_l, 10, SpringLayout.SOUTH, nbframes_l); 
    312       ani_layout.putConstraint(SpringLayout.WEST, fps_l, 5, SpringLayout.WEST, animation);       
     317      ani_layout.putConstraint(SpringLayout.WEST, fps_l, 5, SpringLayout.WEST, animation); 
     318       
     319      ani_layout.putConstraint(SpringLayout.VERTICAL_CENTER, fps_tf, 0, SpringLayout.VERTICAL_CENTER, fps_l); 
    313320      ani_layout.putConstraint(SpringLayout.WEST, fps_tf, tf_dx, SpringLayout.WEST, animation); 
    314       ani_layout.putConstraint(SpringLayout.NORTH, fps_tf, 0, SpringLayout.NORTH, fps_l); 
    315321      ani_layout.putConstraint(SpringLayout.EAST, fps_tf, 0, SpringLayout.EAST, nbframes_tf); 
    316322       
  • trunk/src/vlcskineditor/resources/Font.java

    r103 r104  
    180180      JLabel attr_l = new JLabel("* Attributes marked with a star must be specified."); 
    181181       
    182       JPanel general = new JPanel(null);       
    183       general.add(id_l); 
    184       general.add(id_tf);      
    185       general.add(file_l); 
    186       general.add(file_tf); 
    187       general.add(file_btn); 
    188       general.add(size_l); 
    189       general.add(size_tf); 
    190        
    191       general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));        
    192        
    193       SpringLayout general_layout = new SpringLayout(); 
    194       general.setLayout(general_layout); 
    195        
    196182      //Textfield distance to WEST border of container 
    197183      Component[] labels = { id_l, file_l, size_l }; 
     
    202188      int btn_wd = file_btn.getPreferredSize().width; 
    203189       
     190      JPanel general = new JPanel(null);       
     191      general.add(id_l); 
     192      general.add(id_tf);      
     193      general.add(file_l); 
     194      general.add(file_tf); 
     195      file_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,file_tf.getPreferredSize().height)); 
     196      general.add(file_btn); 
     197      general.add(size_l); 
     198      general.add(size_tf); 
     199       
     200      general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));        
     201       
     202      SpringLayout general_layout = new SpringLayout(); 
     203      general.setLayout(general_layout); 
     204       
    204205      general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general); 
    205       general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);       
     206      general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);      
     207       
     208      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, id_tf, 0, SpringLayout.VERTICAL_CENTER, id_l); 
    206209      general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general); 
    207       general_layout.putConstraint(SpringLayout.NORTH, id_tf, 0, SpringLayout.NORTH, id_l); 
    208210      general_layout.putConstraint(SpringLayout.EAST, id_tf, 0, SpringLayout.EAST, file_btn); 
    209211       
    210212      general_layout.putConstraint(SpringLayout.NORTH, file_l, 10, SpringLayout.SOUTH, id_l); 
    211       general_layout.putConstraint(SpringLayout.WEST, file_l, 5, SpringLayout.WEST, general);       
     213      general_layout.putConstraint(SpringLayout.WEST, file_l, 5, SpringLayout.WEST, general);      
     214       
     215      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, file_tf, 0, SpringLayout.VERTICAL_CENTER, file_l);       
    212216      general_layout.putConstraint(SpringLayout.WEST, file_tf, tf_dx, SpringLayout.WEST, general); 
    213       general_layout.putConstraint(SpringLayout.NORTH, file_tf, 0, SpringLayout.NORTH, file_l);       
    214       file_tf.setPreferredSize(new Dimension(tf_wd-btn_wd,file_tf.getPreferredSize().height)); 
     217       
     218      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, file_btn, 0, SpringLayout.VERTICAL_CENTER, file_l); 
    215219      general_layout.putConstraint(SpringLayout.WEST, file_btn, 5, SpringLayout.EAST, file_tf); 
    216       general_layout.putConstraint(SpringLayout.NORTH, file_btn, 0, SpringLayout.NORTH, file_l); 
    217220      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, file_btn); 
    218221       
    219222      general_layout.putConstraint(SpringLayout.NORTH, size_l, 10, SpringLayout.SOUTH, file_l); 
    220       general_layout.putConstraint(SpringLayout.WEST, size_l, 5, SpringLayout.WEST, general);       
     223      general_layout.putConstraint(SpringLayout.WEST, size_l, 5, SpringLayout.WEST, general); 
     224       
     225      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, size_tf, 0, SpringLayout.VERTICAL_CENTER, size_l); 
    221226      general_layout.putConstraint(SpringLayout.WEST, size_tf, tf_dx, SpringLayout.WEST, general); 
    222       general_layout.putConstraint(SpringLayout.NORTH, size_tf, 0, SpringLayout.NORTH, size_l); 
    223227      general_layout.putConstraint(SpringLayout.EAST, size_tf, 0, SpringLayout.EAST, file_btn); 
    224228       
  • trunk/src/vlcskineditor/resources/SubBitmap.java

    r103 r104  
    155155      id_tf = new JTextField(); 
    156156      id_tf.setToolTipText("Identifiant of the font that will be used with controls.."); 
    157       JLabel x_l = new JLabel("x:"); 
     157      JLabel x_l = new JLabel("X:"); 
    158158      x_tf = new JTextField(); 
    159159      x_tf.setDocument(new NumbersOnlyDocument(false)); 
    160       JLabel y_l = new JLabel("y:"); 
     160      JLabel y_l = new JLabel("Y:"); 
    161161      y_tf = new JTextField(); 
    162162      y_tf.setDocument(new NumbersOnlyDocument(false)); 
     
    198198      general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general); 
    199199      general_layout.putConstraint(SpringLayout.WEST, id_l, 5, SpringLayout.WEST, general);       
    200       general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general); 
    201       general_layout.putConstraint(SpringLayout.NORTH, id_tf, 0, SpringLayout.NORTH, id_l); 
     200      general_layout.putConstraint(SpringLayout.VERTICAL_CENTER, id_tf, 0, SpringLayout.VERTICAL_CENTER, id_l); 
     201      general_layout.putConstraint(SpringLayout.WEST, id_tf, tf_dx, SpringLayout.WEST, general);       
    202202      general_layout.putConstraint(SpringLayout.EAST, general, 5, SpringLayout.EAST, id_tf); 
    203203      general_layout.putConstraint(SpringLayout.SOUTH, general, 10, SpringLayout.SOUTH, id_l); 
     
    223223      bounds_layout.putConstraint(SpringLayout.WEST, x_l, 5, SpringLayout.WEST, bounds); 
    224224       
     225      bounds_layout.putConstraint(SpringLayout.VERTICAL_CENTER, x_tf, 0, SpringLayout.VERTICAL_CENTER, x_l); 
    225226      bounds_layout.putConstraint(SpringLayout.WEST, x_tf, tf_dx, SpringLayout.WEST, bounds); 
    226       bounds_layout.putConstraint(SpringLayout.NORTH, x_tf, 0, SpringLayout.NORTH, x_l); 
    227227      bounds_layout.putConstraint(SpringLayout.EAST, bounds, 5, SpringLayout.EAST, x_tf); 
    228228       
     
    230230      bounds_layout.putConstraint(SpringLayout.WEST, y_l, 5, SpringLayout.WEST, bounds); 
    231231       
     232      bounds_layout.putConstraint(SpringLayout.VERTICAL_CENTER, y_tf, 0, SpringLayout.VERTICAL_CENTER, y_l); 
    232233      bounds_layout.putConstraint(SpringLayout.WEST, y_tf, tf_dx, SpringLayout.WEST, bounds); 
    233       bounds_layout.putConstraint(SpringLayout.NORTH, y_tf, 0, SpringLayout.NORTH, y_l); 
    234234      bounds_layout.putConstraint(SpringLayout.EAST, y_tf, 0, SpringLayout.EAST, x_tf); 
    235235       
     
    237237      bounds_layout.putConstraint(SpringLayout.WEST, width_l, 5, SpringLayout.WEST, bounds); 
    238238       
     239      bounds_layout.putConstraint(SpringLayout.VERTICAL_CENTER, width_tf, 0, SpringLayout.VERTICAL_CENTER, width_l); 
    239240      bounds_layout.putConstraint(SpringLayout.WEST, width_tf, tf_dx, SpringLayout.WEST, bounds); 
    240       bounds_layout.putConstraint(SpringLayout.NORTH, width_tf, 0, SpringLayout.NORTH, width_l); 
    241241      bounds_layout.putConstraint(SpringLayout.EAST, width_tf, 0, SpringLayout.EAST, x_tf); 
    242242       
     
    244244      bounds_layout.putConstraint(SpringLayout.WEST, height_l, 5, SpringLayout.WEST, bounds); 
    245245       
     246      bounds_layout.putConstraint(SpringLayout.VERTICAL_CENTER, height_tf, 0, SpringLayout.VERTICAL_CENTER, height_l); 
    246247      bounds_layout.putConstraint(SpringLayout.WEST, height_tf, tf_dx, SpringLayout.WEST, bounds); 
    247       bounds_layout.putConstraint(SpringLayout.NORTH, height_tf, 0, SpringLayout.NORTH, height_l); 
    248248      bounds_layout.putConstraint(SpringLayout.EAST, height_tf, 0, SpringLayout.EAST, x_tf); 
    249249       
     
    261261      nbframes_tf.setPreferredSize(new Dimension(tf_wd,nbframes_tf.getPreferredSize().height)); 
    262262      ani_layout.putConstraint(SpringLayout.NORTH, nbframes_l, 5, SpringLayout.NORTH, animation); 
    263       ani_layout.putConstraint(SpringLayout.WEST, nbframes_l, 5, SpringLayout.WEST, animation);       
     263      ani_layout.putConstraint(SpringLayout.WEST, nbframes_l, 5, SpringLayout.WEST, animation); 
     264       
     265      ani_layout.putConstraint(SpringLayout.VERTICAL_CENTER, nbframes_tf, 0, SpringLayout.VERTICAL_CENTER, nbframes_l); 
    264266      ani_layout.putConstraint(SpringLayout.WEST, nbframes_tf, tf_dx, SpringLayout.WEST, animation); 
    265       ani_layout.putConstraint(SpringLayout.NORTH, nbframes_tf, 0, SpringLayout.NORTH, nbframes_l); 
    266267      ani_layout.putConstraint(SpringLayout.EAST, animation, 5, SpringLayout.EAST, nbframes_tf); 
     268       
    267269      ani_layout.putConstraint(SpringLayout.NORTH, fps_l, 10, SpringLayout.SOUTH, nbframes_l); 
    268       ani_layout.putConstraint(SpringLayout.WEST, fps_l, 5, SpringLayout.WEST, animation);       
     270      ani_layout.putConstraint(SpringLayout.WEST, fps_l, 5, SpringLayout.WEST, animation); 
     271       
     272      ani_layout.putConstraint(SpringLayout.VERTICAL_CENTER, fps_tf, 0, SpringLayout.VERTICAL_CENTER, fps_l); 
    269273      ani_layout.putConstraint(SpringLayout.WEST, fps_tf, tf_dx, SpringLayout.WEST, animation); 
    270       ani_layout.putConstraint(SpringLayout.NORTH, fps_tf, 0, SpringLayout.NORTH, fps_l); 
    271274      ani_layout.putConstraint(SpringLayout.EAST, fps_tf, 0, SpringLayout.EAST, nbframes_tf); 
     275       
    272276      ani_layout.putConstraint(SpringLayout.SOUTH, animation, 10, SpringLayout.SOUTH, fps_l);      
    273277      frame.add(animation);