|
|
|
@ -48,7 +48,9 @@ public final class EffectTrackVisualPanel1 extends JPanel { |
|
|
|
|
Spatial rootNode; |
|
|
|
|
JmeAnimation animation; |
|
|
|
|
|
|
|
|
|
/** Creates new form EffectTrackVisualPanel1 */ |
|
|
|
|
/** |
|
|
|
|
* Creates new form EffectTrackVisualPanel1 |
|
|
|
|
*/ |
|
|
|
|
public EffectTrackVisualPanel1(Spatial rootNode, JmeAnimation animation) { |
|
|
|
|
this.rootNode = rootNode; |
|
|
|
|
this.animation = animation; |
|
|
|
@ -59,9 +61,12 @@ public final class EffectTrackVisualPanel1 extends JPanel { |
|
|
|
|
populateModel(rootNode, model); |
|
|
|
|
jComboBox1.setModel(model); |
|
|
|
|
jComboBox1.setRenderer(new ListCellRenderer() { |
|
|
|
|
|
|
|
|
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
|
|
|
return new JLabel(((Spatial) value).getName()); |
|
|
|
|
if (value instanceof Spatial) { |
|
|
|
|
return new JLabel(((Spatial) value).getName()); |
|
|
|
|
} else{ |
|
|
|
|
return new JLabel("?"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
jSlider1.setMaximum((int) (animation.getLookup().lookup(Animation.class).getLength() * 100)); |
|
|
|
@ -91,10 +96,10 @@ public final class EffectTrackVisualPanel1 extends JPanel { |
|
|
|
|
return (float) jSlider1.getValue() / 100f; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 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. |
|
|
|
|
/** |
|
|
|
|
* 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. |
|
|
|
|
*/ |
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
|
|
|
private void initComponents() { |
|
|
|
|