|
|
@ -5,42 +5,40 @@ |
|
|
|
package com.jme3.gde.gui; |
|
|
|
package com.jme3.gde.gui; |
|
|
|
|
|
|
|
|
|
|
|
import com.jme3.gde.core.assets.ProjectAssetManager; |
|
|
|
import com.jme3.gde.core.assets.ProjectAssetManager; |
|
|
|
import com.jme3.gde.core.scene.SceneApplication; |
|
|
|
|
|
|
|
import com.jme3.gde.gui.nodes.GUINode; |
|
|
|
import com.jme3.gde.gui.nodes.GUINode; |
|
|
|
import com.jme3.gde.gui.palette.NiftyGUIPaletteFactory; |
|
|
|
|
|
|
|
import de.lessvoid.nifty.Nifty; |
|
|
|
import de.lessvoid.nifty.Nifty; |
|
|
|
|
|
|
|
import jada.ngeditor.controller.CommandProcessor; |
|
|
|
import jada.ngeditor.controller.GUIEditor; |
|
|
|
import jada.ngeditor.controller.GUIEditor; |
|
|
|
import jada.ngeditor.guiviews.DND.PaletteDropTarget; |
|
|
|
import jada.ngeditor.guiviews.DND.PaletteDropTarget; |
|
|
|
import jada.ngeditor.guiviews.DND.TrasferHandling; |
|
|
|
import jada.ngeditor.guiviews.DND.TrasferHandling; |
|
|
|
import jada.ngeditor.guiviews.J2DNiftyView; |
|
|
|
import jada.ngeditor.guiviews.J2DNiftyView; |
|
|
|
|
|
|
|
import jada.ngeditor.listeners.events.SelectionChanged; |
|
|
|
|
|
|
|
import jada.ngeditor.model.GuiEditorModel; |
|
|
|
import jada.ngeditor.model.elements.GElement; |
|
|
|
import jada.ngeditor.model.elements.GElement; |
|
|
|
import jada.ngeditor.model.elements.GLayer; |
|
|
|
import jada.ngeditor.model.elements.GLayer; |
|
|
|
import jada.ngeditor.model.exception.NoProductException; |
|
|
|
import jada.ngeditor.model.exception.NoProductException; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.dnd.DropTarget; |
|
|
|
|
|
|
|
import java.awt.dnd.DropTargetDragEvent; |
|
|
|
|
|
|
|
import java.awt.dnd.DropTargetDropEvent; |
|
|
|
|
|
|
|
import java.awt.dnd.DropTargetEvent; |
|
|
|
|
|
|
|
import java.awt.dnd.DropTargetListener; |
|
|
|
|
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
import java.awt.event.ItemListener; |
|
|
|
import java.awt.event.ItemListener; |
|
|
|
|
|
|
|
import java.beans.PropertyChangeEvent; |
|
|
|
|
|
|
|
import java.beans.PropertyChangeListener; |
|
|
|
import java.beans.PropertyVetoException; |
|
|
|
import java.beans.PropertyVetoException; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileNotFoundException; |
|
|
|
import java.io.FileNotFoundException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Observable; |
|
|
|
import java.util.Observable; |
|
|
|
import java.util.Observer; |
|
|
|
import java.util.Observer; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
|
|
|
|
import javax.swing.Action; |
|
|
|
import javax.swing.Action; |
|
|
|
import javax.swing.ActionMap; |
|
|
|
import javax.swing.ActionMap; |
|
|
|
import javax.swing.DefaultComboBoxModel; |
|
|
|
import javax.swing.DefaultComboBoxModel; |
|
|
|
import javax.swing.JComboBox; |
|
|
|
import javax.swing.JComboBox; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JLabel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JToolBar; |
|
|
|
import javax.swing.JToolBar; |
|
|
|
import javax.swing.text.AbstractDocument; |
|
|
|
|
|
|
|
import javax.xml.bind.JAXBException; |
|
|
|
import javax.xml.bind.JAXBException; |
|
|
|
import javax.xml.parsers.ParserConfigurationException; |
|
|
|
import javax.xml.parsers.ParserConfigurationException; |
|
|
|
import org.netbeans.api.progress.ProgressHandle; |
|
|
|
import org.netbeans.api.progress.ProgressHandle; |
|
|
@ -48,20 +46,17 @@ import org.netbeans.api.progress.ProgressHandleFactory; |
|
|
|
import org.netbeans.core.spi.multiview.CloseOperationState; |
|
|
|
import org.netbeans.core.spi.multiview.CloseOperationState; |
|
|
|
import org.netbeans.core.spi.multiview.MultiViewElement; |
|
|
|
import org.netbeans.core.spi.multiview.MultiViewElement; |
|
|
|
import org.netbeans.core.spi.multiview.MultiViewElementCallback; |
|
|
|
import org.netbeans.core.spi.multiview.MultiViewElementCallback; |
|
|
|
import org.openide.DialogDisplayer; |
|
|
|
|
|
|
|
import org.openide.NotifyDescriptor; |
|
|
|
|
|
|
|
import org.openide.awt.UndoRedo; |
|
|
|
import org.openide.awt.UndoRedo; |
|
|
|
import org.openide.explorer.ExplorerManager; |
|
|
|
import org.openide.explorer.ExplorerManager; |
|
|
|
import org.openide.explorer.ExplorerUtils; |
|
|
|
import org.openide.explorer.ExplorerUtils; |
|
|
|
|
|
|
|
import org.openide.loaders.DataObject; |
|
|
|
import org.openide.nodes.Node; |
|
|
|
import org.openide.nodes.Node; |
|
|
|
import org.openide.util.Exceptions; |
|
|
|
import org.openide.util.Exceptions; |
|
|
|
import org.openide.util.Lookup; |
|
|
|
import org.openide.util.Lookup; |
|
|
|
import org.openide.util.NbBundle.Messages; |
|
|
|
import org.openide.util.NbBundle.Messages; |
|
|
|
import org.openide.util.lookup.AbstractLookup; |
|
|
|
|
|
|
|
import org.openide.util.lookup.InstanceContent; |
|
|
|
|
|
|
|
import org.openide.util.lookup.ProxyLookup; |
|
|
|
|
|
|
|
import org.openide.windows.TopComponent; |
|
|
|
import org.openide.windows.TopComponent; |
|
|
|
import org.xml.sax.SAXException; |
|
|
|
import org.xml.sax.SAXException; |
|
|
|
|
|
|
|
import sun.rmi.runtime.Log; |
|
|
|
|
|
|
|
|
|
|
|
@MultiViewElement.Registration( |
|
|
|
@MultiViewElement.Registration( |
|
|
|
displayName = "#LBL_NiftyGui_VISUAL", |
|
|
|
displayName = "#LBL_NiftyGui_VISUAL", |
|
|
@ -71,7 +66,7 @@ import org.xml.sax.SAXException; |
|
|
|
preferredID = "NiftyGuiVisual", |
|
|
|
preferredID = "NiftyGuiVisual", |
|
|
|
position = 2000) |
|
|
|
position = 2000) |
|
|
|
@Messages("LBL_NiftyGui_VISUAL=Visual") |
|
|
|
@Messages("LBL_NiftyGui_VISUAL=Visual") |
|
|
|
public final class NiftyGuiVisualElement extends JPanel implements MultiViewElement , ExplorerManager.Provider,Observer { |
|
|
|
public final class NiftyGuiVisualElement extends JPanel implements MultiViewElement , ExplorerManager.Provider,Observer, PropertyChangeListener { |
|
|
|
|
|
|
|
|
|
|
|
private NiftyGuiDataObject obj; |
|
|
|
private NiftyGuiDataObject obj; |
|
|
|
private JToolBar toolbar = new JToolBar(); |
|
|
|
private JToolBar toolbar = new JToolBar(); |
|
|
@ -81,6 +76,8 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
private final J2DNiftyView view; |
|
|
|
private final J2DNiftyView view; |
|
|
|
private final JComboBox layers = new JComboBox(); |
|
|
|
private final JComboBox layers = new JComboBox(); |
|
|
|
private final ExplorerManager nodesManager; |
|
|
|
private final ExplorerManager nodesManager; |
|
|
|
|
|
|
|
private final UndoRedo.Manager undoSupport; |
|
|
|
|
|
|
|
private int guiID; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public NiftyGuiVisualElement(Lookup lkp) { |
|
|
|
public NiftyGuiVisualElement(Lookup lkp) { |
|
|
@ -94,15 +91,16 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
TrasferHandling tranf = new TrasferHandling(); |
|
|
|
TrasferHandling tranf = new TrasferHandling(); |
|
|
|
PaletteDropTarget tmp = new PaletteDropTarget(); |
|
|
|
PaletteDropTarget tmp = new PaletteDropTarget(); |
|
|
|
editor = obj.getLookup().lookup(GUIEditor.class); |
|
|
|
editor = obj.getLookup().lookup(GUIEditor.class); |
|
|
|
editor.addObserver(this); |
|
|
|
|
|
|
|
nodesManager = new ExplorerManager(); |
|
|
|
nodesManager = new ExplorerManager(); |
|
|
|
nifty = view.getNifty(); |
|
|
|
nifty = view.getNifty(); |
|
|
|
view.setTransferHandler(tranf); |
|
|
|
view.setTransferHandler(tranf); |
|
|
|
view.setDropTarget(tmp); |
|
|
|
view.setDropTarget(tmp); |
|
|
|
editor.addObserver(view); |
|
|
|
// editor.addObserver(view);
|
|
|
|
editor.addObserver(tranf); |
|
|
|
// editor.addObserver(tranf);
|
|
|
|
editor.addObserver(tmp); |
|
|
|
this.obj.addPropertyChangeListener(this); |
|
|
|
this.createToolbar(); |
|
|
|
this.createToolbar(); |
|
|
|
|
|
|
|
this.undoSupport = new UndoRedo.Manager(); |
|
|
|
|
|
|
|
CommandProcessor.getInstance().setUndoManager(undoSupport); |
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Old code |
|
|
|
* Old code |
|
|
@ -112,6 +110,7 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
toolbar.setPreferredSize(new Dimension(10000, 24)); |
|
|
|
toolbar.setPreferredSize(new Dimension(10000, 24)); |
|
|
|
toolbar.setMaximumSize(new Dimension(10000, 24)); |
|
|
|
toolbar.setMaximumSize(new Dimension(10000, 24)); |
|
|
|
toolbar.setFloatable(false); |
|
|
|
toolbar.setFloatable(false); |
|
|
|
|
|
|
|
toolbar.add(new JLabel("Change Resolution")); |
|
|
|
JComboBox comboBox = new JComboBox(new String[]{"640x480", "480x800", "800x480", "800x600", "1024x768", "1280x720"}); |
|
|
|
JComboBox comboBox = new JComboBox(new String[]{"640x480", "480x800", "800x480", "800x600", "1024x768", "1280x720"}); |
|
|
|
comboBox.addItemListener(new ItemListener() { |
|
|
|
comboBox.addItemListener(new ItemListener() { |
|
|
|
|
|
|
|
|
|
|
@ -136,6 +135,7 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
}); |
|
|
|
}); |
|
|
|
toolbar.add(comboBox); |
|
|
|
toolbar.add(comboBox); |
|
|
|
comboBox.setSelectedItem("800x600"); |
|
|
|
comboBox.setSelectedItem("800x600"); |
|
|
|
|
|
|
|
toolbar.add(new JLabel("Current Layer")); |
|
|
|
layers.addItemListener(new ItemListener() { |
|
|
|
layers.addItemListener(new ItemListener() { |
|
|
|
|
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
@ -191,74 +191,22 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void componentOpened() { |
|
|
|
public void componentOpened() { |
|
|
|
try { |
|
|
|
loadGui(); |
|
|
|
ProgressHandle handle = ProgressHandleFactory.createHandle("Loading the gui file"); |
|
|
|
|
|
|
|
String path = this.obj.getPrimaryFile().getPath(); |
|
|
|
|
|
|
|
ProjectAssetManager mgr = obj.getLookup().lookup(ProjectAssetManager.class); |
|
|
|
|
|
|
|
String assetPath = mgr.getAssetFolder().getPath(); |
|
|
|
|
|
|
|
handle.progress(50); |
|
|
|
|
|
|
|
this.editor.createNewGui(nifty,new File(path),new File(assetPath)); |
|
|
|
|
|
|
|
nodesManager.setRootContext(new GUINode(this.editor.getGui())); |
|
|
|
|
|
|
|
Collection<GLayer> layers1 = this.editor.getGui().getLayers(); |
|
|
|
|
|
|
|
DefaultComboBoxModel<GLayer> model = new DefaultComboBoxModel<GLayer>(layers1.toArray(new GLayer[0])); |
|
|
|
|
|
|
|
layers.setModel(model); |
|
|
|
|
|
|
|
layers.setSelectedItem(this.editor.getCurrentLayer()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handle.finish(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (ParserConfigurationException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (JAXBException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (ClassNotFoundException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (IOException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (NoProductException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (SAXException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void componentClosed() { |
|
|
|
public void componentClosed() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Raw implementation , just to prototype the editor |
|
|
|
* Raw implementation , just to prototype the editor |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void componentShowing() { |
|
|
|
public void componentShowing() { |
|
|
|
try { |
|
|
|
if(!this.obj.isModified()){ |
|
|
|
ProgressHandle handle = ProgressHandleFactory.createHandle("Loading the gui file"); |
|
|
|
return; |
|
|
|
String path = this.obj.getPrimaryFile().getPath(); |
|
|
|
|
|
|
|
ProjectAssetManager mgr = this.obj.getLookup().lookup(ProjectAssetManager.class); |
|
|
|
|
|
|
|
String assetPath = mgr.getAssetFolder().getPath(); |
|
|
|
|
|
|
|
this.editor.createNewGui(nifty,new File(path),new File(assetPath)); |
|
|
|
|
|
|
|
nodesManager.setRootContext(new GUINode(this.editor.getGui())); |
|
|
|
|
|
|
|
Collection<GLayer> layers1 = this.editor.getGui().getLayers(); |
|
|
|
|
|
|
|
DefaultComboBoxModel<GLayer> model = new DefaultComboBoxModel<GLayer>(layers1.toArray(new GLayer[0])); |
|
|
|
|
|
|
|
layers.setModel(model); |
|
|
|
|
|
|
|
layers.setSelectedItem(this.editor.getCurrentLayer()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handle.finish(); |
|
|
|
|
|
|
|
} catch (ParserConfigurationException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (JAXBException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (ClassNotFoundException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (IOException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (NoProductException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (SAXException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
loadGui(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
/** |
|
|
@ -273,11 +221,16 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
} catch (JAXBException ex) { |
|
|
|
} catch (JAXBException ex) { |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (NullPointerException ex){ |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void componentActivated() { |
|
|
|
public void componentActivated() { |
|
|
|
|
|
|
|
GuiEditorModel model = (GuiEditorModel) CommandProcessor.getInstance().getObservable(); |
|
|
|
|
|
|
|
model.setCurrentGUI(guiID); |
|
|
|
|
|
|
|
CommandProcessor.getInstance().setUndoManager(undoSupport); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -286,7 +239,7 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public UndoRedo getUndoRedo() { |
|
|
|
public UndoRedo getUndoRedo() { |
|
|
|
return UndoRedo.NONE; |
|
|
|
return this.undoSupport; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -306,10 +259,13 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void update(Observable o, Object arg) { |
|
|
|
public void update(Observable o, Object arg) { |
|
|
|
jada.ngeditor.listeners.actions.Action act = ( jada.ngeditor.listeners.actions.Action) arg; |
|
|
|
if(arg instanceof SelectionChanged ){ |
|
|
|
if(act.getType() == jada.ngeditor.listeners.actions.Action.SEL){ |
|
|
|
SelectionChanged event = (SelectionChanged) arg; |
|
|
|
|
|
|
|
if(event.getNewSelection().isEmpty()){ |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
ArrayList<String> path = new ArrayList<String>(); |
|
|
|
ArrayList<String> path = new ArrayList<String>(); |
|
|
|
GElement parent = act.getGUIElement(); |
|
|
|
GElement parent = event.getElement(); |
|
|
|
while(parent!=null){ |
|
|
|
while(parent!=null){ |
|
|
|
path.add(parent.getID()); |
|
|
|
path.add(parent.getID()); |
|
|
|
parent = parent.getParent(); |
|
|
|
parent = parent.getParent(); |
|
|
@ -329,4 +285,51 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void propertyChange(PropertyChangeEvent evt) { |
|
|
|
|
|
|
|
if(evt.getPropertyName().equals(DataObject.PROP_MODIFIED)){ |
|
|
|
|
|
|
|
boolean old = (Boolean)evt.getOldValue(); |
|
|
|
|
|
|
|
boolean nev = (Boolean)evt.getNewValue(); |
|
|
|
|
|
|
|
if(old && !nev){ |
|
|
|
|
|
|
|
this.loadGui(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void loadGui() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
ProgressHandle handle = ProgressHandleFactory.createHandle("Loading the gui file"); |
|
|
|
|
|
|
|
InputStream is = this.obj.getPrimaryFile().getInputStream(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProjectAssetManager mgr = this.obj.getLookup().lookup(ProjectAssetManager.class); |
|
|
|
|
|
|
|
String assetPath = mgr.getAssetFolder().getPath(); |
|
|
|
|
|
|
|
this.editor.createNewGui(nifty,is,new File(assetPath)); |
|
|
|
|
|
|
|
this.view.newGui(this.editor.getGui()); |
|
|
|
|
|
|
|
nodesManager.setRootContext(new GUINode(this.editor.getGui())); |
|
|
|
|
|
|
|
this.editor.getGui().getSelection().addObserver(this); |
|
|
|
|
|
|
|
Collection<GLayer> layers1 = this.editor.getGui().getLayers(); |
|
|
|
|
|
|
|
guiID = this.editor.getGui().getGUIid(); |
|
|
|
|
|
|
|
DefaultComboBoxModel<GLayer> model = new DefaultComboBoxModel<GLayer>(layers1.toArray(new GLayer[0])); |
|
|
|
|
|
|
|
layers.setModel(model); |
|
|
|
|
|
|
|
layers.setSelectedItem(this.editor.getCurrentLayer()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handle.finish(); |
|
|
|
|
|
|
|
} catch (ParserConfigurationException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (JAXBException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (ClassNotFoundException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (IOException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (NoProductException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (SAXException ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
Exceptions.printStackTrace(ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|