SDK:
- make AudioTrackVisualPanel not fail when no audio node is available git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9816 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
b545fffcbd
commit
8aa330f94f
@ -62,7 +62,11 @@ public final class AudioTrackVisualPanel1 extends JPanel {
|
|||||||
jComboBox1.setRenderer(new ListCellRenderer() {
|
jComboBox1.setRenderer(new ListCellRenderer() {
|
||||||
|
|
||||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
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));
|
jSlider1.setMaximum((int) (animation.getLookup().lookup(Animation.class).getLength() * 100));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user