-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/0.8.8'
- Loading branch information
Showing
149 changed files
with
2,573 additions
and
462 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/com/ss/editor/control/scene/ControlEditableGenericObjectFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.ss.editor.control.scene; | ||
|
||
import com.jme3.animation.AnimControl; | ||
import com.ss.editor.control.scene.impl.AnimControlEditableGenericObject; | ||
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObject; | ||
import com.ss.editor.ui.control.model.property.builder.impl.generic.EditableGenericObjectFactory; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.function.Function; | ||
|
||
import rlib.util.dictionary.DictionaryFactory; | ||
import rlib.util.dictionary.ObjectDictionary; | ||
|
||
/** | ||
* The implementation of the {@link EditableGenericObjectFactory} for making an editable object of default jME | ||
* controls. | ||
* | ||
* @author JavaSaBr | ||
*/ | ||
public class ControlEditableGenericObjectFactory implements EditableGenericObjectFactory { | ||
|
||
private static final ObjectDictionary<Class<?>, Function<Object, EditableGenericObject>> CONSTRUCTORS = | ||
DictionaryFactory.newObjectDictionary(); | ||
|
||
static { | ||
CONSTRUCTORS.put(AnimControl.class, object -> new AnimControlEditableGenericObject((AnimControl) object)); | ||
} | ||
|
||
private static final EditableGenericObjectFactory INSTANCE = new ControlEditableGenericObjectFactory(); | ||
|
||
public static EditableGenericObjectFactory getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public EditableGenericObject make(@NotNull final Object object) { | ||
final Function<Object, EditableGenericObject> constructor = CONSTRUCTORS.get(object.getClass()); | ||
return constructor != null ? constructor.apply(object) : null; | ||
} | ||
} |
Oops, something went wrong.