|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fr.design.widget.ui.designer; |
|
|
|
package com.fr.design.widget.ui.designer; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.iofile.attr.TemplateLayoutIdAttrMark; |
|
|
|
import com.fr.base.iofile.attr.TemplateLayoutIdAttrMark; |
|
|
|
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.border.UITitledMatteBorder; |
|
|
|
import com.fr.design.border.UITitledMatteBorder; |
|
|
|
import com.fr.design.designer.beans.PredefinedLayout; |
|
|
|
import com.fr.design.designer.beans.PredefinedLayout; |
|
|
|
import com.fr.design.designer.beans.models.NewFormModel; |
|
|
|
import com.fr.design.designer.beans.models.NewFormModel; |
|
|
@ -50,6 +51,8 @@ import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
public class NewFormPane extends BasicPane { |
|
|
|
public class NewFormPane extends BasicPane { |
|
|
|
private static final String EMPTY_FORM_LAYOUTID = "9ebf6aff-ad53-45a9-a175-9633f4162a3a"; |
|
|
|
private static final String EMPTY_FORM_LAYOUTID = "9ebf6aff-ad53-45a9-a175-9633f4162a3a"; |
|
|
|
|
|
|
|
private static final int SIMPLE_STYLE_LAYOUT_INDEX = 0; |
|
|
|
|
|
|
|
private static final int REAL_STYLE_LAYOUT_INDEX = 1; |
|
|
|
|
|
|
|
|
|
|
|
private NewFormModel newFormModel; |
|
|
|
private NewFormModel newFormModel; |
|
|
|
private UIDialog dialog; |
|
|
|
private UIDialog dialog; |
|
|
@ -187,13 +190,14 @@ public class NewFormPane extends BasicPane { |
|
|
|
Toolkit.i18nText("Fine-Design_Real_Style_Template") |
|
|
|
Toolkit.i18nText("Fine-Design_Real_Style_Template") |
|
|
|
}); |
|
|
|
}); |
|
|
|
buttonGroup.setPreferredSize(new Dimension(140, 20)); |
|
|
|
buttonGroup.setPreferredSize(new Dimension(140, 20)); |
|
|
|
buttonGroup.setSelectedIndex(1); |
|
|
|
buttonGroup.setSelectedIndex(DesignerEnvManager.getEnvManager().isUseSimpleStyleLayout()? SIMPLE_STYLE_LAYOUT_INDEX : REAL_STYLE_LAYOUT_INDEX); |
|
|
|
buttonGroup.addChangeListener(new ChangeListener() { |
|
|
|
buttonGroup.addChangeListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
int selectedIndex = buttonGroup.getSelectedIndex(); |
|
|
|
int selectedIndex = buttonGroup.getSelectedIndex(); |
|
|
|
for (PredefinedLayoutPane layoutCard : layoutCards) { |
|
|
|
for (PredefinedLayoutPane layoutCard : layoutCards) { |
|
|
|
if (selectedIndex == 1) { |
|
|
|
DesignerEnvManager.getEnvManager().setUseSimpleStyleLayout(selectedIndex == SIMPLE_STYLE_LAYOUT_INDEX); |
|
|
|
|
|
|
|
if (selectedIndex == REAL_STYLE_LAYOUT_INDEX) { |
|
|
|
layoutCard.showRealStyle(); |
|
|
|
layoutCard.showRealStyle(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
layoutCard.showSimpleStyle(); |
|
|
|
layoutCard.showSimpleStyle(); |
|
|
|