Changeset 38
- Timestamp:
- 12/09/07 18:34:54 (1 year ago)
- Files:
-
- trunk/src/vlcskineditor/Items/Button.java (modified) (7 diffs)
- trunk/src/vlcskineditor/Items/Checkbox.java (modified) (11 diffs)
- trunk/src/vlcskineditor/Items/Image.java (modified) (7 diffs)
- trunk/src/vlcskineditor/Items/Playtree.java (modified) (5 diffs)
- trunk/src/vlcskineditor/Items/Slider.java (modified) (5 diffs)
- trunk/src/vlcskineditor/Items/Text.java (modified) (7 diffs)
- trunk/src/vlcskineditor/Items/Video.java (modified) (4 diffs)
- trunk/src/vlcskineditor/Main.java (modified) (2 diffs)
- trunk/src/vlcskineditor/icons/help.png (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vlcskineditor/Items/Button.java
r37 r38 48 48 JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, up_tf, down_tf, over_tf, action_tf, tooltiptext_tf; 49 49 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; 51 51 52 52 … … 67 67 if(xmlcode.indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 68 68 if(xmlcode.indexOf("tooltiptext=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"tooltiptext"); 69 if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 69 70 } 70 71 public Button(Skin s_) { … … 124 125 JLabel visible_l = new JLabel("Visibility:"); 125 126 visible_tf = new JTextField(); 127 visible_btn = new JButton("",s.m.help_icon); 128 visible_btn.addActionListener(this); 126 129 JLabel help_l = new JLabel("Help Text:"); 127 130 help_tf = new JTextField(); … … 136 139 JLabel action_l = new JLabel("Action:"); 137 140 action_tf = new JTextField(); 141 action_btn = new JButton("",s.m.help_icon); 142 action_btn.addActionListener(this); 138 143 JLabel tooltiptext_l = new JLabel("Tooltiptext:"); 139 144 tooltiptext_tf = new JTextField(); … … 175 180 general.add(visible_l); 176 181 general.add(visible_tf); 182 general.add(visible_btn); 177 183 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); 179 186 general.add(help_l); 180 187 general.add(help_tf); … … 202 209 button.add(action_l); 203 210 button.add(action_tf); 211 button.add(action_btn); 204 212 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); 206 215 button.add(tooltiptext_l); 207 216 button.add(tooltiptext_tf); … … 276 285 try { 277 286 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")); 278 317 } 279 318 catch (Exception ex) { trunk/src/vlcskineditor/Items/Checkbox.java
r37 r38 59 59 JTextField up2_tf, down2_tf, over2_tf, action2_tf, tooltiptext2_tf, state_tf; 60 60 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; 62 62 63 63 /** Creates a new instance of Checkbox */ … … 85 85 if(xmlcode.indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 86 86 if(xmlcode.indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 87 if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 87 88 } 88 89 public Checkbox(Skin s_) { … … 150 151 JLabel visible_l = new JLabel("Visibility:"); 151 152 visible_tf = new JTextField(); 153 visible_btn = new JButton("",s.m.help_icon); 154 visible_btn.addActionListener(this); 152 155 JLabel help_l = new JLabel("Help Text:"); 153 156 help_tf = new JTextField(); … … 162 165 JLabel action1_l = new JLabel("Action:"); 163 166 action1_tf = new JTextField(); 167 action1_btn = new JButton("",s.m.help_icon); 168 action1_btn.addActionListener(this); 164 169 JLabel tooltiptext1_l = new JLabel("Tooltiptext:"); 165 170 tooltiptext1_tf = new JTextField(); … … 172 177 JLabel action2_l = new JLabel("Action:"); 173 178 action2_tf = new JTextField(); 179 action2_btn = new JButton("",s.m.help_icon); 180 action2_btn.addActionListener(this); 174 181 JLabel tooltiptext2_l = new JLabel("Tooltiptext:"); 175 182 tooltiptext2_tf = new JTextField(); … … 178 185 state_tf = new JTextField(); 179 186 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); 180 189 181 190 ok_btn = new JButton("OK"); … … 215 224 general.add(visible_l); 216 225 general.add(visible_tf); 226 general.add(visible_btn); 217 227 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); 219 230 general.add(help_l); 220 231 general.add(help_tf); … … 230 241 state.add(state_l); 231 242 state.add(state_tf); 243 state.add(state_btn); 232 244 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); 234 247 state.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.DARK_GRAY), "Checkbox state")); 235 248 state.setMinimumSize(new Dimension(495,45)); … … 253 266 state1.add(action1_l); 254 267 state1.add(action1_tf); 268 state1.add(action1_btn); 255 269 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); 257 272 state1.add(tooltiptext1_l); 258 273 state1.add(tooltiptext1_tf); … … 280 295 state2.add(action2_l); 281 296 state2.add(action2_tf); 297 state2.add(action2_btn); 282 298 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); 284 301 state2.add(tooltiptext2_l); 285 302 state2.add(tooltiptext2_tf); … … 385 402 } 386 403 } 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 } 387 464 } 388 465 public String returnCode() { trunk/src/vlcskineditor/Items/Image.java
r37 r38 46 46 JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, image_tf, action2_tf; 47 47 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; 49 49 50 50 /** Creates a new instance of Image */ … … 65 65 if(xmlcode.indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 66 66 if(xmlcode.indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 67 if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 67 68 } 68 69 public Image(Skin s_) { … … 121 122 JLabel visible_l = new JLabel("Visibility:"); 122 123 visible_tf = new JTextField(); 124 visible_btn = new JButton("",s.m.help_icon); 125 visible_btn.addActionListener(this); 123 126 JLabel help_l = new JLabel("Help Text:"); 124 127 help_tf = new JTextField(); … … 139 142 action2_tf = new JTextField(); 140 143 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); 141 146 142 147 ok_btn = new JButton("OK"); … … 176 181 general.add(visible_l); 177 182 general.add(visible_tf); 183 general.add(visible_btn); 178 184 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); 180 187 general.add(help_l); 181 188 general.add(help_tf); … … 198 205 resize_cb.setBounds(85,45,150,24); 199 206 image.add(action_l); 200 image.add(action_cb); 207 image.add(action_cb); 201 208 action_l.setBounds(5,75,75,24); 202 209 action_cb.setBounds(85,75,150,24); 203 210 image.add(action2_l); 204 211 image.add(action2_tf); 212 image.add(action2_btn); 205 213 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); 207 216 image.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.DARK_GRAY), "Image Attributes")); 208 217 image.setMinimumSize(new Dimension(240,135)); … … 271 280 else { 272 281 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 } 273 309 } 274 310 } trunk/src/vlcskineditor/Items/Playtree.java
r37 r38 73 73 JTextField fgcolor_tf, playcolor_tf, selcolor_tf, bgcolor1_tf, bgcolor2_tf; 74 74 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; 76 76 77 77 /** Creates a new instance of Playtree */ … … 103 103 if(xmllines[0].indexOf("xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmllines[0],"xkeepratio"); 104 104 if(xmllines[0].indexOf("ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmllines[0],"ykeepratio"); 105 if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 105 106 106 107 int i=1; … … 190 191 JLabel visible_l = new JLabel("Visibility:"); 191 192 visible_tf = new JTextField(); 193 visible_btn = new JButton("",s.m.help_icon); 194 visible_btn.addActionListener(this); 192 195 JLabel help_l = new JLabel("Help Text:"); 193 196 help_tf = new JTextField(); … … 275 278 general.add(visible_l); 276 279 general.add(visible_tf); 280 general.add(visible_btn); 277 281 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); 279 284 general.add(help_l); 280 285 general.add(help_tf); … … 514 519 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); 515 520 } 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 } 516 536 } 517 537 public String returnCode() { trunk/src/vlcskineditor/Items/Slider.java
r37 r38 61 61 JComboBox lefttop_cb, rightbottom_cb, xkeepratio_cb, ykeepratio_cb, resize_cb, action_cb, value_cb; 62 62 JCheckBox sbg_chb; 63 JButton ok_btn, help_btn, sbg_btn;63 JButton visible_btn, ok_btn, help_btn, sbg_btn; 64 64 65 65 /** Creates a new instance of Slider */ … … 69 69 String[] code = xmlcode.split("\n"); 70 70 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"); 73 73 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"); 80 80 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"); 85 86 if(code.length>1) { 86 87 for(int i=0;i<code.length;i++) { … … 188 189 JLabel visible_l = new JLabel("Visibility:"); 189 190 visible_tf = new JTextField(); 191 visible_btn = new JButton("",s.m.help_icon); 192 visible_btn.addActionListener(this); 190 193 JLabel help_l = new JLabel("Help Text:"); 191 194 help_tf = new JTextField(); … … 258 261 general.add(visible_l); 259 262 general.add(visible_tf); 263 general.add(visible_btn); 260 264 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); 262 267 general.add(help_l); 263 268 general.add(help_tf); … … 408 413 if(sbg!=null) sbg.showOptions(); 409 414 } 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 } 410 430 } 411 431 public String returnCode() { trunk/src/vlcskineditor/Items/Text.java
r37 r38 52 52 JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, text_tf, font_tf, color_tf, width_tf; 53 53 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; 55 55 56 56 /** Creates a new instance of Text */ … … 71 71 if(xmlcode.indexOf(" xkeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"xkeepratio"); 72 72 if(xmlcode.indexOf(" ykeepratio=\"")!=-1) xkeepratio = XML.getBoolValue(xmlcode,"ykeepratio"); 73 if(xmlcode.indexOf(" visible=\"")!=-1) visible = XML.getValue(xmlcode,"visible"); 73 74 } 74 75 public Text(Skin s_) { … … 97 98 98 99 s.updateItems(); 100 s.expandItem(id); 99 101 } 100 102 public void showOptions() { … … 128 130 JLabel visible_l = new JLabel("Visibility:"); 129 131 visible_tf = new JTextField(); 132 visible_btn = new JButton("",s.m.help_icon); 133 visible_btn.addActionListener(this); 130 134 JLabel help_l = new JLabel("Help Text:"); 131 135 help_tf = new JTextField(); … … 186 190 general.add(visible_l); 187 191 general.add(visible_tf); 192 general.add(visible_btn); 188 193 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); 190 196 general.add(help_l); 191 197 general.add(help_tf); … … 307 313 } 308 314 } 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 } 309 330 } 310 331 public String returnCode() { … … 317 338 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 318 339 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 340 if (width!=WIDTH_DEFAULT) code+=" width=\""+String.valueOf(width)+"\""; 319 341 if (lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\""; 320 342 if (rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\""; trunk/src/vlcskineditor/Items/Video.java
r37 r38 46 46 JTextField id_tf, x_tf, y_tf, help_tf, visible_tf, width_tf, height_tf; 47 47 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; 49 49 50 50 /** Creates a new instance of Video */ 51 51 public Video(String xmlcode, Skin s_) { 52 52 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"); 59 59 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"); 64 65 } 65 66 public Video(Skin s_) { … … 115 116 JLabel visible_l = new JLabel("Visibility:"); 116 117 visible_tf = new JTextField(); 118 visible_btn = new JButton("",s.m.help_icon); 119 visible_btn.addActionListener(this); 117 120 JLabel help_l = new JLabel("Help Text:"); 118 121 help_tf = new JTextField(); … … 165 168 general.add(visible_l); 166 169 general.add(visible_tf); 170 general.add(visible_btn); 167 171 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); 169 174 general.add(help_l); 170 175 general.add(help_tf); … … 252 257 } 253 258 } 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 } 254 274 } 255 275 public String returnCode() { trunk/src/vlcskineditor/Main.java
r37 r38 46 46 */ 47 47 public class Main extends javax.swing.JFrame implements ActionListener, TreeSelectionListener, WindowListener{ 48 final String VERSION = "0.4. 0a";48 final String VERSION = "0.4.5a"; 49 49 String vlc_dir = ""; 50 50 String vlc_skins_dir = ""; … … 82 82 ImageIcon up_icon = createIcon("icons/move_up.png"); 83 83 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"); 85 86 DefaultTreeCellRenderer tree_renderer = new TreeRenderer(); 86 87 String selected_resource, selected_in_windows, selected_window, selected_layout, selected_item;
