|
|
|
@ -25,6 +25,7 @@ import com.fr.design.designer.creator.XWParameterLayout;
|
|
|
|
|
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; |
|
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
|
|
import com.fr.design.fun.PreviewProvider; |
|
|
|
|
import com.fr.design.gui.frpane.HyperlinkGroupPane; |
|
|
|
|
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
@ -46,6 +47,8 @@ import com.fr.design.menu.MenuDef;
|
|
|
|
|
import com.fr.design.menu.ShortCut; |
|
|
|
|
import com.fr.design.menu.ToolBarDef; |
|
|
|
|
import com.fr.design.parameter.ParameterPropertyPane; |
|
|
|
|
import com.fr.design.preview.FormPreview; |
|
|
|
|
import com.fr.design.preview.MobilePreview; |
|
|
|
|
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; |
|
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
|
import com.fr.file.FILE; |
|
|
|
@ -78,7 +81,9 @@ import java.awt.Font;
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm { |
|
|
|
|
private static final String FORM_CARD = "FORM"; |
|
|
|
@ -678,7 +683,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
|
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public Icon getPreviewLargeIcon() { |
|
|
|
|
return UIConstants.RUN_BIG_ICON; |
|
|
|
|
return super.getPreviewLargeIcon(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -693,14 +698,19 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
|
|
|
|
|
* @return 菜单 |
|
|
|
|
*/ |
|
|
|
|
public UIMenuItem[] createMenuItem4Preview() { |
|
|
|
|
UIMenuItem form = new UIMenuItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview"), UIConstants.RUN_SMALL_ICON); |
|
|
|
|
form.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
WebPreviewUtils.preview(JForm.this); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return new UIMenuItem[]{form}; |
|
|
|
|
List<UIMenuItem> menuItems = new ArrayList<UIMenuItem>(); |
|
|
|
|
PreviewProvider[] previewProviders = supportPreview(); |
|
|
|
|
for (final PreviewProvider provider : previewProviders) { |
|
|
|
|
UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), BaseUtils.readIcon(provider.iconPathForPopupItem())); |
|
|
|
|
item.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
provider.onClick(JForm.this); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
menuItems.add(item); |
|
|
|
|
} |
|
|
|
|
return menuItems.toArray(new UIMenuItem[menuItems.size()]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -917,6 +927,25 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
|
|
|
|
|
return creator.toData(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 支持的预览模式 |
|
|
|
|
* @return 预览模式 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public PreviewProvider[] supportPreview() { |
|
|
|
|
return new PreviewProvider[]{new FormPreview(), new MobilePreview()}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 预览按钮点击事件 |
|
|
|
|
* |
|
|
|
|
* @param provider 预览接口 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public void previewMenuActionPerformed(PreviewProvider provider) { |
|
|
|
|
super.previewMenuActionPerformed(provider); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String route() { |
|
|
|
|
return ViewRequestConstants.FORM_VIEW_PATH; |
|
|
|
|