|
| 1 | +/* |
| 2 | + * Copyright (c) 2019- jMonkeyEngine |
| 3 | + * All rights reserved. |
| 4 | + * |
| 5 | + * Redistribution and use in source and binary forms, with or without |
| 6 | + * modification, are permitted provided that the following conditions are |
| 7 | + * met: |
| 8 | + * |
| 9 | + * * Redistributions of source code must retain the above copyright |
| 10 | + * notice, this list of conditions and the following disclaimer. |
| 11 | + * |
| 12 | + * * Redistributions in binary form must reproduce the above copyright |
| 13 | + * notice, this list of conditions and the following disclaimer in the |
| 14 | + * documentation and/or other materials provided with the distribution. |
| 15 | + * |
| 16 | + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors |
| 17 | + * may be used to endorse or promote products derived from this software |
| 18 | + * without specific prior written permission. |
| 19 | + * |
| 20 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 22 | + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 23 | + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 24 | + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 25 | + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 26 | + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 27 | + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 28 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 29 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 30 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | + */ |
| 32 | +package com.jme3.gde.core.sceneexplorer.nodes.primitives; |
| 33 | + |
| 34 | +import com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel; |
| 35 | + |
| 36 | +/** |
| 37 | + * This is the Panel which creates a new Primitive (Sphere) |
| 38 | + * |
| 39 | + * @author MeFisto94 |
| 40 | + */ |
| 41 | +public class CreateWireSpherePanel extends javax.swing.JPanel { |
| 42 | + |
| 43 | + /** |
| 44 | + * Creates new form CreateBoxPanel |
| 45 | + */ |
| 46 | + public CreateWireSpherePanel() { |
| 47 | + initComponents(); |
| 48 | + } |
| 49 | + |
| 50 | + public AbstractNewGeometryPanel getNewGeomPanel() { |
| 51 | + return abstractNewGeometryPanel1; |
| 52 | + } |
| 53 | + |
| 54 | + public float getRadius() { |
| 55 | + return (float) spinnerRadius.getValue(); |
| 56 | + } |
| 57 | + |
| 58 | + /** |
| 59 | + * This method is called from within the constructor to initialize the form. |
| 60 | + * WARNING: Do NOT modify this code. The content of this method is always |
| 61 | + * regenerated by the Form Editor. |
| 62 | + */ |
| 63 | + @SuppressWarnings("unchecked") |
| 64 | + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
| 65 | + private void initComponents() { |
| 66 | + |
| 67 | + abstractNewGeometryPanel1 = new com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel(); |
| 68 | + jPanel1 = new javax.swing.JPanel(); |
| 69 | + spinnerRadius = new javax.swing.JSpinner(); |
| 70 | + lblRadius = new javax.swing.JLabel(); |
| 71 | + |
| 72 | + abstractNewGeometryPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateWireSpherePanel.class, "CreateWireSpherePanel.abstractNewGeometryPanel1.border.title"))); // NOI18N |
| 73 | + |
| 74 | + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateWireSpherePanel.class, "CreateWireSpherePanel.jPanel1.border.title"))); // NOI18N |
| 75 | + |
| 76 | + spinnerRadius.setModel(new javax.swing.SpinnerNumberModel(0.5f, null, null, 0.01f)); |
| 77 | + |
| 78 | + org.openide.awt.Mnemonics.setLocalizedText(lblRadius, org.openide.util.NbBundle.getMessage(CreateWireSpherePanel.class, "CreateWireSpherePanel.lblRadius.text")); // NOI18N |
| 79 | + lblRadius.setToolTipText(org.openide.util.NbBundle.getMessage(CreateWireSpherePanel.class, "CreateWireSpherePanel.lblRadius.toolTipText")); // NOI18N |
| 80 | + lblRadius.setName(""); // NOI18N |
| 81 | + |
| 82 | + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
| 83 | + jPanel1.setLayout(jPanel1Layout); |
| 84 | + jPanel1Layout.setHorizontalGroup( |
| 85 | + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 86 | + .addGroup(jPanel1Layout.createSequentialGroup() |
| 87 | + .addContainerGap() |
| 88 | + .addComponent(lblRadius) |
| 89 | + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
| 90 | + .addComponent(spinnerRadius, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) |
| 91 | + .addContainerGap()) |
| 92 | + ); |
| 93 | + jPanel1Layout.setVerticalGroup( |
| 94 | + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 95 | + .addGroup(jPanel1Layout.createSequentialGroup() |
| 96 | + .addContainerGap() |
| 97 | + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
| 98 | + .addComponent(spinnerRadius, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
| 99 | + .addComponent(lblRadius)) |
| 100 | + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
| 101 | + ); |
| 102 | + |
| 103 | + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); |
| 104 | + this.setLayout(layout); |
| 105 | + layout.setHorizontalGroup( |
| 106 | + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 107 | + .addGroup(layout.createSequentialGroup() |
| 108 | + .addContainerGap() |
| 109 | + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) |
| 110 | + .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 111 | + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
| 112 | + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
| 113 | + ); |
| 114 | + layout.setVerticalGroup( |
| 115 | + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 116 | + .addGroup(layout.createSequentialGroup() |
| 117 | + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 118 | + .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
| 119 | + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
| 120 | + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) |
| 121 | + ); |
| 122 | + }// </editor-fold>//GEN-END:initComponents |
| 123 | + |
| 124 | + // Variables declaration - do not modify//GEN-BEGIN:variables |
| 125 | + private com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel abstractNewGeometryPanel1; |
| 126 | + private javax.swing.JPanel jPanel1; |
| 127 | + private javax.swing.JLabel lblRadius; |
| 128 | + private javax.swing.JSpinner spinnerRadius; |
| 129 | + // End of variables declaration//GEN-END:variables |
| 130 | +} |
0 commit comments