| CameraPane.java | ●●●●● patch | view | raw | blame | history | |
| Globals.java | ●●●●● patch | view | raw | blame | history | |
| GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
| ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
| Object3D.java | ●●●●● patch | view | raw | blame | history | |
| cRadio.java | ●●●●● patch | view | raw | blame | history | |
| cToggleButton.java | ●●●●● patch | view | raw | blame | history | |
| icons/arrow-down-01-512.png | patch | view | raw | blame | history | |
| icons/replace.png | patch | view | raw | blame | history | |
| icons/restore.png | patch | view | raw | blame | history | 
CameraPane.java
.. .. @@ -15708,6 +15708,7 @@ 15708 15708 info.bounds.y += (height - desired) / 2; 15709 15709 } 15710 15710 } 15711  +15711 15712 info.g = gr; 15712 15713 info.camera = renderCamera; 15713 15714 /* .. .. @@ -15717,6 +15718,8 @@ 15717 15718 */ 15718 15719 if (!isRenderer) 15719 15720 { 15721  + Grafreed.Assert(object != null);15722  + Grafreed.Assert(object.selection != null);15720 15723 if (object.selection.Size() > 0) 15721 15724 { 15722 15725 int hitSomething = object.selection.get(0).hitSomething; Globals.java
.. .. @@ -10,7 +10,7 @@ 10 10 public static boolean COMPUTESHADOWWHENLIVE = true; 11 11 public static boolean RENDERSHADOW = true; 12 12 13  - public static boolean SAVEONMAKE = true; // problems when auto-save (works with manual save)13  + public static boolean REPLACEONMAKE = true; // problems when auto-save (works with manual save)14 14 15 15 public static boolean MOUSEDRAGGED = false; 16 16 public static boolean TIMERRUNNING = false; GroupEditor.java
.. .. @@ -84,10 +84,10 @@ 84 84 85 85 void CloneSelection(boolean supports) 86 86 { 87  - if (Globals.SAVEONMAKE)87  + if (Globals.REPLACEONMAKE)88 88 Save(); 89  - boolean keep = Globals.SAVEONMAKE;90  - Globals.SAVEONMAKE = false;89  + boolean keep = Globals.REPLACEONMAKE;90  + Globals.REPLACEONMAKE = false;91 91 // Object3D keep = GrafreeD.clipboard; 92 92 //Object3D obj; 93 93 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) .. .. @@ -98,7 +98,7 @@ 98 98 99 99 makeSomething(clone, i==group.selection.size()-1); 100 100 } 101  - Globals.SAVEONMAKE = keep;101  + Globals.REPLACEONMAKE = keep;102 102 } 103 103 104 104 void CloneClipboard(boolean supports) .. .. @@ -544,6 +544,7 @@ 544 544 buildToolsMenu(menu); 545 545 } 546 546 547  +547 548 void SetupUI2(ObjEditor oe) 548 549 { 549 550 // June 2019 .. .. @@ -615,29 +616,42 @@ 615 616 restoreCameraButton.setToolTipText("Restore viewpoint"); 616 617 restoreCameraButton.addActionListener(this); 617 618 619  + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);620  + saveButton.setToolTipText("New version");621  + saveButton.addActionListener(this);622  +618 623 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 619  - undoButton.setToolTipText("Undo changes");624  + undoButton.setToolTipText("Previous version");620 625 undoButton.addActionListener(this); 621 626 undoButton.setEnabled(false); 622 627 628  + cGridBag updown = new cGridBag().setVertical(true);629  + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);630  + restoreButton.setToolTipText("Restore current");631  + restoreButton.addActionListener(this);632  + restoreButton.setEnabled(false);633  +634  + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);635  + replaceButton.setToolTipText("Replace current");636  + replaceButton.addActionListener(this);637  + replaceButton.setEnabled(false);638  +639  + copyOptionsPanel.add(updown);640  +623 641 copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 624  - redoButton.setToolTipText("Redo changes");642  + redoButton.setToolTipText("Next version");625 643 redoButton.addActionListener(this); 626 644 redoButton.setEnabled(false); 627 645 628  - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);629  - saveButton.setToolTipText("Save changes");630  - saveButton.addActionListener(this);631  -632  - copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);646  + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);633 647 liveCB.setToolTipText("Enable animation"); 634 648 liveCB.addItemListener(this); 635 649 636  - copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);650  + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);637 651 oneStepButton.setToolTipText("Animate one step forward"); 638 652 oneStepButton.addActionListener(this); 639 653 640  - copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);654  + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);641 655 fastCB.setToolTipText("Fast mode"); 642 656 fastCB.addItemListener(this); 643 657 .. .. @@ -820,6 +834,9 @@ 820 834 821 835 oe.treePanel.add(copyOptionsPanel); 822 836 oe.treePanel.Return(); 837  + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0);838  + versionField = (cNumberSlider)sliderPane.getComponent(1);839  + sliderPane.preferredHeight = 1;823 840 824 841 // mainPanel.setDividerLocation(0.5); //1.0); 825 842 // mainPanel.setResizeWeight(0.5); .. .. @@ -945,9 +962,9 @@ 945 962 toggleSwitchCB.setToolTipText("Choose a single item"); 946 963 toggleSwitchCB.addItemListener(this); 947 964 948  - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);949  - autosaveCB.setToolTipText("On structure change");950  - autosaveCB.addItemListener(this);965  + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);966  + autokeepCB.setToolTipText("On structure change");967  + autokeepCB.addItemListener(this);951 968 952 969 panel.Return(); 953 970 if (Globals.ADVANCED) .. .. @@ -1024,7 +1041,7 @@ 1024 1041 1025 1042 cCheckBox oeilCB; 1026 1043 cCheckBox shadowCB; 1027  - cCheckBox autosaveCB;1044  + cCheckBox autokeepCB;1028 1045 cCheckBox lookAtCB; 1029 1046 1030 1047 // static int COLOR = 1; .. .. @@ -1136,9 +1153,9 @@ 1136 1153 { 1137 1154 Globals.FREEZEONMOVE ^= true; 1138 1155 } 1139  - else if(e.getSource() == autosaveCB)1156  + else if(e.getSource() == autokeepCB)1140 1157 { 1141  - Globals.SAVEONMAKE ^= true;1158  + Globals.REPLACEONMAKE ^= true;1142 1159 } 1143 1160 else if(e.getSource() == lookAtCB) 1144 1161 { .. .. @@ -2225,15 +2242,29 @@ 2225 2242 } else 2226 2243 if (source == undoButton) 2227 2244 { 2228  - if (!Undo())2229  - java.awt.Toolkit.getDefaultToolkit().beep();2245  + // Go to previous version2246  + //if (!Undo())2247  + //java.awt.Toolkit.getDefaultToolkit().beep();2248  + Undo();2249  + } else2250  + if (source == restoreButton)2251  + {2252  + // Restore current version2253  + Restore();2254  + } else2255  + if (source == replaceButton)2256  + {2257  + // Overwrite current version2258  + Replace();2230 2259 } else 2231 2260 if (source == redoButton) 2232 2261 { 2262  + // Go to next version2233 2263 Redo(); 2234 2264 } else 2235 2265 if (source == saveButton) 2236 2266 { 2267  + // Save a new version2237 2268 if (!Save(true)) 2238 2269 java.awt.Toolkit.getDefaultToolkit().beep(); 2239 2270 } else .. .. @@ -3479,6 +3510,9 @@ 3479 3510 } 3480 3511 3481 3512 copy = group; 3513  +3514  + SetUndoStates();3515  +3482 3516 //Globals.theRenderer.object = group; 3483 3517 if(!useclient) 3484 3518 { .. .. @@ -4942,10 +4976,10 @@ 4942 4976 4943 4977 void paste(boolean expand) 4944 4978 { 4945  - if (Globals.SAVEONMAKE)4979  + if (Globals.REPLACEONMAKE)4946 4980 Save(); 4947  - boolean keep = Globals.SAVEONMAKE;4948  - Globals.SAVEONMAKE = false;4981  + boolean keep = Globals.REPLACEONMAKE;4982  + Globals.REPLACEONMAKE = false;4949 4983 // if (GrafreeD.clipboard == null) 4950 4984 // return; 4951 4985 boolean first = true; .. .. @@ -5005,7 +5039,7 @@ 5005 5039 Grafreed.clipboard.get(0).parent = keepparent; 5006 5040 } 5007 5041 5008  - Globals.SAVEONMAKE = keep;5042  + Globals.REPLACEONMAKE = keep;5009 5043 ResetModel(); 5010 5044 refreshContents(); 5011 5045 } .. .. @@ -5141,10 +5175,10 @@ 5141 5175 5142 5176 void group(Object3D csg, boolean grab) 5143 5177 { 5144  - if (Globals.SAVEONMAKE)5178  + if (Globals.REPLACEONMAKE)5145 5179 Save(); 5146  - boolean keep = Globals.SAVEONMAKE;5147  - Globals.SAVEONMAKE = false;5180  + boolean keep = Globals.REPLACEONMAKE;5181  + Globals.REPLACEONMAKE = false;5148 5182 if (//false) // why?? 5149 5183 !group.selection.isEmpty()) 5150 5184 { .. .. @@ -5258,15 +5292,15 @@ 5258 5292 //node.add(csg); 5259 5293 //makeSomething(node); 5260 5294 makeSomething(csg); 5261  - Globals.SAVEONMAKE = keep;5295  + Globals.REPLACEONMAKE = keep;5262 5296 } 5263 5297 5264 5298 void Ungroup(Object3D g) 5265 5299 { 5266  - if (Globals.SAVEONMAKE)5300  + if (Globals.REPLACEONMAKE)5267 5301 Save(); 5268  - boolean keep = Globals.SAVEONMAKE;5269  - Globals.SAVEONMAKE = false;5302  + boolean keep = Globals.REPLACEONMAKE;5303  + Globals.REPLACEONMAKE = false;5270 5304 if (g instanceof HiddenObject) 5271 5305 { 5272 5306 HiddenObject h = (HiddenObject) g; .. .. @@ -5283,7 +5317,7 @@ 5283 5317 objEditor.makeSomething(g.get(i), false); 5284 5318 } 5285 5319 } 5286  - Globals.SAVEONMAKE = keep;5320  + Globals.REPLACEONMAKE = keep;5287 5321 } 5288 5322 5289 5323 void ungroup() ObjEditor.java
.. .. @@ -816,6 +816,28 @@ 816 816 frame.validate(); 817 817 } 818 818 819  + private byte[] CompressCopy()820  + {821  + boolean temp = CameraPane.SWITCH;822  + CameraPane.SWITCH = false;823  +824  + copy.ExtractBigData(versiontable);825  + // if (copy == client)826  +827  + byte[] versions[] = copy.versions;828  + copy.versions = null;829  +830  + byte[] compress = Compress(copy);831  +832  + copy.versions = versions;833  +834  + copy.RestoreBigData(versiontable);835  +836  + CameraPane.SWITCH = temp;837  +838  + return compress;839  + }840  +819 841 private JTextPane createTextPane() 820 842 { 821 843 // TEXTAREA String[] initString = .. .. @@ -3574,11 +3596,11 @@ 3574 3596 return null; 3575 3597 } 3576 3598 3577  - java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();3578 3599 3579 3600 public void Save() 3580 3601 { 3581  - Save(true);3602  + //Save(true);3603  + Replace();3582 3604 } 3583 3605 3584 3606 private boolean Equal(byte[] compress, byte[] name) .. .. @@ -3597,25 +3619,20 @@ 3597 3619 return true; 3598 3620 } 3599 3621 3622  + java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>();3623  +3600 3624 public boolean Save(boolean user) 3601 3625 { 3602 3626 System.err.println("Save"); 3603 3627 3604 3628 cRadio tab = GetCurrentTab(); 3605 3629 3606  - boolean temp = CameraPane.SWITCH;3607  - CameraPane.SWITCH = false;3608  -3609  - copy.ExtractBigData(hashtable);3610  -3611  - byte[] compress = Compress(copy);3612  -3613  - CameraPane.SWITCH = temp;3630  + byte[] compress = CompressCopy();3614 3631 3615 3632 boolean thesame = false; 3616 3633 3617 3634 // Quick heuristic using length. Works only when stream is compressed. 3618  - if (tab.undoindex > 0 && tab.graphs[tab.undoindex-1] != null && Equal(compress, tab.graphs[tab.undoindex-1]))3635  + if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1]))3619 3636 { 3620 3637 thesame = true; 3621 3638 } .. .. @@ -3623,23 +3640,23 @@ 3623 3640 //EditorFrame.m_MainFrame.requestFocusInWindow(); 3624 3641 if (!thesame) 3625 3642 { 3626  - //tab.user[tab.undoindex] = user;3627  - boolean increment = tab.graphs[tab.undoindex] == null;3643  + //tab.user[tab.versionindex] = user;3644  + //boolean increment = true; // tab.graphs[tab.versionindex] == null;3628 3645 3629  - tab.graphs[tab.undoindex] = compress;3646  + copy.versions[++copy.versionindex] = compress;3630 3647 3631  - if (increment)3632  - tab.undoindex++;3648  + // if (increment)3649  + // tab.versionindex++;3633 3650 } 3634 3651 3635  - copy.RestoreBigData(hashtable);3652  + //copy.RestoreBigData(versiontable);3636 3653 3637 3654 //assert(hashtable.isEmpty()); 3638 3655 3639  - for (int i = tab.undoindex; i < tab.graphs.length; i++)3656  + for (int i = copy.versionindex+1; i < copy.versions.length; i++)3640 3657 { 3641 3658 //tab.user[i] = false; 3642  - // tab.graphs[i] = null;3659  + copy.versions[i] = null;3643 3660 } 3644 3661 3645 3662 SetUndoStates(); .. .. @@ -3649,7 +3666,7 @@ 3649 3666 { 3650 3667 try 3651 3668 { 3652  - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);3669  + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex);3653 3670 ObjectOutputStream p = new ObjectOutputStream(ostream); 3654 3671 3655 3672 p.writeObject(copy); .. .. @@ -3673,7 +3690,7 @@ 3673 3690 boolean temp = CameraPane.SWITCH; 3674 3691 CameraPane.SWITCH = false; 3675 3692 3676  - copy.ExtractBigData(hashtable);3693  + copy.ExtractBigData(versiontable);3677 3694 3678 3695 copy.clear(); 3679 3696 .. .. @@ -3682,7 +3699,7 @@ 3682 3699 copy.add(obj.get(i)); 3683 3700 } 3684 3701 3685  - copy.RestoreBigData(hashtable);3702  + copy.RestoreBigData(versiontable);3686 3703 3687 3704 CameraPane.SWITCH = temp; 3688 3705 .. .. @@ -3710,14 +3727,18 @@ 3710 3727 } 3711 3728 3712 3729 cButton undoButton; 3730  + cButton restoreButton;3731  + cButton replaceButton;3713 3732 cButton redoButton; 3714 3733 3715 3734 void SetUndoStates() 3716 3735 { 3717 3736 cRadio tab = GetCurrentTab(); 3718 3737 3719  - undoButton.setEnabled(tab.undoindex > 0);3720  - redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null);3738  + restoreButton.setEnabled(copy.versionindex != -1);3739  + replaceButton.setEnabled(copy.versionindex != -1);3740  + undoButton.setEnabled(copy.versionindex > 0);3741  + redoButton.setEnabled(copy.versions[copy.versionindex + 1] != null);3721 3742 } 3722 3743 3723 3744 public boolean Undo() .. .. @@ -3726,28 +3747,62 @@ 3726 3747 3727 3748 cRadio tab = GetCurrentTab(); 3728 3749 3729  - if (tab.undoindex == 0)3750  + if (copy.versionindex == 0)3730 3751 { 3731 3752 java.awt.Toolkit.getDefaultToolkit().beep(); 3732 3753 return false; 3733 3754 } 3734 3755 3735  - if (tab.graphs[tab.undoindex] == null) // || !tab.user[tab.undoindex])3756  +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex])3757  +// {3758  +// if (Save(false))3759  +// tab.versionindex -= 1;3760  +// else3761  +// {3762  +// if (tab.versionindex <= 0)3763  +// return false;3764  +// else3765  +// tab.versionindex -= 1;3766  +// }3767  +// }3768  +3769  + copy.versionindex -= 1;3770  +3771  + CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));3772  +3773  + return true;3774  + }3775  +3776  + public boolean Restore()3777  + {3778  + System.err.println("Restore");3779  +3780  + cRadio tab = GetCurrentTab();3781  +3782  + if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null)3736 3783 { 3737  - if (Save(false))3738  - tab.undoindex -= 1;3739  - else3740  - {3741  - if (tab.undoindex <= 0)3742  - return false;3743  - else3744  - tab.undoindex -= 1;3745  - }3784  + java.awt.Toolkit.getDefaultToolkit().beep();3785  + return false;3746 3786 } 3747 3787 3748  - tab.undoindex -= 1;3788  + CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));3789  +3790  + return true;3791  + }3749 3792 3750  - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));3793  + public boolean Replace()3794  + {3795  + System.err.println("Replace");3796  +3797  + cRadio tab = GetCurrentTab();3798  +3799  + if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null)3800  + {3801  + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep();3802  + return false;3803  + }3804  +3805  + copy.versions[copy.versionindex] = CompressCopy();3751 3806 3752 3807 return true; 3753 3808 } .. .. @@ -3756,18 +3811,18 @@ 3756 3811 { 3757 3812 cRadio tab = GetCurrentTab(); 3758 3813 3759  - if (tab.graphs[tab.undoindex + 1] == null)3814  + if (copy.versions[copy.versionindex + 1] == null)3760 3815 { 3761 3816 java.awt.Toolkit.getDefaultToolkit().beep(); 3762 3817 return; 3763 3818 } 3764 3819 3765  - tab.undoindex += 1;3820  + copy.versionindex += 1;3766 3821 3767  - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));3822  + CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));3768 3823 3769  - //if (!tab.user[tab.undoindex])3770  - // tab.graphs[tab.undoindex] = null;3824  + //if (!tab.user[tab.versionindex])3825  + // tab.graphs[tab.versionindex] = null;3771 3826 } 3772 3827 3773 3828 void ImportGFD() .. .. @@ -4063,9 +4118,22 @@ 4063 4118 //copy.Touch(); 4064 4119 } 4065 4120 4121  + cNumberSlider versionField;4122  +4066 4123 public void stateChanged(ChangeEvent e) 4067 4124 { 4068 4125 // assert(false); 4126  + if (e.getSource() == versionField)4127  + {4128  + int version = versionField.getInteger();4129  +4130  + if (copy.versions[version] != null)4131  + {4132  + CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex = version]));4133  + }4134  +4135  + return;4136  + }4069 4137 4070 4138 if (freezematerial) 4071 4139 { .. .. @@ -4414,7 +4482,7 @@ 4414 4482 4415 4483 void makeSomething(Object3D thing, boolean resetmodel) // deselect) 4416 4484 { 4417  - if (Globals.SAVEONMAKE) // && resetmodel)4485  + if (Globals.REPLACEONMAKE) // && resetmodel)4418 4486 Save(); 4419 4487 //Tween.set(thing, 0).target(1).start(tweenManager); 4420 4488 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); .. .. @@ -4786,6 +4854,11 @@ 4786 4854 c.addChild(csg); 4787 4855 } 4788 4856 4857  + copy.versions = readobj.versions;4858  + copy.versionindex = readobj.versionindex;4859  +4860  + SetUndoStates();4861  +4789 4862 ResetModel(); 4790 4863 copy.HardTouch(); // recompile? 4791 4864 refreshContents(); Object3D.java
.. .. @@ -29,6 +29,9 @@ 29 29 Object3D saveskeleton; 30 30 // 31 31 32  + byte[] versions[] = new byte[100][];33  + int versionindex = -1;34  +32 35 ScriptNode scriptnode; 33 36 34 37 void InitOthers() .. .. @@ -215,6 +218,7 @@ 215 218 // o.transientrep = this.bRep.support; 216 219 // o.bRep.support = null; 217 220 // } 221  + o.selection = this.selection;218 222 219 223 if (this.support != null) 220 224 { .. .. @@ -268,6 +272,8 @@ 268 272 { 269 273 this.support.bRep = o.transientrep; 270 274 } 275  +276  + this.selection = o.selection;271 277 // July 2019 if (this.bRep != null) 272 278 // this.bRep.support = o.transientrep; 273 279 // this.support = o.support; cRadio.java
.. .. @@ -35,10 +35,10 @@ 35 35 camera = (Camera)Grafreed.clone(c); 36 36 } 37 37 38  - byte[] graphs[] = new byte[100][];38  + //byte[] versions[] = new byte[100][];39 39 //boolean[] user = new boolean[100]; 40 40 41  - int undoindex = 0;41  + //int versionindex = -1;42 42 43 43 // Patch to avoid bug with transparency. 44 44 boolean hadMaterial; cToggleButton.java
.. .. @@ -19,8 +19,10 @@ 19 19 this.image = icon.getImage(); 20 20 iconWidth = icon.getIconWidth(); 21 21 22  - //setBorder(new javax.swing.border.EmptyBorder(8, 0, 8, 24)); // top, left, bottom, right23  - setBorder(new javax.swing.border.EtchedBorder(EtchedBorder.RAISED, Color.BLACK, Color.BLACK));22  + setMargin(new java.awt.Insets(11, 11, 11, 11));23  + //setBorder(javax.swing.BorderFactory.createLineBorder(Color.BLACK));24  + // setBorder(new javax.swing.border.EmptyBorder(8, 0, 8, 24)); // top, left, bottom, right25  + // setBorder(new javax.swing.border.EtchedBorder(EtchedBorder.RAISED, Color.BLACK, Color.BLACK));24 26 } 25 27 26 28 private java.awt.Image image; .. .. @@ -35,6 +37,7 @@ 35 37 //if (getWidth() > image.getWidth(null) + 8) 36 38 { 37 39 g.drawImage(image, this.getWidth()/2 - 12, this.getHeight()/2 - 12, this); 40  + g.drawRect(0, 0, this.getWidth()-1, this.getHeight()-1);38 41 } 39 42 } 40 43 } icons/arrow-down-01-512.pngBinary files differ
icons/replace.pngBinary files differ
icons/restore.pngBinary files differ