Browse Source

REPORT-7689 预定义页面没办法换到文本格式

master
zack 7 years ago
parent
commit
48b0e25fbf
  1. 50
      designer_base/src/com/fr/design/style/FormatPane.java

50
designer_base/src/com/fr/design/style/FormatPane.java

@ -3,15 +3,20 @@
*/ */
package com.fr.design.style; package com.fr.design.style;
import java.awt.BorderLayout; import com.fr.base.FRContext;
import java.awt.Color; import com.fr.base.TextFormat;
import java.awt.FlowLayout; import com.fr.data.core.FormatField;
import java.awt.event.ActionEvent; import com.fr.data.core.FormatField.FormatContents;
import java.awt.event.ActionListener; import com.fr.design.dialog.BasicPane;
import java.text.DecimalFormat; import com.fr.design.gui.ibutton.UIRadioButton;
import java.text.Format; import com.fr.design.gui.ilable.UILabel;
import java.text.SimpleDateFormat; import com.fr.design.gui.itextfield.UITextField;
import java.util.Date; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
@ -25,21 +30,15 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import com.fr.base.FRContext; import java.awt.Color;
import com.fr.base.TextFormat; import java.awt.FlowLayout;
import com.fr.data.core.FormatField; import java.awt.event.ActionEvent;
import com.fr.data.core.FormatField.FormatContents; import java.awt.event.ActionListener;
import com.fr.design.gui.ibutton.UIRadioButton; import java.text.DecimalFormat;
import com.fr.design.gui.ilable.UILabel; import java.text.Format;
import com.fr.design.gui.itextfield.UITextField; import java.text.SimpleDateFormat;
import com.fr.design.layout.FRGUIPaneFactory; import java.util.Date;
import com.fr.design.dialog.BasicPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
/** /**
* 属性界面中的格式面板 * 属性界面中的格式面板
@ -316,6 +315,9 @@ public class FormatPane extends BasicPane {
*/ */
public Format update() { public Format update() {
String text = patternTextField.getText(); String text = patternTextField.getText();
if (getFormatContents() == FormatContents.TEXT) {
return FormatField.getInstance().getFormat(getFormatContents(), text);
}
if(StringUtils.isEmpty(text)) { if(StringUtils.isEmpty(text)) {
return null; return null;
} }

Loading…
Cancel
Save