|
|
|
@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout;
|
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; |
|
|
|
|
import com.fr.form.ui.TextEditor; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -68,31 +69,36 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
|
|
|
|
|
widgetValueLabel.setVerticalAlignment(SwingConstants.TOP); |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")), labelNameTextField}, |
|
|
|
|
new Component[]{widgetValueLabel, formWidgetValuePane}, |
|
|
|
|
new Component[]{widgetValueLabel, formWidgetValuePane}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark"), SwingConstants.LEFT), waterMarkDictPane}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"), SwingConstants.LEFT), fontSizePane} |
|
|
|
|
}; |
|
|
|
|
double[] rowSize = {p, p, p, p, p, p}; |
|
|
|
|
double[] columnSize = {p,f}; |
|
|
|
|
int[][] rowCount = {{1, 1},{1, 3},{1, 1},{1, 1}}; |
|
|
|
|
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); |
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
int[][] rowCount = {{1, 1}, {1, 3}, {1, 1}, {1, 1}}; |
|
|
|
|
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); |
|
|
|
|
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
boundsPane.add(panel); |
|
|
|
|
return boundsPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JPanel setValidatePane(){ |
|
|
|
|
public JPanel setValidatePane() { |
|
|
|
|
return regPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected RegFieldPane createRegPane() { |
|
|
|
|
RegPaneProvider provider = ExtraDesignClassManager.getInstance().getSingle(RegPaneProvider.XML_TAG); |
|
|
|
|
if (provider != null) { |
|
|
|
|
if (provider == null) { |
|
|
|
|
return new RegFieldPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
return provider.createRegPane(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
return new RegFieldPane(); |
|
|
|
|
} |
|
|
|
|
return new RegFieldPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -109,7 +115,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected TextEditor updateSubFieldEditorBean() { |
|
|
|
|
TextEditor ob = (TextEditor)creator.toData(); |
|
|
|
|
TextEditor ob = (TextEditor) creator.toData(); |
|
|
|
|
this.regPane.update(ob); |
|
|
|
|
ob.setWaterMark(waterMarkDictPane.getText()); |
|
|
|
|
formWidgetValuePane.update(ob); |
|
|
|
|