diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/Computer_File_043.gif b/sdk/jme3-gui/src/com/jme3/gde/gui/Computer_File_043.gif deleted file mode 100644 index 421d54335..000000000 Binary files a/sdk/jme3-gui/src/com/jme3/gde/gui/Computer_File_043.gif and /dev/null differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/EmptyNiftyGui.xml b/sdk/jme3-gui/src/com/jme3/gde/gui/EmptyNiftyGui.xml deleted file mode 100644 index 4627e7ff5..000000000 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/EmptyNiftyGui.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/Navigator.java b/sdk/jme3-gui/src/com/jme3/gde/gui/Navigator.java deleted file mode 100644 index 60aecd474..000000000 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/Navigator.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.jme3.gde.gui; - -import com.jme3.gde.gui.nodes.GElementNode; -import com.jme3.gde.gui.nodes.GUINode; -import jada.ngeditor.controller.CommandProcessor; -import jada.ngeditor.controller.GUIEditor; -import jada.ngeditor.controller.commands.SelectCommand; -import jada.ngeditor.listeners.events.SelectionChanged; -import jada.ngeditor.model.GUI; -import jada.ngeditor.model.GuiEditorModel; -import jada.ngeditor.model.elements.GElement; -import java.awt.BorderLayout; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.beans.PropertyVetoException; -import java.util.ArrayList; -import java.util.Observable; -import java.util.Observer; -import javax.swing.JComponent; -import org.netbeans.spi.navigator.NavigatorPanel; -import org.openide.explorer.ExplorerManager; -import org.openide.explorer.ExplorerUtils; -import org.openide.explorer.view.BeanTreeView; -import org.openide.nodes.AbstractNode; -import org.openide.nodes.Node; -import org.openide.util.Exceptions; -import org.openide.util.Lookup; -import org.openide.util.lookup.ProxyLookup; - -/** - * - * @author cris - */ -@NavigatorPanel.Registration(mimeType = "text/x-niftygui+xml", displayName="Gui View") -public class Navigator extends javax.swing.JPanel implements NavigatorPanel,ExplorerManager.Provider , Observer, PropertyChangeListener{ - private Lookup lookup; - private ExplorerManager mgr = new ExplorerManager(); - private final BeanTreeView beanTreeView; - /** - * Creates new form Navigator - */ - public Navigator() { - initComponents(); - setLayout(new BorderLayout()); - beanTreeView = new BeanTreeView(); - add(beanTreeView, BorderLayout.CENTER); - final GuiEditorModel model = (GuiEditorModel) CommandProcessor.getInstance().getObservable(); - model.addObserver(this); - if(model.getCurrent() != null){ - try { - this.intNavigator(model.getCurrent()); - } catch (PropertyVetoException ex) { - Exceptions.printStackTrace(ex); - } - } - - - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 244, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 274, Short.MAX_VALUE) - ); - }// //GEN-END:initComponents - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - - @Override - public String getDisplayName() { - return "GuiView"; - } - - @Override - public String getDisplayHint() { - return "Easy view for your gui"; - } - - @Override - public JComponent getComponent() { - return this; - } - - @Override - public void panelActivated(Lookup context) { - - } - - @Override - public void panelDeactivated() { - ExplorerUtils.activateActions(mgr, false); - } - - @Override - public Lookup getLookup() { - return lookup; - } - - @Override - public ExplorerManager getExplorerManager() { - return mgr; - } - - @Override - public void update(Observable o, Object arg) { - if(o instanceof GuiEditorModel){ - try { - GuiEditorModel model = (GuiEditorModel) o; - model.getCurrent().addObserver(this); - model.getCurrent().getSelection().addObserver(this); - this.intNavigator(model.getCurrent()); - } catch (PropertyVetoException ex) { - Exceptions.printStackTrace(ex); - } - } - - if(arg instanceof SelectionChanged){ - SelectionChanged event = (SelectionChanged) arg; - if(event.getNewSelection().isEmpty()){ - return; - } - ArrayList path = new ArrayList(); - GElement parent = ((SelectionChanged)arg).getElement(); - while(parent!=null){ - path.add(parent.getID()); - parent = parent.getParent(); - } - Node result = mgr.getRootContext(); - for(int i=path.size()-1;i>=0;i--){ - result = result.getChildren().findChild(path.get(i)); - } - try { - mgr.setSelectedNodes(new Node[]{result}); - } catch (PropertyVetoException ex) { - Exceptions.printStackTrace(ex); - } - } - beanTreeView.updateUI(); - } - - @Override - public void propertyChange(PropertyChangeEvent evt) { - if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) { - Node[] newValue = (Node[]) evt.getNewValue(); - if (newValue.length > 0) { - AbstractNode firstSelected = (AbstractNode) newValue[0]; - if (firstSelected instanceof GElementNode) { - GElement element = ((GElementNode) firstSelected).getGelement(); - GUI gui = ((GUINode)mgr.getRootContext()).getGui(); - gui.getSelection().deleteObserver(this); // I don't wont to get notified about this selection change - SelectCommand command = CommandProcessor.getInstance().getCommand(SelectCommand.class); - command.setElement(element); - try { - CommandProcessor.getInstance().excuteCommand(command); - } catch (Exception ex) { - Exceptions.printStackTrace(ex); - } - gui.getSelection().addObserver(this); - - } - } - } - } - - - private void intNavigator(GUI gui) throws PropertyVetoException { - - - ExplorerUtils.activateActions(mgr, true); - - - AbstractNode guiRoot = new GUINode(gui); - guiRoot.setName("Gui"); - this.mgr.setRootContext(guiRoot); - this.beanTreeView.updateUI(); - mgr.addPropertyChangeListener(this); - this.mgr.setSelectedNodes(new Node[]{guiRoot}); - Lookup lookup1 = ExplorerUtils.createLookup(mgr, getActionMap()); - lookup = new ProxyLookup(lookup1); - - } -} diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGui.xml b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGui.xml deleted file mode 100644 index ec0bd6e31..000000000 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGui.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java index 1c5bc7446..32a62ff5e 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java @@ -36,7 +36,7 @@ import org.openide.windows.TopComponent; resource = "NiftyGuiResolver.xml") @DataObject.Registration( mimeType = "text/x-niftygui+xml", - iconBase = "com/jme3/gde/gui/multiview/icons/Computer_File_043.gif", + iconBase = "com/jme3/gde/gui/multiview/icons/gui-icon.png", displayName = "#LBL_NiftyGui_LOADER", position = 300) @ActionReferences({ @@ -125,7 +125,7 @@ public class NiftyGuiDataObject extends MultiDataObject { @Override protected Node createNodeDelegate() { DataNode node = new DataNode(this, Children.LEAF, getLookup()); - node.setIconBaseWithExtension("com/jme3/gde/gui/multiview/icons/Computer_File_043.gif"); + node.setIconBaseWithExtension("com/jme3/gde/gui/multiview/icons/gui-icon.png"); return node; } @@ -136,7 +136,7 @@ public class NiftyGuiDataObject extends MultiDataObject { @MultiViewElement.Registration( displayName = "#LBL_NiftyGui_EDITOR", - iconBase = "com/jme3/gde/gui/multiview/icons/Computer_File_043.gif", + iconBase = "com/jme3/gde/gui/multiview/icons/gui-icon.png", mimeType = "text/x-niftygui+xml", persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED, preferredID = "NiftyGui", diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiVisualElement.java b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiVisualElement.java deleted file mode 100644 index b01fef391..000000000 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiVisualElement.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.jme3.gde.gui; - -import com.jme3.app.Application; -import com.jme3.gde.core.assets.ProjectAssetManager; -import com.jme3.gde.gui.nodes.GElementNode; -import com.jme3.gde.gui.nodes.GUINode; -import de.lessvoid.nifty.Nifty; -import jada.ngeditor.controller.CommandProcessor; -import jada.ngeditor.controller.GUIEditor; -import jada.ngeditor.guiviews.DND.PaletteDropTarget; -import jada.ngeditor.guiviews.DND.TrasferHandling; -import jada.ngeditor.guiviews.J2DNiftyView; -import jada.ngeditor.listeners.events.SelectionChanged; -import jada.ngeditor.model.GUI; -import jada.ngeditor.model.GuiEditorModel; -import jada.ngeditor.model.elements.GElement; -import jada.ngeditor.model.elements.GLayer; -import jada.ngeditor.model.exception.NoProductException; -import jada.ngeditor.persistence.GUIWriter; -import java.awt.Dimension; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.beans.PropertyVetoException; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.Observable; -import java.util.Observer; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.swing.Action; -import javax.swing.ActionMap; -import javax.swing.DefaultComboBoxModel; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JToolBar; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; -import org.netbeans.api.progress.ProgressHandle; -import org.netbeans.api.progress.ProgressHandleFactory; -import org.netbeans.core.spi.multiview.CloseOperationState; -import org.netbeans.core.spi.multiview.MultiViewElement; -import org.netbeans.core.spi.multiview.MultiViewElementCallback; -import org.netbeans.spi.actions.AbstractSavable; -import org.openide.awt.UndoRedo; -import org.openide.explorer.ExplorerManager; -import org.openide.explorer.ExplorerUtils; -import org.openide.loaders.DataObject; -import org.openide.nodes.Node; -import org.openide.util.Exceptions; -import org.openide.util.Lookup; -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.xml.sax.SAXException; -import sun.rmi.runtime.Log; - -@MultiViewElement.Registration( - displayName = "#LBL_NiftyGui_VISUAL", - iconBase = "com/jme3/gde/gui/Computer_File_043.gif", - mimeType = "text/x-niftygui+xml", - persistenceType = TopComponent.PERSISTENCE_NEVER, - preferredID = "NiftyGuiVisual", - position = 2000) -@Messages("LBL_NiftyGui_VISUAL=Visual") -public final class NiftyGuiVisualElement extends JPanel implements MultiViewElement , ExplorerManager.Provider,Observer, PropertyChangeListener { - private static final Logger logger = Logger.getLogger(NiftyGuiVisualElement.class.getName()); - private NiftyGuiDataObject obj; - private JToolBar toolbar = new JToolBar(); - private transient MultiViewElementCallback callback; - private GUIEditor editor; - private final Nifty nifty; - private final J2DNiftyView view; - private final JComboBox layers = new JComboBox(); - private final ExplorerManager nodesManager; - private final UndoRedo.Manager undoSupport; - private int guiID; - private final InstanceContent content = new InstanceContent(); - private Lookup lookup; - - public NiftyGuiVisualElement(Lookup lkp) { - obj = lkp.lookup(NiftyGuiDataObject.class); - assert obj != null; - initComponents(); - view = new J2DNiftyView(800, 600); - view.init(); - this.scrollArea.getViewport().addChangeListener(view); - this.scrollArea.setViewportView(view); - TrasferHandling tranf = new TrasferHandling(); - PaletteDropTarget tmp = new PaletteDropTarget(); - editor = obj.getLookup().lookup(GUIEditor.class); - nodesManager = new ExplorerManager(); - nifty = view.getNifty(); - view.setTransferHandler(tranf); - view.setDropTarget(tmp); - // editor.addObserver(view); - // editor.addObserver(tranf); - this.obj.addPropertyChangeListener(this); - this.createToolbar(); - this.undoSupport = new UndoRedo.Manager(); - CommandProcessor.getInstance().setUndoManager(undoSupport); - this.content.set(Collections.singleton(obj.getNodeDelegate()), null); - lookup = new AbstractLookup(content); - } - /** - * Old code - * @author normenhansen - */ - private void createToolbar() { - toolbar.setPreferredSize(new Dimension(10000, 24)); - toolbar.setMaximumSize(new Dimension(10000, 24)); - toolbar.setFloatable(false); - toolbar.add(new JLabel("Change Resolution")); - JComboBox comboBox = new JComboBox(new String[]{"640x480", "480x800", "800x480", "800x600", "1024x768", "1280x720"}); - comboBox.addItemListener(new ItemListener() { - - public void itemStateChanged(ItemEvent e) { - String string = (String) e.getItem(); - if ("640x480".equals(string)) { - view.setResoltion(640, 480); - } else if ("1024x768".equals(string)) { - view.setResoltion(1024, 768); - } else if ("1280x720".equals(string)) { - view.setResoltion(1280, 720); - } else if ("800x600".equals(string)) { - view.setResoltion(800, 600); - } else if ("800x480".equals(string)) { - view.setResoltion(800, 480); - } else if ("480x800".equals(string)) { - view.setResoltion(480, 800); - } else { - view.setResoltion(800, 600); - } - } - }); - toolbar.add(comboBox); - comboBox.setSelectedItem("800x600"); - toolbar.add(new JLabel("Current Layer")); - layers.addItemListener(new ItemListener() { - - public void itemStateChanged(ItemEvent e) { - GLayer item = (GLayer) e.getItem(); - editor.selectElement(item); - } - }); - toolbar.add(layers); - } - @Override - public String getName() { - return "NiftyGuiVisualElement"; - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - - scrollArea = new javax.swing.JScrollPane(); - - setLayout(new java.awt.BorderLayout()); - add(scrollArea, java.awt.BorderLayout.CENTER); - }// //GEN-END:initComponents - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JScrollPane scrollArea; - // End of variables declaration//GEN-END:variables - @Override - public JComponent getVisualRepresentation() { - return this; - } - - @Override - public JComponent getToolbarRepresentation() { - return toolbar; - } - - @Override - public Action[] getActions() { - return new Action[0]; - } - - @Override - public Lookup getLookup() { - return this.lookup ; - } - /** - * Raw implementation , just to prototype the editor - */ - @Override - public void componentOpened() { - loadGui(); - } - - @Override - public void componentClosed() { - - } - /** - * Raw implementation , just to prototype the editor - */ - @Override - public void componentShowing() { - if(!this.obj.isModified()){ - return; - } - loadGui(); - - } - /** - * Raw implementation , just to prototype the editor - */ - @Override - public void componentHidden() { - String path = this.obj.getPrimaryFile().getPath(); - try { - this.editor.saveGui(path); - } catch (FileNotFoundException ex) { - Exceptions.printStackTrace(ex); - } catch (JAXBException ex) { - Exceptions.printStackTrace(ex); - } catch (NullPointerException ex){ - Exceptions.printStackTrace(ex); - } - } - - @Override - public void componentActivated() { - try{ - GuiEditorModel model = (GuiEditorModel) CommandProcessor.getInstance().getObservable(); - model.setCurrentGUI(guiID); - model.getCurrent().addObserver(this); - CommandProcessor.getInstance().setUndoManager(undoSupport); - }catch(java.lang.IllegalArgumentException ex){ - logger.log(Level.SEVERE,"Can't load your gui", ex); - } - } - - @Override - public void componentDeactivated() { - } - - @Override - public UndoRedo getUndoRedo() { - return this.undoSupport; - } - - @Override - public void setMultiViewCallback(MultiViewElementCallback callback) { - this.callback = callback; - } - - @Override - public CloseOperationState canCloseElement() { - return CloseOperationState.STATE_OK; - } - - @Override - public ExplorerManager getExplorerManager() { - return nodesManager; - } - - @Override - public void update(Observable o, Object arg) { - if(arg instanceof SelectionChanged ){ - SelectionChanged event = (SelectionChanged) arg; - if(event.getNewSelection().isEmpty()){ - return; - } - GElement parent = event.getElement(); - GElementNode node = new GElementNode(parent); - this.content.set(Collections.singleton(node), null); - - }else if(o instanceof GUI){ - //Add a save. We don't add multible savable because they cointains the same - //information about editing. - GuiSavable savable = this.lookup.lookup(GuiSavable.class); - if(savable == null){ - String path = this.obj.getPrimaryFile().getPath(); - final GuiSavable guiSavable = new NiftyGuiVisualElement.GuiSavable(((GUI)o),path); - this.content.add(guiSavable); - } - } - } - - @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(); - handle.start(); - 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 layers1 = this.editor.getGui().getLayers(); - guiID = this.editor.getGui().getGUIid(); - this.editor.getGui().addObserver(this); - DefaultComboBoxModel model = new DefaultComboBoxModel(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); - } - - - - } - - private class GuiSavable extends AbstractSavable { - private final GUI gui; - - private final String filename; - - public GuiSavable(GUI gui,String filename){ - - this.gui = gui; - this.filename = filename; - this.register(); - - - } - @Override - protected String findDisplayName() { - return "Save "+ this.gui + " changes"; - } - - @Override - protected void handleSave() throws IOException { - try { - GUIWriter writer = new GUIWriter(this.gui); - writer.writeGUI(filename); - NiftyGuiVisualElement.this.content.remove(this); - - - } catch (FileNotFoundException ex) { - Exceptions.printStackTrace(ex); - } catch (JAXBException ex) { - Exceptions.printStackTrace(ex); - } catch (ClassNotFoundException ex) { - Exceptions.printStackTrace(ex); - } - } - - @Override - public boolean equals(Object obj) { - if(obj instanceof com.jme3.gde.gui.NiftyGuiVisualElement.GuiSavable){ - return this.gui.equals(((com.jme3.gde.gui.NiftyGuiVisualElement.GuiSavable)obj).gui); - } - return false; - } - - @Override - public int hashCode() { - return this.gui.hashCode(); - } - -} -} diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GButton.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GButton.png new file mode 100644 index 000000000..32a4eeb71 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GButton.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GChat.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GChat.png new file mode 100644 index 000000000..1af30643f Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GChat.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GCheckbox.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GCheckbox.png new file mode 100644 index 000000000..07f3522a9 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GCheckbox.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GConsole.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GConsole.png new file mode 100644 index 000000000..c18df24f9 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GConsole.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDraggable.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDraggable.png new file mode 100644 index 000000000..172881f9e Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDraggable.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDropDown.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDropDown.png new file mode 100644 index 000000000..53d306e74 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDropDown.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDroppable.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDroppable.png new file mode 100644 index 000000000..fd7eb0a93 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GDroppable.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GHSlider.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GHSlider.png new file mode 100644 index 000000000..b012f5ce8 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GHSlider.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImage.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImage.png new file mode 100644 index 000000000..8f0717244 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImage.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImageSelect.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImageSelect.png new file mode 100644 index 000000000..ef098a88a Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GImageSelect.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLable.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLable.png new file mode 100644 index 000000000..2fc5ccc4f Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLable.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLayer.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLayer.png new file mode 100644 index 000000000..bc86e400b Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GLayer.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GListBox.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GListBox.png new file mode 100644 index 000000000..60a8db537 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GListBox.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GPanel.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GPanel.png new file mode 100644 index 000000000..92ea52a6b Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GPanel.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioButton.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioButton.png new file mode 100644 index 000000000..f83a25496 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioButton.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioGroup.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioGroup.png new file mode 100644 index 000000000..1d27c7cc7 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GRadioGroup.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScreen.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScreen.png new file mode 100644 index 000000000..6f28049b7 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScreen.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScrollpane.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScrollpane.png new file mode 100644 index 000000000..e1e6951b7 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GScrollpane.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTextfield.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTextfield.png new file mode 100644 index 000000000..7fc1c7f7e Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTextfield.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTree.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTree.png new file mode 100644 index 000000000..351866942 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GTree.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GVSlider.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GVSlider.png new file mode 100644 index 000000000..1b0dbc588 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GVSlider.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GWindow.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GWindow.png new file mode 100644 index 000000000..ea60171bd Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/GWindow.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/game-monitor.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/game-monitor.png new file mode 100644 index 000000000..fdb0219be Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/game-monitor.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/gui-icon.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/gui-icon.png new file mode 100644 index 000000000..b69761479 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/gui-icon.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar-horizontal.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar-horizontal.png new file mode 100644 index 000000000..f93ed8f80 Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar-horizontal.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar.png b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar.png new file mode 100644 index 000000000..709605a0b Binary files /dev/null and b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/icons/ui-scroll-bar.png differ diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GElementNode.java b/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GElementNode.java index ae4e0158a..3380b687c 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GElementNode.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GElementNode.java @@ -27,12 +27,15 @@ import sun.beans.editors.BooleanEditor; */ public class GElementNode extends AbstractNode{ private final GElement element; - + private static final String basePath="com/jme3/gde/gui/multiview/icons"; public GElementNode(GElement element) { super(Children.create(new GElementChildFactory(element), false)); this.element = element; this.setName(element.getID()); + String name = this.element.getClass().getSimpleName(); + this.setName(name); + this.setIconBaseWithExtension(basePath+"/"+name+".png"); } diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GUINode.java b/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GUINode.java index 15da0e1d5..1b041b260 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GUINode.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/nodes/GUINode.java @@ -14,10 +14,11 @@ import org.openide.nodes.Children; */ public class GUINode extends AbstractNode{ private final GUI gui; + private static final String basePath="com/jme3/gde/gui/multiview/icons"; public GUINode(GUI gui) { super(Children.create(new ScreenChildFactory(gui),false)); this.gui = gui; - + this.setIconBaseWithExtension(basePath+"/"+"game-monitor"+".png"); } /** diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/palette/WidgetNode.java b/sdk/jme3-gui/src/com/jme3/gde/gui/palette/WidgetNode.java index c4faa274e..4f6faad23 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/palette/WidgetNode.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/palette/WidgetNode.java @@ -30,18 +30,14 @@ import org.openide.util.Exceptions; */ public class WidgetNode extends AbstractNode{ private final Class clazz; - private static final String basePath="jada/ngeditor/resources"; + private static final String basePath="com/jme3/gde/gui/multiview/icons"; public WidgetNode(Class wrappedClass) { super(Children.LEAF); this.clazz = wrappedClass; String name = wrappedClass.getSimpleName(); this.setName(name); - - this.setIconBaseWithExtension(basePath+"/"+name+".png"); - - - + this.setIconBaseWithExtension(basePath+"/"+name+".png"); } @Override diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/view/NiftyGuiVisualElement.java b/sdk/jme3-gui/src/com/jme3/gde/gui/view/NiftyGuiVisualElement.java index a459a2553..3e9f0def7 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/view/NiftyGuiVisualElement.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/view/NiftyGuiVisualElement.java @@ -73,7 +73,7 @@ import sun.rmi.runtime.Log; @MultiViewElement.Registration( displayName = "#LBL_NiftyGui_VISUAL", - iconBase = "com/jme3/gde/gui/multiview/icons/Computer_File_043.gif", + iconBase = "com/jme3/gde/gui/multiview/icons/game-monitor.png", mimeType = "text/x-niftygui+xml", persistenceType = TopComponent.PERSISTENCE_NEVER, preferredID = "NiftyGuiVisual",