|
|
@ -27,6 +27,7 @@ import java.util.List; |
|
|
|
import java.util.Map.Entry; |
|
|
|
import java.util.Map.Entry; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.logging.Logger; |
|
|
|
import java.util.logging.Logger; |
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
import org.openide.loaders.DataObjectNotFoundException; |
|
|
|
import org.openide.loaders.DataObjectNotFoundException; |
|
|
@ -101,15 +102,10 @@ public final class MaterialEditorTopComponent extends CloneableTopComponent impl |
|
|
|
materialPreviewWidget1.showMaterial(manager, materialFileName); |
|
|
|
materialPreviewWidget1.showMaterial(manager, materialFileName); |
|
|
|
|
|
|
|
|
|
|
|
relativeMaterialFileName = manager.getRelativeAssetPath(materialFileName); |
|
|
|
relativeMaterialFileName = manager.getRelativeAssetPath(materialFileName); |
|
|
|
for (Iterator it = WindowManager.getDefault().getModes().iterator(); it.hasNext();) { |
|
|
|
|
|
|
|
Mode mode = (Mode) it.next(); |
|
|
|
|
|
|
|
System.out.println(mode.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** This method is called from within the constructor to |
|
|
|
/** This method is called from within the constructor to |
|
|
|
* initialize the form. |
|
|
|
* initialize the form. |
|
|
|
* WARNING: Do NOT modify this code. The content of this method is |
|
|
|
* WARNING: Do NOT modify this code. The content of this method is |
|
|
@ -337,7 +333,6 @@ public final class MaterialEditorTopComponent extends CloneableTopComponent impl |
|
|
|
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
|
|
|
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
|
|
|
saveImmediate = jCheckBox1.isSelected(); |
|
|
|
saveImmediate = jCheckBox1.isSelected(); |
|
|
|
}//GEN-LAST:event_jCheckBox1ActionPerformed
|
|
|
|
}//GEN-LAST:event_jCheckBox1ActionPerformed
|
|
|
|
|
|
|
|
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
|
private javax.swing.JCheckBox jCheckBox1; |
|
|
|
private javax.swing.JCheckBox jCheckBox1; |
|
|
|
private javax.swing.JComboBox jComboBox1; |
|
|
|
private javax.swing.JComboBox jComboBox1; |
|
|
@ -416,8 +411,16 @@ public final class MaterialEditorTopComponent extends CloneableTopComponent impl |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void componentClosed() { |
|
|
|
public void componentClosed() { |
|
|
|
materialPreviewWidget1.cleanUp(); |
|
|
|
materialPreviewWidget1.cleanUp(); |
|
|
|
|
|
|
|
for (int i = 0; i < texturePanel.getComponentCount(); i++) { |
|
|
|
|
|
|
|
Component c = texturePanel.getComponent(i); |
|
|
|
|
|
|
|
if (c instanceof MaterialPropertyWidget) { |
|
|
|
|
|
|
|
((MaterialPropertyWidget) c).cleanUp(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
clearMaterialChangeListeners(); |
|
|
|
clearMaterialChangeListeners(); |
|
|
|
SceneExplorerTopComponent.getDefault().removeMaterialChangeProvider(this); |
|
|
|
SceneExplorerTopComponent.getDefault().removeMaterialChangeProvider(this); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void writeProperties(java.util.Properties p) { |
|
|
|
void writeProperties(java.util.Properties p) { |
|
|
@ -568,7 +571,7 @@ public final class MaterialEditorTopComponent extends CloneableTopComponent impl |
|
|
|
widget.registerChangeListener(this); |
|
|
|
widget.registerChangeListener(this); |
|
|
|
if ("Boolean".equals(entry.getValue().getType())) { |
|
|
|
if ("Boolean".equals(entry.getValue().getType())) { |
|
|
|
optionList.add(widget); |
|
|
|
optionList.add(widget); |
|
|
|
} else if ("Texture2D".equals(entry.getValue().getType())) { |
|
|
|
} else if (entry.getValue().getType().indexOf("Texture") >= 0) { |
|
|
|
textureList.add(widget); |
|
|
|
textureList.add(widget); |
|
|
|
} else if ("Color".equals(entry.getValue().getType())) { |
|
|
|
} else if ("Color".equals(entry.getValue().getType())) { |
|
|
|
colorList.add(widget); |
|
|
|
colorList.add(widget); |
|
|
|