瀏覽代碼

forgot to commit texturepanel

rickard 2 年之前
父節點
當前提交
7053b6df35
共有 1 個文件被更改,包括 13 次插入4 次删除
  1. 13 4
      jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/TexturePanel.java

+ 13 - 4
jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/TexturePanel.java

@@ -32,14 +32,21 @@ import java.util.logging.Logger;
  */
 public class TexturePanel extends MaterialPropertyWidget {
 
-    private final TexturePropertyEditor editor;
-    private final ProjectAssetManager manager;
+    private TexturePropertyEditor editor;
+    private ProjectAssetManager manager;
     private boolean flip = false;
     private boolean repeat = false;
     protected String textureName = null; // always enclosed with ""
     private TexturePreview texPreview;
     private final ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
 
+    /**
+     * Used by tests
+     */
+    protected TexturePanel() {
+        
+    }
+    
     /**
      * Creates new form SelectionPanel
      */
@@ -67,12 +74,14 @@ public class TexturePanel extends MaterialPropertyWidget {
         }
     }
 
-    private String extractTextureName(String textureName) {
+    // visible for tests
+    protected String extractTextureName(String textureName) {
         final String[] textureNameComponents = textureName.split("\"");
         return textureNameComponents[textureNameComponents.length - 1];
     }
 
-    private void updateFlipRepeat() {
+    // visible for tests
+    protected void updateFlipRepeat() {
         String propertyValue = property.getValue();
         propertyValue = propertyValue.replaceFirst(textureName, "");
         if (flip && !propertyValue.contains("Flip ")) {