Browse Source

无jira 解决冲突

research/11.0
hades 3 years ago
parent
commit
5c7dde4321
  1. 4
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  2. 2
      designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java
  3. 25
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  4. 1
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java
  5. 10
      designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java
  6. 27
      designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java
  7. 10
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java

4
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -31,7 +31,7 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
}
REPORT_ENGINE_JAR = properties.getProperty(REPORT_ENGINE_KEY, "default.jar");
}
private String name;
private String path;
@ -108,7 +108,7 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
File engineLib = new File(StableUtils.pathJoin(this.path, ProjectConstants.LIB_NAME, REPORT_ENGINE_JAR));
// 非安装版本允许自由切换
boolean notExistLib = !ComparatorUtils.equals(GeneralUtils.readFullBuildNO(), InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build"))
&& !engineLib.exists();
&& !engineLib.exists();
if (notExistLib) {
throw new MainVersionNotMatchException();
}

2
designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java vendored

@ -68,7 +68,7 @@ public class WorkspaceExceptionHandler {
if (workspaceInfo == null || workspaceInfo.getType() == DesignerWorkspaceType.Local) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
if (e instanceof ExceptionDescriptor) {
new CommonHandler(true).handle(new RefWrapper(e, StringUtils.EMPTY));
new CommonHandler(true).handle(new RefWrapper(e, StringUtils.EMPTY));
} else {
FineJOptionPane.showMessageDialog(EnvChangeEntrance.getInstance().getDialog(),
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),

25
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -25,17 +25,19 @@ import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* 图表 属性表, 类型选择 界面.
@ -99,6 +101,19 @@ public class ChartTypePane extends AbstractChartAttrPane {
buttonPane.setEditingChartPane(chartTypeComBox);
buttonPane.addMouseListener(new MouseAdapter() {
@Override
public void mouseReleased(MouseEvent e) {
buttonPane.requestFocus();
}
});
chartTypeComBox.addMouseListener(new MouseAdapter() {
@Override
public void mouseReleased(MouseEvent e) {
content.requestFocus();
}
});
return content;
}

1
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java

@ -72,6 +72,7 @@ public class ChartImagePane extends ChartSelectDemoPane {
}else{
this.isDoubleClicked = false;
}
this.requestFocus();
super.mouseClicked(e);
}

10
designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java

@ -103,6 +103,16 @@ public class XWParameterLayout extends XWAbsoluteLayout {
return false;
}
@Override
public boolean canEnterIntoAbsolutePane() {
return false;
}
@Override
public boolean canEnterIntoAdaptPane() {
return false;
}
/**
* 该组件是否可以拖拽(表单中参数面板和自适应布局不可以拖拽)
* @return 是则返回true

27
designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java

@ -10,6 +10,7 @@ import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.creator.XWScaleLayout;
import com.fr.design.designer.creator.XWTitleLayout;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
@ -60,6 +61,11 @@ public class FormSelectionUtils {
*/
public static void paste2Container(FormDesigner designer, XLayoutContainer parent,
FormSelection clipboard, int x, int y) {
clipboard = filterFormSelection(clipboard, parent);
if (clipboard.isEmpty()) {
Toolkit.getDefaultToolkit().beep();
return;
}
LayoutAdapter adapter = parent.getLayoutAdapter();
if (parent instanceof XWAbsoluteLayout) {
//绝对布局
@ -77,6 +83,27 @@ public class FormSelectionUtils {
Toolkit.getDefaultToolkit().beep();
}
private static FormSelection filterFormSelection(FormSelection clipboard, XLayoutContainer parent) {
FormSelection newSelection = new FormSelection();
for (XCreator xCreator : clipboard.getSelectedCreators()) {
if (parent.acceptType(XWParameterLayout.class)) {
if (xCreator.canEnterIntoParaPane()) {
newSelection.addSelectedCreator(xCreator);
}
} else if (parent.acceptType(XWAbsoluteLayout.class)) {
if (xCreator.canEnterIntoAbsolutePane()) {
newSelection.addSelectedCreator(xCreator);
}
} else if (parent.acceptType(XWFitLayout.class)) {
if (xCreator.canEnterIntoAdaptPane()) {
newSelection.addSelectedCreator(xCreator);
}
}
}
return newSelection;
}
private static boolean isExtraContainer(XLayoutContainer parent) {
if (parent != null) {
Set<FormWidgetOptionProvider> set = ExtraDesignClassManager.getInstance().getArray(FormWidgetOptionProvider.XML_TAG);

10
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java

@ -14,6 +14,7 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
@ -164,9 +165,14 @@ public class OnlineWidgetRepoPane extends BasicPane {
tipLabel1.setForeground(Color.decode("#8F8F92"));
UILabel tipLabel2 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Internet_Connect_Failed_Tip2"));
tipLabel2.setForeground(Color.decode("#8F8F92"));
UILabel tipLabel3 = tipLabel(MARKET_URL);
tipLabel3.setForeground(Color.decode("#8F8F92"));
JTextField tipLabel3 = new JTextField(MARKET_URL);
tipLabel3.setHorizontalAlignment(JTextField.CENTER);
tipLabel3.setPreferredSize(new Dimension(240, 20));
tipLabel3.setEditable(false);
tipLabel3.setForeground(Color.decode("#8F8F92"));
tipLabel3.setBackground(null);
tipLabel3.setBorder(null);
UILabel emptyLabel = tipLabel(StringUtils.EMPTY);
panel.add(uiLabel);

Loading…
Cancel
Save