Changeset 38

Show
Ignore:
Timestamp:
12/09/07 18:34:54 (1 year ago)
Author:
altglass
Message:

Release 0.4.5a
several bugfixes
help buttons for boolean expressions/actions => can be converted later to call the editors for those

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vlcskineditor/Items/Button.java

    r37 r38  
    4848  JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, up_tf, down_tf, over_tf, action_tf, tooltiptext_tf; 
    4949  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb; 
    50   JButton ok_btn, help_btn; 
     50  JButton visible_btn, action_btn, ok_btn, help_btn; 
    5151   
    5252   
     
    6767    if(xmlcode.indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
    6868    if(xmlcode.indexOf("tooltiptext=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"tooltiptext"); 
     69    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    6970  } 
    7071  public Button(Skin s_) { 
     
    124125      JLabel visible_l = new JLabel("Visibility:"); 
    125126      visible_tf = new JTextField(); 
     127      visible_btn = new JButton("",s.m.help_icon); 
     128      visible_btn.addActionListener(this); 
    126129      JLabel help_l = new JLabel("Help Text:"); 
    127130      help_tf = new JTextField(); 
     
    136139      JLabel action_l = new JLabel("Action:"); 
    137140      action_tf = new JTextField(); 
     141      action_btn = new JButton("",s.m.help_icon); 
     142      action_btn.addActionListener(this); 
    138143      JLabel tooltiptext_l = new JLabel("Tooltiptext:"); 
    139144      tooltiptext_tf = new JTextField(); 
     
    175180      general.add(visible_l); 
    176181      general.add(visible_tf); 
     182      general.add(visible_btn); 
    177183      visible_l.setBounds(5,225,75,24); 
    178       visible_tf.setBounds(85,225,150,24); 
     184      visible_tf.setBounds(85,225,120,24); 
     185      visible_btn.setBounds(210,225,24,24); 
    179186      general.add(help_l); 
    180187      general.add(help_tf); 
     
    202209      button.add(action_l); 
    203210      button.add(action_tf); 
     211      button.add(action_btn); 
    204212      action_l.setBounds(5,105,75,24); 
    205       action_tf.setBounds(85,105,150,24); 
     213      action_tf.setBounds(85,105,120,24); 
     214      action_btn.setBounds(210,105,24,24); 
    206215      button.add(tooltiptext_l); 
    207216      button.add(tooltiptext_tf); 
     
    276285            try { 
    277286              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#Button")); 
     287            } 
     288            catch (Exception ex) { 
     289              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     290            } 
     291      } 
     292      else { 
     293        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     294      } 
     295    } 
     296    else if(e.getSource().equals(visible_btn)) { 
     297      Desktop desktop; 
     298      if (Desktop.isDesktopSupported()) { 
     299            desktop = Desktop.getDesktop(); 
     300            try { 
     301              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     302            } 
     303            catch (Exception ex) { 
     304              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     305            } 
     306      } 
     307      else { 
     308        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     309      } 
     310    } 
     311    else if(e.getSource().equals(action_btn)) { 
     312      Desktop desktop; 
     313      if (Desktop.isDesktopSupported()) { 
     314            desktop = Desktop.getDesktop(); 
     315            try { 
     316              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#actions")); 
    278317            } 
    279318            catch (Exception ex) { 
  • trunk/src/vlcskineditor/Items/Checkbox.java

    r37 r38  
    5959  JTextField up2_tf, down2_tf, over2_tf, action2_tf, tooltiptext2_tf, state_tf; 
    6060  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb; 
    61   JButton ok_btn, help_btn; 
     61  JButton visible_btn, action1_btn, action2_btn, state_btn, ok_btn, help_btn; 
    6262   
    6363  /** Creates a new instance of Checkbox */ 
     
    8585    if(xmlcode.indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 
    8686    if(xmlcode.indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
     87    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    8788  } 
    8889  public Checkbox(Skin s_) { 
     
    150151      JLabel visible_l = new JLabel("Visibility:"); 
    151152      visible_tf = new JTextField(); 
     153      visible_btn = new JButton("",s.m.help_icon); 
     154      visible_btn.addActionListener(this);   
    152155      JLabel help_l = new JLabel("Help Text:"); 
    153156      help_tf = new JTextField(); 
     
    162165      JLabel action1_l = new JLabel("Action:"); 
    163166      action1_tf = new JTextField(); 
     167      action1_btn = new JButton("",s.m.help_icon); 
     168      action1_btn.addActionListener(this); 
    164169      JLabel tooltiptext1_l = new JLabel("Tooltiptext:"); 
    165170      tooltiptext1_tf = new JTextField(); 
     
    172177      JLabel action2_l = new JLabel("Action:"); 
    173178      action2_tf = new JTextField(); 
     179      action2_btn = new JButton("",s.m.help_icon); 
     180      action2_btn.addActionListener(this); 
    174181      JLabel tooltiptext2_l = new JLabel("Tooltiptext:"); 
    175182      tooltiptext2_tf = new JTextField(); 
     
    178185      state_tf = new JTextField(); 
    179186      state_tf.setToolTipText("Boolean expression specifying the state of the checkbox: if the expression resolves to 'false', the first state will be used, and if it resolves to 'true' the second state will be used. Example for a checkbox showing/hiding a window whose id is \"playlist_window\": state=\"playlist_window.isVisible\" (or state=\"not playlist_window.isVisible\", depending on the states you chose)."); 
     187      state_btn = new JButton("",s.m.help_icon); 
     188      state_btn.addActionListener(this); 
    180189       
    181190      ok_btn = new JButton("OK"); 
     
    215224      general.add(visible_l); 
    216225      general.add(visible_tf); 
     226      general.add(visible_btn); 
    217227      visible_l.setBounds(5,135,75,24); 
    218       visible_tf.setBounds(85,135,150,24); 
     228      visible_tf.setBounds(85,135,120,24); 
     229      visible_btn.setBounds(210,225,24,24); 
    219230      general.add(help_l); 
    220231      general.add(help_tf); 
     
    230241      state.add(state_l); 
    231242      state.add(state_tf); 
     243      state.add(state_btn); 
    232244      state_l.setBounds(5,15,75,24); 
    233       state_tf.setBounds(85,15,150,24); 
     245      state_tf.setBounds(85,15,120,24); 
     246      state_btn.setBounds(210,15,24,24); 
    234247      state.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.DARK_GRAY), "Checkbox state")); 
    235248      state.setMinimumSize(new Dimension(495,45)); 
     
    253266      state1.add(action1_l); 
    254267      state1.add(action1_tf); 
     268      state1.add(action1_btn); 
    255269      action1_l.setBounds(5,105,75,24); 
    256       action1_tf.setBounds(85,105,150,24); 
     270      action1_tf.setBounds(85,105,120,24); 
     271      action1_btn.setBounds(210,105,24,24); 
    257272      state1.add(tooltiptext1_l); 
    258273      state1.add(tooltiptext1_tf); 
     
    280295      state2.add(action2_l); 
    281296      state2.add(action2_tf); 
     297      state2.add(action2_btn); 
    282298      action2_l.setBounds(5,105,75,24); 
    283       action2_tf.setBounds(85,105,150,24); 
     299      action2_tf.setBounds(85,105,120,24); 
     300      action2_btn.setBounds(210,105,24,24); 
    284301      state2.add(tooltiptext2_l); 
    285302      state2.add(tooltiptext2_tf); 
     
    385402      } 
    386403    } 
     404    else if(e.getSource().equals(state_btn)) { 
     405      Desktop desktop; 
     406      if (Desktop.isDesktopSupported()) { 
     407            desktop = Desktop.getDesktop(); 
     408            try { 
     409              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     410            } 
     411            catch (Exception ex) { 
     412              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     413            } 
     414      } 
     415      else { 
     416        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     417      } 
     418    } 
     419    else if(e.getSource().equals(action1_btn)) { 
     420      Desktop desktop; 
     421      if (Desktop.isDesktopSupported()) { 
     422            desktop = Desktop.getDesktop(); 
     423            try { 
     424              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#actions")); 
     425            } 
     426            catch (Exception ex) { 
     427              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     428            } 
     429      } 
     430      else { 
     431        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     432      } 
     433    } 
     434    else if(e.getSource().equals(action2_btn)) { 
     435      Desktop desktop; 
     436      if (Desktop.isDesktopSupported()) { 
     437            desktop = Desktop.getDesktop(); 
     438            try { 
     439              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#actions")); 
     440            } 
     441            catch (Exception ex) { 
     442              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     443            } 
     444      } 
     445      else { 
     446        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     447      } 
     448    } 
     449    else if(e.getSource().equals(visible_btn)) { 
     450      Desktop desktop; 
     451      if (Desktop.isDesktopSupported()) { 
     452            desktop = Desktop.getDesktop(); 
     453            try { 
     454              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     455            } 
     456            catch (Exception ex) { 
     457              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     458            } 
     459      } 
     460      else { 
     461        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     462      } 
     463    } 
    387464  } 
    388465  public String returnCode() { 
  • trunk/src/vlcskineditor/Items/Image.java

    r37 r38  
    4646  JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, image_tf, action2_tf; 
    4747  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, resize_cb, action_cb; 
    48   JButton ok_btn, help_btn; 
     48  JButton visible_btn, action2_btn, ok_btn, help_btn; 
    4949   
    5050  /** Creates a new instance of Image */ 
     
    6565    if(xmlcode.indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 
    6666    if(xmlcode.indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
     67    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    6768  } 
    6869  public Image(Skin s_) { 
     
    121122      JLabel visible_l = new JLabel("Visibility:"); 
    122123      visible_tf = new JTextField(); 
     124      visible_btn = new JButton("",s.m.help_icon); 
     125      visible_btn.addActionListener(this); 
    123126      JLabel help_l = new JLabel("Help Text:"); 
    124127      help_tf = new JTextField(); 
     
    139142      action2_tf = new JTextField(); 
    140143      action2_tf.setToolTipText("Action triggered by a double-click on the control."); 
     144      action2_btn = new JButton("",s.m.help_icon); 
     145      action2_btn.addActionListener(this); 
    141146       
    142147      ok_btn = new JButton("OK"); 
     
    176181      general.add(visible_l); 
    177182      general.add(visible_tf); 
     183      general.add(visible_btn); 
    178184      visible_l.setBounds(5,225,75,24); 
    179       visible_tf.setBounds(85,225,150,24); 
     185      visible_tf.setBounds(85,225,120,24); 
     186      visible_btn.setBounds(210,225,24,24); 
    180187      general.add(help_l); 
    181188      general.add(help_tf); 
     
    198205      resize_cb.setBounds(85,45,150,24); 
    199206      image.add(action_l); 
    200       image.add(action_cb); 
     207      image.add(action_cb);       
    201208      action_l.setBounds(5,75,75,24); 
    202209      action_cb.setBounds(85,75,150,24); 
    203210      image.add(action2_l); 
    204211      image.add(action2_tf); 
     212      image.add(action2_btn); 
    205213      action2_l.setBounds(5,105,75,24); 
    206       action2_tf.setBounds(85,105,150,24); 
     214      action2_tf.setBounds(85,105,120,24); 
     215      action2_btn.setBounds(210,105,24,24); 
    207216      image.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.DARK_GRAY), "Image Attributes")); 
    208217      image.setMinimumSize(new Dimension(240,135)); 
     
    271280      else { 
    272281        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     282      } 
     283    } 
     284    else if(e.getSource().equals(action2_btn)) { 
     285      Desktop desktop; 
     286      if (Desktop.isDesktopSupported()) { 
     287            desktop = Desktop.getDesktop(); 
     288            try { 
     289              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#actions")); 
     290            } 
     291            catch (Exception ex) { 
     292              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     293            } 
     294      } 
     295      else { 
     296        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     297      } 
     298    } 
     299    else if(e.getSource().equals(visible_btn)) { 
     300      Desktop desktop; 
     301      if (Desktop.isDesktopSupported()) { 
     302            desktop = Desktop.getDesktop(); 
     303            try { 
     304              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     305            } 
     306            catch (Exception ex) { 
     307              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     308            } 
    273309      } 
    274310    } 
  • trunk/src/vlcskineditor/Items/Playtree.java

    r37 r38  
    7373  JTextField fgcolor_tf, playcolor_tf, selcolor_tf, bgcolor1_tf, bgcolor2_tf; 
    7474  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, flat_cb; 
    75   JButton bgcolor1_btn, bgcolor2_btn, fgcolor_btn, playcolor_btn, selcolor_btn, slider_btn, ok_btn, help_btn; 
     75  JButton visible_btn, bgcolor1_btn, bgcolor2_btn, fgcolor_btn, playcolor_btn, selcolor_btn, slider_btn, ok_btn, help_btn; 
    7676   
    7777  /** Creates a new instance of Playtree */ 
     
    103103    if(xmllines[0].indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmllines[0],"xkeepratio"); 
    104104    if(xmllines[0].indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmllines[0],"ykeepratio"); 
     105    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    105106     
    106107    int i=1; 
     
    190191      JLabel visible_l = new JLabel("Visibility:"); 
    191192      visible_tf = new JTextField(); 
     193      visible_btn = new JButton("",s.m.help_icon); 
     194      visible_btn.addActionListener(this);       
    192195      JLabel help_l = new JLabel("Help Text:"); 
    193196      help_tf = new JTextField(); 
     
    275278      general.add(visible_l); 
    276279      general.add(visible_tf); 
     280      general.add(visible_btn); 
    277281      visible_l.setBounds(5,225,75,24); 
    278       visible_tf.setBounds(85,225,150,24); 
     282      visible_tf.setBounds(85,225,120,24); 
     283      visible_btn.setBounds(210,225,24,24); 
    279284      general.add(help_l); 
    280285      general.add(help_tf); 
     
    514519      else JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE); 
    515520    } 
     521    else if(e.getSource().equals(visible_btn)) { 
     522      Desktop desktop; 
     523      if (Desktop.isDesktopSupported()) { 
     524            desktop = Desktop.getDesktop(); 
     525            try { 
     526              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     527            } 
     528            catch (Exception ex) { 
     529              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     530            } 
     531      } 
     532      else { 
     533        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     534      } 
     535    } 
    516536  } 
    517537  public String returnCode() { 
  • trunk/src/vlcskineditor/Items/Slider.java

    r37 r38  
    6161  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, resize_cb, action_cb, value_cb; 
    6262  JCheckBox sbg_chb; 
    63   JButton ok_btn, help_btn, sbg_btn; 
     63  JButton visible_btn, ok_btn, help_btn, sbg_btn; 
    6464   
    6565  /** Creates a new instance of Slider */ 
     
    6969    String[] code = xmlcode.split("\n"); 
    7070    up = XML.getValue(code[0],"up"); 
    71     if(code[0].indexOf("down=\"")!=-1) down = XML.getValue(code[0],"down"); 
    72     if(code[0].indexOf("over=\"")!=-1) over = XML.getValue(code[0],"over"); 
     71    if(code[0].indexOf(" down=\"")!=-1) down = XML.getValue(code[0],"down"); 
     72    if(code[0].indexOf(" over=\"")!=-1) over = XML.getValue(code[0],"over"); 
    7373    points = XML.getValue(code[0],"points"); 
    74     if(code[0].indexOf("thickness=\"")!=-1) thickness = XML.getIntValue(code[0],"thickness"); 
    75     if(code[0].indexOf("value=\"")!=-1) value = XML.getValue(code[0],"value"); 
    76     if(code[0].indexOf("tooltiptext=\"")!=-1) tooltiptext = XML.getValue(code[0],"tooltiptext"); 
    77     if(code[0].indexOf("x=\"")!=-1) x = XML.getIntValue(code[0],"x"); 
    78     if(code[0].indexOf("y=\"")!=-1) y = XML.getIntValue(code[0],"y"); 
    79     if(code[0].indexOf("id=\"")!=-1) id = XML.getValue(code[0],"id"); 
     74    if(code[0].indexOf(" thickness=\"")!=-1) thickness = XML.getIntValue(code[0],"thickness"); 
     75    if(code[0].indexOf(" value=\"")!=-1) value = XML.getValue(code[0],"value"); 
     76    if(code[0].indexOf(" tooltiptext=\"")!=-1) tooltiptext = XML.getValue(code[0],"tooltiptext"); 
     77    if(code[0].indexOf(" x=\"")!=-1) x = XML.getIntValue(code[0],"x"); 
     78    if(code[0].indexOf(" y=\"")!=-1) y = XML.getIntValue(code[0],"y"); 
     79    if(code[0].indexOf(" id=\"")!=-1) id = XML.getValue(code[0],"id"); 
    8080    else id = "Unnamed slider #"+s.getNewId(); 
    81     if(code[0].indexOf("lefttop=\"")!=-1) lefttop = XML.getValue(code[0],"lefttop"); 
    82     if(code[0].indexOf("rightbottom=\"")!=-1) rightbottom = XML.getValue(code[0],"rightbottom"); 
    83     if(code[0].indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(code[0],"xkeepratio"); 
    84     if(code[0].indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(code[0],"ykeepratio"); 
     81    if(code[0].indexOf(" lefttop=\"")!=-1) lefttop = XML.getValue(code[0],"lefttop"); 
     82    if(code[0].indexOf(" rightbottom=\"")!=-1) rightbottom = XML.getValue(code[0],"rightbottom"); 
     83    if(code[0].indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(code[0],"xkeepratio"); 
     84    if(code[0].indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(code[0],"ykeepratio"); 
     85    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    8586    if(code.length>1) { 
    8687      for(int i=0;i<code.length;i++) { 
     
    188189      JLabel visible_l = new JLabel("Visibility:"); 
    189190      visible_tf = new JTextField(); 
     191      visible_btn = new JButton("",s.m.help_icon); 
     192      visible_btn.addActionListener(this); 
    190193      JLabel help_l = new JLabel("Help Text:"); 
    191194      help_tf = new JTextField(); 
     
    258261      general.add(visible_l); 
    259262      general.add(visible_tf); 
     263      general.add(visible_btn); 
    260264      visible_l.setBounds(5,225,75,24); 
    261       visible_tf.setBounds(85,225,150,24); 
     265      visible_tf.setBounds(85,225,120,24); 
     266      visible_btn.setBounds(210,225,24,24); 
    262267      general.add(help_l); 
    263268      general.add(help_tf); 
     
    408413      if(sbg!=null) sbg.showOptions(); 
    409414    } 
     415    else if(e.getSource().equals(visible_btn)) { 
     416      Desktop desktop; 
     417      if (Desktop.isDesktopSupported()) { 
     418            desktop = Desktop.getDesktop(); 
     419            try { 
     420              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     421            } 
     422            catch (Exception ex) { 
     423              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     424            } 
     425      } 
     426      else { 
     427        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     428      } 
     429    } 
    410430  } 
    411431  public String returnCode() { 
  • trunk/src/vlcskineditor/Items/Text.java

    r37 r38  
    5252  JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, text_tf, font_tf, color_tf, width_tf; 
    5353  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, alignment_cb, scrolling_cb; 
    54   JButton color_btn, ok_btn, help_btn; 
     54  JButton visible_btn, color_btn, ok_btn, help_btn; 
    5555   
    5656  /** Creates a new instance of Text */ 
     
    7171    if(xmlcode.indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 
    7272    if(xmlcode.indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
     73    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    7374  } 
    7475  public Text(Skin s_) { 
     
    9798     
    9899    s.updateItems(); 
     100    s.expandItem(id); 
    99101  } 
    100102  public void showOptions() { 
     
    128130      JLabel visible_l = new JLabel("Visibility:"); 
    129131      visible_tf = new JTextField(); 
     132      visible_btn = new JButton("",s.m.help_icon); 
     133      visible_btn.addActionListener(this);       
    130134      JLabel help_l = new JLabel("Help Text:"); 
    131135      help_tf = new JTextField(); 
     
    186190      general.add(visible_l); 
    187191      general.add(visible_tf); 
     192      general.add(visible_btn); 
    188193      visible_l.setBounds(5,225,75,24); 
    189       visible_tf.setBounds(85,225,150,24); 
     194      visible_tf.setBounds(85,225,120,24); 
     195      visible_btn.setBounds(210,225,24,24); 
    190196      general.add(help_l); 
    191197      general.add(help_tf); 
     
    307313      } 
    308314    }     
     315    else if(e.getSource().equals(visible_btn)) { 
     316      Desktop desktop; 
     317      if (Desktop.isDesktopSupported()) { 
     318            desktop = Desktop.getDesktop(); 
     319            try { 
     320              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     321            } 
     322            catch (Exception ex) { 
     323              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     324            } 
     325      } 
     326      else { 
     327        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     328      } 
     329    } 
    309330  } 
    310331  public String returnCode() { 
     
    317338    if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 
    318339    if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 
     340    if (width!=WIDTH_DEFAULT) code+=" width=\""+String.valueOf(width)+"\""; 
    319341    if (lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\""; 
    320342    if (rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\""; 
  • trunk/src/vlcskineditor/Items/Video.java

    r37 r38  
    4646  JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, width_tf, height_tf; 
    4747  JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, autoresize_cb; 
    48   JButton ok_btn, help_btn; 
     48  JButton visible_btn, ok_btn, help_btn; 
    4949   
    5050  /** Creates a new instance of Video */ 
    5151  public Video(String xmlcode, Skin s_) { 
    5252    s = s_; 
    53     if(xmlcode.indexOf("width=\"")!=-1) width = XML.getIntValue(xmlcode,"width"); 
    54     if(xmlcode.indexOf("height=\"")!=-1) height = XML.getIntValue(xmlcode,"height"); 
    55     if(xmlcode.indexOf("autoresize=\"")!=-1) autoresize = XML.getBoolValue(xmlcode,"autoresize"); 
    56     if(xmlcode.indexOf("x=\"")!=-1) x = XML.getIntValue(xmlcode,"x"); 
    57     if(xmlcode.indexOf("y=\"")!=-1) y = XML.getIntValue(xmlcode,"y"); 
    58     if(xmlcode.indexOf("id=\"")!=-1) id = XML.getValue(xmlcode,"id"); 
     53    if(xmlcode.indexOf(" width=\"")!=-1) width = XML.getIntValue(xmlcode,"width"); 
     54    if(xmlcode.indexOf(" height=\"")!=-1) height = XML.getIntValue(xmlcode,"height"); 
     55    if(xmlcode.indexOf(" autoresize=\"")!=-1) autoresize = XML.getBoolValue(xmlcode,"autoresize"); 
     56    if(xmlcode.indexOf(" x=\"")!=-1) x = XML.getIntValue(xmlcode,"x"); 
     57    if(xmlcode.indexOf(" y=\"")!=-1) y = XML.getIntValue(xmlcode,"y"); 
     58    if(xmlcode.indexOf(" id=\"")!=-1) id = XML.getValue(xmlcode,"id"); 
    5959    else id = "Unnamed video #"+s.getNewId(); 
    60     if(xmlcode.indexOf("lefttop=\"")!=-1) lefttop = XML.getValue(xmlcode,"lefttop"); 
    61     if(xmlcode.indexOf("rightbottom=\"")!=-1) rightbottom = XML.getValue(xmlcode,"rightbottom"); 
    62     if(xmlcode.indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 
    63     if(xmlcode.indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
     60    if(xmlcode.indexOf(" lefttop=\"")!=-1) lefttop = XML.getValue(xmlcode,"lefttop"); 
     61    if(xmlcode.indexOf(" rightbottom=\"")!=-1) rightbottom = XML.getValue(xmlcode,"rightbottom"); 
     62    if(xmlcode.indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 
     63    if(xmlcode.indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 
     64    if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 
    6465  } 
    6566  public Video(Skin s_) { 
     
    115116      JLabel visible_l = new JLabel("Visibility:"); 
    116117      visible_tf = new JTextField(); 
     118      visible_btn = new JButton("",s.m.help_icon); 
     119      visible_btn.addActionListener(this); 
    117120      JLabel help_l = new JLabel("Help Text:"); 
    118121      help_tf = new JTextField(); 
     
    165168      general.add(visible_l); 
    166169      general.add(visible_tf); 
     170      general.add(visible_btn); 
    167171      visible_l.setBounds(5,225,75,24); 
    168       visible_tf.setBounds(85,225,150,24); 
     172      visible_tf.setBounds(85,225,120,24); 
     173      visible_btn.setBounds(210,225,24,24); 
    169174      general.add(help_l); 
    170175      general.add(help_tf); 
     
    252257      } 
    253258    } 
     259    else if(e.getSource().equals(visible_btn)) { 
     260      Desktop desktop; 
     261      if (Desktop.isDesktopSupported()) { 
     262            desktop = Desktop.getDesktop(); 
     263            try { 
     264              desktop.browse(new java.net.URI("http://www.videolan.org/vlc/skins2-create.html#boolexpr")); 
     265            } 
     266            catch (Exception ex) { 
     267              JOptionPane.showMessageDialog(null,ex.toString(),ex.getMessage(),JOptionPane.ERROR_MESSAGE);     
     268            } 
     269      } 
     270      else { 
     271        JOptionPane.showMessageDialog(null,"Could not launch Browser","Go to the following URL manually:\nhttp://www.videolan.org/vlc/skins2-create.html",JOptionPane.WARNING_MESSAGE);     
     272      } 
     273    } 
    254274  } 
    255275  public String returnCode() { 
  • trunk/src/vlcskineditor/Main.java

    r37 r38  
    4646 */ 
    4747public class Main extends javax.swing.JFrame implements ActionListener, TreeSelectionListener, WindowListener{ 
    48   final String VERSION = "0.4.0a"; 
     48  final String VERSION = "0.4.5a"; 
    4949  String vlc_dir = ""; 
    5050  String vlc_skins_dir = ""; 
     
    8282  ImageIcon up_icon = createIcon("icons/move_up.png"); 
    8383  ImageIcon down_icon = createIcon("icons/move_down.png"); 
    84   ImageIcon icon = createIcon("icons/icon.png"); 
     84  public ImageIcon help_icon = createIcon("icons/help.png"); 
     85  ImageIcon icon = createIcon("icons/icon.png");   
    8586  DefaultTreeCellRenderer tree_renderer = new TreeRenderer();   
    8687  String selected_resource, selected_in_windows, selected_window, selected_layout, selected_item;