Browse Source

去除不必要的改动。

master
zjz1993 5 years ago
parent
commit
0e6219e9e1
  1. 10
      src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java
  2. 10
      src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java
  3. 10
      src/main/java/com/fanruan/api/design/ui/editor/ValueEditorPaneFactory.java
  4. 3
      src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java
  5. 26
      src/main/java/com/fanruan/api/plugin/PluginKit.java
  6. 9
      src/main/java/com/fanruan/api/util/GeneralKit.java
  7. 25
      src/test/java/com/fanruan/api/util/GeneralKitTest.java

10
src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java

@ -1,10 +0,0 @@
package com.fanruan.api.design.ui.container;
/**
* 基础的pane类
* */
public abstract class BasicBeanPane<T> extends com.fr.design.beans.BasicBeanPane<T> {
public BasicBeanPane(){
}
}

10
src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java

@ -1,10 +0,0 @@
package com.fanruan.api.design.ui.container;
/**
* 用来给dialog增加一些固定的方法
* */
public class DialogActionAdapter extends com.fr.design.dialog.DialogActionAdapter{
public DialogActionAdapter(){
}
}

10
src/main/java/com/fanruan/api/design/ui/editor/ValueEditorPaneFactory.java

@ -1,10 +0,0 @@
package com.fanruan.api.design.ui.editor;
/**
* 生成ValueEditorPane的工厂方法
* */
public class ValueEditorPaneFactory extends com.fr.design.editor.ValueEditorPaneFactory{
public ValueEditorPaneFactory(){
}
}

3
src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java

@ -4,7 +4,6 @@ package com.fanruan.api.design.work;
import com.fanruan.api.design.ui.component.UIButton;
import com.fanruan.api.design.ui.component.UIComboBox;
import com.fanruan.api.design.ui.component.UILabel;
import com.fanruan.api.design.ui.container.BasicBeanPane;
import com.fanruan.api.log.LogKit;
import com.fanruan.api.macro.EncodeConstants;
import com.fanruan.api.util.ArrayKit;
@ -31,7 +30,7 @@ import java.awt.event.WindowEvent;
*
* @param <E> 数据连接类型
*/
public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connection> extends BasicBeanPane<Connection> {
public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connection> extends com.fr.design.beans.BasicBeanPane<Connection> {
private UILabel message;
private UIButton okButton;

26
src/main/java/com/fanruan/api/plugin/PluginKit.java

@ -1,26 +0,0 @@
package com.fanruan.api.plugin;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.fun.mark.Mutable;
import java.util.Set;
public class PluginKit {
/**
* 返回指定集合的不可变数组
* @param string 字符串
* @return 数组
* */
public <T extends Mutable> Set<T> getArray(String string) {
return ExtraClassManager.getInstance().getArray(string);
}
/**
* 返回指定集合的不可变数组
* @param string 字符串
* @return 数组
* */
public <T extends Mutable> Set<T> getArray(String string, Mutable m) {
return ExtraClassManager.getInstance().getArray(string, m);
}
}

9
src/main/java/com/fanruan/api/util/GeneralKit.java

@ -93,13 +93,4 @@ public class GeneralKit {
return FRContext.getLocale();
}
/**
* 检测两个数组是否相等
* @param array1 数组1
* @param array2 数组2
* @return 判断的结果
* */
public static <T> boolean equals(T[] array1, T[] array2){
return ComparatorUtils.equals(array1, array2);
}
}

25
src/test/java/com/fanruan/api/util/GeneralKitTest.java

@ -2,6 +2,7 @@ package com.fanruan.api.util;
import com.fanruan.api.Prepare;
import com.fr.general.GeneralUtils;
import com.fr.stable.AssistUtils;
import org.junit.Assert;
import org.junit.Test;
@ -52,28 +53,4 @@ public class GeneralKitTest extends Prepare {
public void getLocale() {
Assert.assertEquals(GeneralKit.getLocale(), Locale.CHINA);
}
@Test
public void equals(){
Object objArray[] = {1,2,3};
Integer intArray[] = {1,2,3};
Long[] longArray = {1L,2L,3L};
Double doubleArray[] = {1.1,2.2,3.3};
Byte[] byteArray = {1,2,3};
Character[] charArray = {'a', 'b', 'c'};
Boolean booleanArray[] = {true,true,false};
Assert.assertEquals(GeneralKit.equals(objArray, new Object[]{1,2,3}), true);
Assert.assertEquals(GeneralKit.equals(objArray, new Object[]{1,2,3,4}), false);
Assert.assertEquals(GeneralKit.equals(intArray, new Integer[]{1,2,3}), true);
Assert.assertEquals(GeneralKit.equals(intArray, new Integer[]{1,2,3,4}), false);
Assert.assertEquals(GeneralKit.equals(longArray, new Long[]{1L,2L,3L}), true);
Assert.assertEquals(GeneralKit.equals(longArray, new Long[]{1L,2L,3L,4L}), false);
Assert.assertEquals(GeneralKit.equals(doubleArray, new Double[]{1.1,2.2,3.3}), true);
Assert.assertEquals(GeneralKit.equals(doubleArray, new Double[]{1.1,2.2,3.3,4.4}), false);
Assert.assertEquals(GeneralKit.equals(byteArray, new Byte[]{1,2,3}), true);
Assert.assertEquals(GeneralKit.equals(byteArray, new Byte[]{1,2,3,4}), false);
Assert.assertEquals(GeneralKit.equals(charArray, new Character[]{'a','b','c'}), true);
Assert.assertEquals(GeneralKit.equals(charArray, new Character[]{'a','b','c','d'}), false);
Assert.assertEquals(GeneralKit.equals(booleanArray, new Boolean[]{true,true,false}), true);
Assert.assertEquals(GeneralKit.equals(booleanArray, new Boolean[]{true,true,false,false}), false);
}
}
Loading…
Cancel
Save