mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-26 14:15:35 +00:00
spelling: interface
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
committed by
Jindra Petřík
parent
09d2319354
commit
5ab36fc4fc
@@ -55,7 +55,7 @@ public abstract class AbstractPropertyField<E> extends JPanel {
|
||||
protected JLabel readLabel;
|
||||
protected JTextField writeField;
|
||||
|
||||
private final List<PropertyValidationInteface<E>> validations = new ArrayList<>();
|
||||
private final List<PropertyValidationInterface<E>> validations = new ArrayList<>();
|
||||
private final List<ChangeListener> changeListeners = new ArrayList<>();
|
||||
|
||||
private AWTEventListener aeListener;
|
||||
@@ -63,11 +63,11 @@ public abstract class AbstractPropertyField<E> extends JPanel {
|
||||
private boolean undetermined = false;
|
||||
private boolean editing = false;
|
||||
|
||||
public void addValidation(PropertyValidationInteface<E> validation) {
|
||||
public void addValidation(PropertyValidationInterface<E> validation) {
|
||||
validations.add(validation);
|
||||
}
|
||||
|
||||
public void removeValidation(PropertyValidationInteface<E> validation) {
|
||||
public void removeValidation(PropertyValidationInterface<E> validation) {
|
||||
validations.remove(validation);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public abstract class AbstractPropertyField<E> extends JPanel {
|
||||
if (value == null) {
|
||||
ok = false;
|
||||
} else {
|
||||
for (PropertyValidationInteface<E> validation : validations) {
|
||||
for (PropertyValidationInterface<E> validation : validations) {
|
||||
if (!validation.validate(value)) {
|
||||
ok = false;
|
||||
break;
|
||||
|
||||
@@ -22,8 +22,8 @@ package com.jpexs.decompiler.flash.easygui.properties;
|
||||
*/
|
||||
public class FloatPropertyField extends AbstractPropertyField<Float> {
|
||||
|
||||
private PropertyValidationInteface<Float> minValidation = null;
|
||||
private PropertyValidationInteface<Float> maxValidation = null;
|
||||
private PropertyValidationInterface<Float> minValidation = null;
|
||||
private PropertyValidationInterface<Float> maxValidation = null;
|
||||
|
||||
public FloatPropertyField(float value, float min, float max) {
|
||||
super("" + value);
|
||||
@@ -39,7 +39,7 @@ public class FloatPropertyField extends AbstractPropertyField<Float> {
|
||||
if (maxValidation != null) {
|
||||
removeValidation(maxValidation);
|
||||
}
|
||||
maxValidation = new PropertyValidationInteface<Float>() {
|
||||
maxValidation = new PropertyValidationInterface<Float>() {
|
||||
@Override
|
||||
public boolean validate(Float value) {
|
||||
return value <= max;
|
||||
@@ -52,7 +52,7 @@ public class FloatPropertyField extends AbstractPropertyField<Float> {
|
||||
if (minValidation != null) {
|
||||
removeValidation(minValidation);
|
||||
}
|
||||
minValidation = new PropertyValidationInteface<Float>() {
|
||||
minValidation = new PropertyValidationInterface<Float>() {
|
||||
@Override
|
||||
public boolean validate(Float value) {
|
||||
return value >= min;
|
||||
|
||||
@@ -22,8 +22,8 @@ package com.jpexs.decompiler.flash.easygui.properties;
|
||||
*/
|
||||
public class IntegerPropertyField extends AbstractPropertyField<Integer> {
|
||||
|
||||
private PropertyValidationInteface<Integer> minValidation = null;
|
||||
private PropertyValidationInteface<Integer> maxValidation = null;
|
||||
private PropertyValidationInterface<Integer> minValidation = null;
|
||||
private PropertyValidationInterface<Integer> maxValidation = null;
|
||||
|
||||
public IntegerPropertyField(int value, int min, int max) {
|
||||
super("" + value);
|
||||
@@ -40,7 +40,7 @@ public class IntegerPropertyField extends AbstractPropertyField<Integer> {
|
||||
if (maxValidation != null) {
|
||||
removeValidation(maxValidation);
|
||||
}
|
||||
maxValidation = new PropertyValidationInteface<Integer>() {
|
||||
maxValidation = new PropertyValidationInterface<Integer>() {
|
||||
@Override
|
||||
public boolean validate(Integer value) {
|
||||
return value <= max;
|
||||
@@ -53,7 +53,7 @@ public class IntegerPropertyField extends AbstractPropertyField<Integer> {
|
||||
if (minValidation != null) {
|
||||
removeValidation(minValidation);
|
||||
}
|
||||
minValidation = new PropertyValidationInteface<Integer>() {
|
||||
minValidation = new PropertyValidationInterface<Integer>() {
|
||||
@Override
|
||||
public boolean validate(Integer value) {
|
||||
return value >= min;
|
||||
|
||||
@@ -21,6 +21,6 @@ package com.jpexs.decompiler.flash.easygui.properties;
|
||||
* @author JPEXS
|
||||
* @param <E>
|
||||
*/
|
||||
public interface PropertyValidationInteface<E> {
|
||||
public interface PropertyValidationInterface<E> {
|
||||
public boolean validate(E value);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class TextPropertyField extends AbstractPropertyField<String> {
|
||||
|
||||
writeField.setColumns(maxLength);
|
||||
|
||||
addValidation(new PropertyValidationInteface<String>(){
|
||||
addValidation(new PropertyValidationInterface<String>(){
|
||||
@Override
|
||||
public boolean validate(String value) {
|
||||
return value.length() <= maxLength;
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.easygui.EasyTagNameResolver;
|
||||
import com.jpexs.decompiler.flash.easygui.UndoManager;
|
||||
import com.jpexs.decompiler.flash.easygui.properties.FloatPropertyField;
|
||||
import com.jpexs.decompiler.flash.easygui.properties.IntegerPropertyField;
|
||||
import com.jpexs.decompiler.flash.easygui.properties.PropertyValidationInteface;
|
||||
import com.jpexs.decompiler.flash.easygui.properties.PropertyValidationInterface;
|
||||
import com.jpexs.decompiler.flash.exporters.commonshape.Matrix;
|
||||
import com.jpexs.decompiler.flash.gui.BoundsChangeListener;
|
||||
import com.jpexs.decompiler.flash.gui.RegistrationPointPosition;
|
||||
@@ -476,7 +476,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
}
|
||||
});
|
||||
|
||||
PropertyValidationInteface<Float> nonZeroFloatValidation = new PropertyValidationInteface<Float>() {
|
||||
PropertyValidationInterface<Float> nonZeroFloatValidation = new PropertyValidationInterface<Float>() {
|
||||
@Override
|
||||
public boolean validate(Float value) {
|
||||
return value != 0f;
|
||||
|
||||
Reference in New Issue
Block a user