Browse Source

无任务,做短信事件插件发现的设计器bug

master
yaoh.wu 7 years ago
parent
commit
fe9584ccfe
  1. 11
      designer-base/src/com/fr/design/editor/editor/ColumnRowEditor.java
  2. 34
      designer-base/src/com/fr/design/editor/editor/TextEditor.java

11
designer-base/src/com/fr/design/editor/editor/ColumnRowEditor.java

@ -4,12 +4,12 @@ import com.fr.design.gui.columnrow.ColumnRowPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.ColumnRow;
import java.awt.*;
import java.awt.BorderLayout;
/**
* the editor to edit ColumnRow
*
* @editor zhou
* @author zhou
* @since 2012-3-29下午6:01:37
*/
public class ColumnRowEditor extends Editor<ColumnRow> {
@ -63,6 +63,7 @@ public class ColumnRowEditor extends Editor<ColumnRow> {
this.crPane.requestFocus();
}
@Override
public String getIconName() {
return "cell";
}
@ -71,4 +72,10 @@ public class ColumnRowEditor extends Editor<ColumnRow> {
public boolean accept(Object object) {
return object instanceof ColumnRow;
}
@Override
public void clearData() {
super.clearData();
this.setValue(null);
}
}

34
designer-base/src/com/fr/design/editor/editor/TextEditor.java

@ -3,26 +3,31 @@
*/
package com.fr.design.editor.editor;
import java.awt.BorderLayout;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import java.awt.BorderLayout;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
/**
* CellEditor used to edit String object.
*
* @editor zhou
* @author zhou
* @since 2012-3-29下午6:00:43
*/
public class TextEditor extends Editor<String> {
private UITextField textField; // text field.
// the old value of text field.
/**
* text field.
*/
private UITextField textField;
/**
* the old value of text field.
*/
private String oldValue = StringUtils.EMPTY;
/**
@ -93,7 +98,7 @@ public class TextEditor extends Editor<String> {
value = StringUtils.EMPTY;
}
oldValue = value.toString();
oldValue = value;
this.textField.setText(oldValue);
}
@ -110,6 +115,7 @@ public class TextEditor extends Editor<String> {
/**
* 请求焦点
*/
@Override
public void requestFocus() {
this.textField.requestFocus();
}
@ -133,10 +139,12 @@ public class TextEditor extends Editor<String> {
/**
* 被选中时文本输入框请求焦点
*/
@Override
public void selected() {
this.textField.requestFocus();
}
@Override
public String getIconName() {
return "type_string";
}
@ -147,7 +155,15 @@ public class TextEditor extends Editor<String> {
* @param object 需要判断的object
* @return 是字符类型则返回true
*/
@Override
public boolean accept(Object object) {
return object instanceof String;
}
@Override
public void clearData() {
super.clearData();
this.textField.setText(StringUtils.EMPTY);
this.oldValue = StringUtils.EMPTY;
}
}
Loading…
Cancel
Save