Changeset 92
- Timestamp:
- 31/12/07 15:43:11 (11 months ago)
- Files:
-
- trunk/src/vlcskineditor/Main.java (modified) (1 diff)
- trunk/src/vlcskineditor/Skin.java (modified) (9 diffs)
- trunk/src/vlcskineditor/items/Anchor.java (modified) (6 diffs)
- trunk/src/vlcskineditor/items/Button.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Checkbox.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Group.java (modified) (2 diffs)
- trunk/src/vlcskineditor/items/Image.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Panel.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Playtree.java (modified) (2 diffs)
- trunk/src/vlcskineditor/items/Slider.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/SliderBackground.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Text.java (modified) (3 diffs)
- trunk/src/vlcskineditor/items/Video.java (modified) (3 diffs)
- trunk/src/vlcskineditor/resources/Bitmap.java (modified) (3 diffs)
- trunk/src/vlcskineditor/resources/Font.java (modified) (2 diffs)
- trunk/src/vlcskineditor/resources/SubBitmap.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vlcskineditor/Main.java
r91 r92 114 114 public History hist; 115 115 116 /**116 /** 117 117 * Launches the skin editor and initializes the GUI. 118 118 * @param args Command line arguments passed by the console. trunk/src/vlcskineditor/Skin.java
r91 r92 34 34 import javax.swing.tree.*; 35 35 import java.util.*; 36 import javax.swing.border.EtchedBorder; 36 37 37 38 /** … … 76 77 public GlobalVariables gvars = new GlobalVariables(); 77 78 79 //Central window handle for all editing dialogs of res/win/layout/items 80 public JFrame edit_frame; 81 78 82 public Skin(Main m_) { 79 m=m_; 83 m=m_; 80 84 } 81 85 /** Creates the file in which to save the new skin **/ 82 86 public void createNew(File f) { 83 87 skinfile=f; 84 skinfolder = f.getParentFile().getAbsolutePath()+ f.separator;88 skinfolder = f.getParentFile().getAbsolutePath()+File.separator; 85 89 try { 86 90 skinfile.createNewFile(); … … 95 99 windows.clear(); 96 100 skinfile=f; 97 skinfolder = f.getParentFile().getAbsolutePath()+ f.separator;101 skinfolder = f.getParentFile().getAbsolutePath()+File.separator; 98 102 try { 99 103 //System.out.println("Creating Buffered Reader..."); … … 233 237 theme_frame.setResizable(false); 234 238 theme_frame.setLayout(new FlowLayout()); 235 theme_frame.setDefaultCloseOperation( theme_frame.HIDE_ON_CLOSE);239 theme_frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); 236 240 237 241 JLabel themeinfo_name_l = new JLabel("Name:"); … … 282 286 themeinfo_webpage_l.setBounds(5,105,150,24); 283 287 themeinfo_webpage_tf.setBounds(160,105,150,24); 284 themeinfo_p.setBorder(BorderFactory.createTitledBorder(BorderFactory.create LineBorder(Color.DARK_GRAY), "Theme Information"));288 themeinfo_p.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Theme Information")); 285 289 themeinfo_p.setMinimumSize(new Dimension(315,135)); 286 290 themeinfo_p.setMaximumSize(new Dimension(315,135)); … … 301 305 theme_movealpha_l.setBounds(5,75,150,24); 302 306 theme_movealpha_tf.setBounds(160,75,150,24); 303 theme_p.setBorder(BorderFactory.createTitledBorder(BorderFactory.create LineBorder(Color.DARK_GRAY), "Theme Attributes"));307 theme_p.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Theme Attributes")); 304 308 theme_p.setMinimumSize(new Dimension(315,105)); 305 309 theme_p.setMaximumSize(new Dimension(315,105)); … … 345 349 theme_movealpha = Integer.parseInt(theme_movealpha_tf.getText()); 346 350 theme_frame.setVisible(false); 351 theme_frame.dispose(); 352 theme_frame = null; 347 353 tee.setNew(); 348 354 m.hist.addEvent(tee); … … 363 369 } 364 370 } 365 else if(e.getSource().equals(theme_cancel_btn)) theme_frame.setVisible(false); 371 else if(e.getSource().equals(theme_cancel_btn)) { 372 theme_frame.setVisible(false); 373 theme_frame.dispose(); 374 theme_frame = null; 375 } 366 376 } 367 377 /** Generates a new number for unnamed items so that every id is unique **/ … … 537 547 code += HEADER+"\n"; 538 548 code += "<Theme version=\""+theme_version+"\""; 539 if( theme_tooltipfont!=THEME_TOOLTIPFONT_DEFAULT) code+=" tooltipfont=\""+theme_tooltipfont+"\"";549 if(!theme_tooltipfont.equals(THEME_TOOLTIPFONT_DEFAULT)) code+=" tooltipfont=\""+theme_tooltipfont+"\""; 540 550 if(theme_magnet!=THEME_MAGNET_DEFAULT) code+=" magnet=\""+String.valueOf(theme_magnet)+"\""; 541 551 if(theme_alpha!=THEME_ALPHA_DEFAULT) code+=" alpha=\""+String.valueOf(theme_alpha)+"\""; trunk/src/vlcskineditor/items/Anchor.java
r83 r92 108 108 s.updateItems(); 109 109 s.expandItem(id); 110 frame.setDefaultCloseOperation( frame.HIDE_ON_CLOSE);110 frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); 111 111 created = true; 112 112 ItemAddEvent aae = new ItemAddEvent(s.getParentListOf(id),this); … … 134 134 frame.setResizable(false); 135 135 frame.setLayout(new FlowLayout()); 136 if(!created) frame.setDefaultCloseOperation( frame.DO_NOTHING_ON_CLOSE);136 if(!created) frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); 137 137 JLabel id_l = new JLabel("ID:"); 138 138 id_tf = new JTextField(); … … 240 240 } 241 241 } 242 update(); 242 243 frame.setVisible(false); 243 update(); 244 frame.dispose(); 245 frame = null; 244 246 } 245 247 else if(e.getSource().equals(help_btn)) { … … 264 266 } 265 267 frame.setVisible(false); 268 frame.dispose(); 269 frame = null; 266 270 } 267 271 } … … 271 275 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 272 276 code+=" priority=\""+String.valueOf(priority)+"\""; 273 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";277 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 274 278 code+="/>"; 275 279 //if (id!=ID_DEFAULT) code+="<!-- id=\""+id+"\" -->"; … … 293 297 } 294 298 } 299 @Override 295 300 public boolean contains(int x_, int y_) { 296 int h = b.getHeight(); 301 return true; 302 /*int h = b.getHeight(); 297 303 int w = b.getWidth(); 298 return (x_>=x+offsetx && x_<=x+offsetx+w && y_>=y+offsety && y_<=y+offsety+h); 304 return (x_>=x+offsetx && x_<=x+offsetx+w && y_>=y+offsety && y_<=y+offsety+h);*/ 299 305 } 300 306 public DefaultMutableTreeNode getTreeNode() { trunk/src/vlcskineditor/items/Button.java
r89 r92 320 320 } 321 321 update(); 322 frame.setVisible(false); 322 frame.setVisible(false); 323 frame.dispose(); 324 frame = null; 323 325 } 324 326 else if(e.getSource().equals(help_btn)) { … … 362 364 } 363 365 frame.setVisible(false); 364 } 365 } 366 frame.dispose(); 367 frame = null; 368 } 369 } 370 @Override 366 371 public void actionWasEdited(ActionEditor ae) { 367 372 if(ae==action_ae) action_tf.setText(ae.getCode()); … … 370 375 String code = "<Button"; 371 376 code+=" up=\""+up+"\""; 372 if ( down!=DOWN_DEFAULT) code+=" down=\""+down+"\"";373 if ( over!=OVER_DEFAULT) code+=" over=\""+over+"\"";374 if ( action!=ACTION_DEFAULT) code+=" action=\""+action+"\"";375 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";377 if (!down.equals(DOWN_DEFAULT)) code+=" down=\""+down+"\""; 378 if (!over.equals(OVER_DEFAULT)) code+=" over=\""+over+"\""; 379 if (!action.equals(ACTION_DEFAULT)) code+=" action=\""+action+"\""; 380 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 376 381 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 377 382 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 378 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";379 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";383 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 384 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 380 385 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 381 386 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 382 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";383 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";384 if ( tooltiptext!=TOOLTIPTEXT_DEFAULT) code+=" tooltiptext=\""+tooltiptext+"\"";387 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 388 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 389 if (!tooltiptext.equals(TOOLTIPTEXT_DEFAULT)) code+=" tooltiptext=\""+tooltiptext+"\""; 385 390 code+="/>"; 386 391 return code; trunk/src/vlcskineditor/items/Checkbox.java
r89 r92 436 436 } 437 437 update(); 438 frame.setVisible(false); 438 frame.setVisible(false); 439 frame.dispose(); 440 frame = null; 439 441 } 440 442 else if(e.getSource().equals(help_btn)) { … … 497 499 } 498 500 frame.setVisible(false); 501 frame.dispose(); 502 frame = null; 499 503 } 500 504 } … … 507 511 String code = "<Checkbox"; 508 512 code+=" state=\""+state+"\" up1=\""+up1+"\" up2=\""+up2+"\""; 509 if ( down1!=ID_DEFAULT) code+=" down1=\""+down1+"\"";510 if ( down2!=ID_DEFAULT) code+=" down2=\""+down2+"\"";511 if ( over1!=ID_DEFAULT) code+=" over1=\""+over1+"\"";512 if ( over2!=ID_DEFAULT) code+=" over2=\""+over2+"\"";513 if ( action1!=ID_DEFAULT) code+=" action1=\""+action1+"\"";514 if ( action2!=ID_DEFAULT) code+=" action2=\""+action2+"\"";515 if ( tooltiptext1!=ID_DEFAULT) code+=" tooltiptext1=\""+tooltiptext1+"\"";516 if ( tooltiptext2!=ID_DEFAULT) code+=" tooltiptext2=\""+tooltiptext2+"\"";517 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";513 if (!down1.equals(ID_DEFAULT)) code+=" down1=\""+down1+"\""; 514 if (!down2.equals(ID_DEFAULT)) code+=" down2=\""+down2+"\""; 515 if (!over1.equals(ID_DEFAULT)) code+=" over1=\""+over1+"\""; 516 if (!over2.equals(ID_DEFAULT)) code+=" over2=\""+over2+"\""; 517 if (!action1.equals(ID_DEFAULT)) code+=" action1=\""+action1+"\""; 518 if (!action2.equals(ID_DEFAULT)) code+=" action2=\""+action2+"\""; 519 if (!tooltiptext1.equals(ID_DEFAULT)) code+=" tooltiptext1=\""+tooltiptext1+"\""; 520 if (!tooltiptext2.equals(ID_DEFAULT)) code+=" tooltiptext2=\""+tooltiptext2+"\""; 521 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 518 522 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 519 523 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 520 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";521 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";524 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 525 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 522 526 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 523 527 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 524 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";525 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";528 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 529 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 526 530 code+="/>"; 527 531 return code; trunk/src/vlcskineditor/items/Group.java
r89 r92 216 216 } 217 217 } 218 update(); 218 219 frame.setVisible(false); 219 update(); 220 frame.dispose(); 221 frame = null; 220 222 } 221 223 else if(e.getSource().equals(help_btn)) { … … 240 242 } 241 243 frame.setVisible(false); 244 frame.dispose(); 245 frame = null; 242 246 } 243 247 } trunk/src/vlcskineditor/items/Image.java
r89 r92 306 306 } 307 307 update(); 308 frame.setVisible(false); 308 frame.setVisible(false); 309 frame.dispose(); 310 frame = null; 309 311 } 310 312 else if(e.getSource().equals(help_btn)) { … … 345 347 } 346 348 frame.setVisible(false); 349 frame.dispose(); 350 frame = null; 347 351 } 348 352 } … … 352 356 } 353 357 public String returnCode() { 354 String code = "<Image"; 355 if (id!=ID_DEFAULT) code+=" id=\""+id+"\""; 356 code+=" image=\""+image+"\""; 357 if (action!=ACTION_DEFAULT) code+=" action=\""+action+"\""; 358 if (action2!=ACTION2_DEFAULT) code+=" action2=\""+action2+"\""; 358 String code = "<Image"; 359 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 359 360 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 360 361 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 361 if (lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\""; 362 if (rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\""; 362 363 code+=" image=\""+image+"\""; 364 if (!action.equals(ACTION_DEFAULT)) code+=" action=\""+action+"\""; 365 if (!action2.equals(ACTION2_DEFAULT)) code+=" action2=\""+action2+"\""; 366 367 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 368 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 363 369 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 364 370 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 365 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";366 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";371 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 372 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 367 373 code+="/>"; 368 374 return code; trunk/src/vlcskineditor/items/Panel.java
r89 r92 324 324 } 325 325 update(); 326 frame.setVisible(false); 326 frame.setVisible(false); 327 frame.dispose(); 328 frame = null; 327 329 } 328 330 else if(e.getSource().equals(help_btn)) { … … 347 349 } 348 350 frame.setVisible(false); 351 frame.dispose(); 352 frame = null; 349 353 } 350 354 } … … 354 358 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 355 359 code+=" width=\""+String.valueOf(width)+"\" height=\""+String.valueOf(height)+"\""; 356 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";357 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";360 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 361 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 358 362 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 359 363 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 360 364 code+=">"; 361 if ( id!=ID_DEFAULT) code+="<!-- id=\""+id+"\" -->";365 if (!id.equals(ID_DEFAULT)) code+="<!-- id=\""+id+"\" -->"; 362 366 for (int i=0;i<items.size();i++) { 363 367 code+="\n"+items.get(i).returnCode(); trunk/src/vlcskineditor/items/Playtree.java
r89 r92 491 491 } 492 492 update(); 493 frame.setVisible(false); 493 frame.setVisible(false); 494 frame.dispose(); 495 frame = null; 494 496 } 495 497 else if (e.getSource().equals(bgcolor1_btn)) { … … 596 598 } 597 599 frame.setVisible(false); 600 frame.dispose(); 601 frame = null; 598 602 } 599 603 } 600 604 public String returnCode() { 601 605 String code = "<Playtree"; 602 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";606 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 603 607 code+=" font=\""+font+"\""; 604 if( bgcolor1!=BGCOLOR1_DEFAULT) code+=" bgcolor1=\""+bgcolor1+"\"";605 if( bgcolor2!=BGCOLOR2_DEFAULT) code+=" bgcolor2=\""+bgcolor2+"\"";606 if( fgcolor!=FGCOLOR_DEFAULT) code+=" fgcolor=\""+fgcolor+"\"";607 if( selcolor!=SELCOLOR_DEFAULT) code+=" selcolor=\""+selcolor+"\"";608 if( playcolor!=PLAYCOLOR_DEFAULT) code+=" playcolor=\""+playcolor+"\"";609 if( bgimage!=BGIMAGE_DEFAULT) code+=" bgimage=\""+bgimage+"\"";610 if( itemimage!=ITEMIMAGE_DEFAULT) code+=" itemimage=\""+itemimage+"\"";611 if( openimage!=OPENIMAGE_DEFAULT) code+=" openimage=\""+openimage+"\"";612 if( closedimage!=CLOSEDIMAGE_DEFAULT) code+=" closedimage=\""+closedimage+"\"";613 if( var!=VAR_DEFAULT) code+=" var=\""+var+"\"";608 if(!bgcolor1.equals(BGCOLOR1_DEFAULT)) code+=" bgcolor1=\""+bgcolor1+"\""; 609 if(!bgcolor2.equals(BGCOLOR2_DEFAULT)) code+=" bgcolor2=\""+bgcolor2+"\""; 610 if(!fgcolor.equals(FGCOLOR_DEFAULT)) code+=" fgcolor=\""+fgcolor+"\""; 611 if(!selcolor.equals(SELCOLOR_DEFAULT)) code+=" selcolor=\""+selcolor+"\""; 612 if(!playcolor.equals(PLAYCOLOR_DEFAULT)) code+=" playcolor=\""+playcolor+"\""; 613 if(!bgimage.equals(BGIMAGE_DEFAULT)) code+=" bgimage=\""+bgimage+"\""; 614 if(!itemimage.equals(ITEMIMAGE_DEFAULT)) code+=" itemimage=\""+itemimage+"\""; 615 if(!openimage.equals(OPENIMAGE_DEFAULT)) code+=" openimage=\""+openimage+"\""; 616 if(!closedimage.equals(CLOSEDIMAGE_DEFAULT)) code+=" closedimage=\""+closedimage+"\""; 617 if(!var.equals(VAR_DEFAULT)) code+=" var=\""+var+"\""; 614 618 if(flat!=FLAT_DEFAULT) code+=" flat=\""+String.valueOf(flat)+"\""; 615 619 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 616 620 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 617 if (width!=WIDTH_DEFAULT) code+=" width=\""+String.valueOf(width)+"\""; 618 if (height!=HEIGHT_DEFAULT) code+=" height=\""+String.valueOf(height)+"\""; 619 if (lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\""; 620 if (rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\""; 621 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 622 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 621 623 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 622 624 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 623 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";624 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";625 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 626 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 625 627 code+=">\n"; 626 628 code+=slider.returnCode(); trunk/src/vlcskineditor/items/Slider.java
r89 r92 453 453 } 454 454 update(); 455 frame.setVisible(false); 455 frame.setVisible(false); 456 frame.dispose(); 457 frame = null; 456 458 } 457 459 else if(e.getSource().equals(help_btn)) { … … 504 506 } 505 507 frame.setVisible(false); 508 frame.dispose(); 509 frame = null; 506 510 } 507 511 } … … 514 518 public String returnCode() { 515 519 String code = "<Slider"; 516 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";520 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 517 521 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 518 522 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 519 523 code+=" points=\""+points+"\""; 520 524 if (thickness!=THICKNESS_DEFAULT) code+=" thickness=\""+String.valueOf(thickness)+"\""; 521 if ( value!=VALUE_DEFAULT) code+=" value=\""+value+"\"";522 if ( tooltiptext!=TOOLTIPTEXT_DEFAULT) code+=" tooltiptext=\""+tooltiptext+"\"";525 if (!value.equals(VALUE_DEFAULT)) code+=" value=\""+value+"\""; 526 if (!tooltiptext.equals(TOOLTIPTEXT_DEFAULT)) code+=" tooltiptext=\""+tooltiptext+"\""; 523 527 code+=" up=\""+up+"\""; 524 if ( down!=DOWN_DEFAULT) code+=" down=\""+down+"\"";525 if ( over!=OVER_DEFAULT) code+=" over=\""+over+"\"";526 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";527 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";528 if (!down.equals(DOWN_DEFAULT)) code+=" down=\""+down+"\""; 529 if (!over.equals(OVER_DEFAULT)) code+=" over=\""+over+"\""; 530 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 531 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 528 532 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 529 533 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 530 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";531 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";534 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 535 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 532 536 if (sbg==null) { 533 537 code+="/>"; trunk/src/vlcskineditor/items/SliderBackground.java
r89 r92 219 219 } 220 220 update(); 221 frame.setVisible(false); 221 frame.setVisible(false); 222 frame.dispose(); 223 frame = null; 222 224 } 223 225 else if(e.getSource().equals(help_btn)) { … … 241 243 else if(e.getSource().equals(cancel_btn)) { 242 244 frame.setVisible(false); 245 frame.dispose(); 246 frame = null; 243 247 if(!created) sl.removeBG(); 244 248 } … … 246 250 public String returnCode() { 247 251 String code = "<SliderBackground"; 248 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";252 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 249 253 code+=" image=\""+image+"\""; 250 254 if (nbhoriz!=NBHORIZ_DEFAULT) code+=" nbhoriz=\""+String.valueOf(nbhoriz)+"\""; trunk/src/vlcskineditor/items/Text.java
r89 r92 327 327 } 328 328 update(); 329 frame.setVisible(false); 329 frame.setVisible(false); 330 frame.dispose(); 331 frame = null; 330 332 } 331 333 else if(e.getSource().equals(help_btn)) { … … 378 380 } 379 381 frame.setVisible(false); 382 frame.dispose(); 383 frame = null; 380 384 } 381 385 } … … 384 388 code+=" text=\""+text+"\""; 385 389 code+=" font=\""+font+"\""; 386 if (alignment!=ALIGNMENT_DEFAULT) code+=" alignment=\""+alignment+"\"";387 if ( color!=COLOR_DEFAULT) code+=" color=\""+color+"\"";388 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";390 if (!alignment.equals(ALIGNMENT_DEFAULT)) code+=" alignment=\""+alignment+"\""; 391 if (!color.equals(COLOR_DEFAULT)) code+=" color=\""+color+"\""; 392 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 389 393 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 390 394 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; 391 395 if (width!=WIDTH_DEFAULT) code+=" width=\""+String.valueOf(width)+"\""; 392 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";393 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";396 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 397 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 394 398 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 395 399 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 396 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";397 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";400 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 401 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 398 402 code+="/>"; 399 403 return code; trunk/src/vlcskineditor/items/Video.java
r83 r92 283 283 } 284 284 update(); 285 frame.setVisible(false); 285 frame.setVisible(false); 286 frame.dispose(); 287 frame = null; 286 288 } 287 289 else if(e.getSource().equals(help_btn)) { … … 321 323 } 322 324 frame.setVisible(false); 325 frame.dispose(); 326 frame = null; 323 327 } 324 328 } 325 329 public String returnCode() { 326 330 String code = "<Video"; 327 if ( id!=ID_DEFAULT) code+=" id=\""+id+"\"";331 if (!id.equals(ID_DEFAULT)) code+=" id=\""+id+"\""; 328 332 if (x!=X_DEFAULT) code+=" x=\""+String.valueOf(x)+"\""; 329 333 if (y!=Y_DEFAULT) code+=" y=\""+String.valueOf(y)+"\""; … … 331 335 if (height!=HEIGHT_DEFAULT) code+=" height=\""+String.valueOf(height)+"\""; 332 336 if (autoresize!=AUTORESIZE_DEFAULT) code+=" autoresize=\""+String.valueOf(autoresize)+"\""; 333 if ( lefttop!=LEFTTOP_DEFAULT) code+=" lefttop=\""+lefttop+"\"";334 if ( rightbottom!=RIGHTBOTTOM_DEFAULT) code+=" rightbottom=\""+rightbottom+"\"";337 if (!lefttop.equals(LEFTTOP_DEFAULT)) code+=" lefttop=\""+lefttop+"\""; 338 if (!rightbottom.equals(RIGHTBOTTOM_DEFAULT)) code+=" rightbottom=\""+rightbottom+"\""; 335 339 if (xkeepratio!=XKEEPRATIO_DEFAULT) code+=" xkeepratio=\""+String.valueOf(xkeepratio)+"\""; 336 340 if (ykeepratio!=YKEEPRATIO_DEFAULT) code+=" ykeepratio=\""+String.valueOf(ykeepratio)+"\""; 337 if ( help!=HELP_DEFAULT) code+=" help=\""+help+"\"";338 if ( visible!=VISIBLE_DEFAULT) code+=" visible=\""+visible+"\"";341 if (!help.equals(HELP_DEFAULT)) code+=" help=\""+help+"\""; 342 if (!visible.equals(VISIBLE_DEFAULT)) code+=" visible=\""+visible+"\""; 339 343 code+="/>"; 340 344 return code; trunk/src/vlcskineditor/resources/Bitmap.java
r91 r92 324 324 return; 325 325 } 326 update(); 326 327 frame.setVisible(false); 327 update(); 328 frame.dispose(); 329 frame = null; 328 330 } 329 331 else if(e.getSource().equals(help_btn)) { … … 344 346 else if(e.getSource().equals(cancel_btn)) { 345 347 frame.setVisible(false); 348 frame.dispose(); 349 frame = null; 346 350 } 347 351 } … … 370 374 return node; 371 375 } 376 @Override 372 377 public Resource getParentOf(String id_) { 373 378 for(SubBitmap sbmp:SubBitmaps) { trunk/src/vlcskineditor/resources/Font.java
r88 r92 241 241 return; 242 242 } 243 update(); 243 244 frame.setVisible(false); 244 update(); 245 frame.dispose(); 246 frame = null; 245 247 } 246 248 else if(e.getSource().equals(help_btn)) { … … 261 263 else if(e.getSource().equals(cancel_btn)) { 262 264 frame.setVisible(false); 265 frame.dispose(); 266 frame = null; 263 267 } 264 268 } trunk/src/vlcskineditor/resources/SubBitmap.java
r91 r92 108 108 nbframes=Integer.parseInt(nbframes_tf.getText()); 109 109 fps=Integer.parseInt(fps_tf.getText()); 110 frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);110 //frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); 111 111 updateImage(); 112 112 s.updateResources(); … … 124 124 nbframes=Integer.parseInt(nbframes_tf.getText()); 125 125 fps=Integer.parseInt(fps_tf.getText()); 126 frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);126 //frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); 127 127 updateImage(); 128 128 s.updateResources(); … … 273 273 return; 274 274 } 275 frame.setVisible(false); 275 update(); 276 frame.setVisible(false); 276 277 destroyEditWindow(); 277 update(); 278 frame.dispose(); 279 frame = null; 278 280 } 279 281 else if(e.getSource().equals(help_btn)) { … … 293 295 } 294 296 else if(e.getSource().equals(cancel_btn)) { 295 frame.setVisible(false); 297 frame.setVisible(false); 296 298 destroyEditWindow(); 299 frame.dispose(); 300 frame = null; 297 301 if(!created) parent.SubBitmaps.remove(this); 298 302 } … … 305 309 height_tf.removeKeyListener(sbew); 306 310 frame.removeWindowListener(sbew); 311 sbew.frame.dispose(); 307 312 sbew.frame = null; 308 313 sbew = null;
