Browse Source

REPORT-9565 部署集成-远程-设计器上方路径显示异常

master
hzzz 7 years ago
parent
commit
6c1067c19b
  1. 65
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

65
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -51,14 +51,30 @@ import com.fr.stable.CoreConstants;
import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.image4j.codec.ico.ICODecoder;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import javax.swing.*;
import com.fr.workspace.connect.WorkspaceConnection;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.border.MatteBorder;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
@ -173,7 +189,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
g.setColor(UIConstants.NORMAL_BACKGROUND);
g.fillArc(0, 0, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH,
0, 360);
0, 360);
closeMode.paintIcon(this, g, 0, 0);
}
};
@ -206,10 +222,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (BaseUtils.isAuthorityEditing()) {
BaseUtils.setAuthorityEditing(false);
WestRegionContainerPane.getInstance().replaceDownPane(
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus());
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus());
needToAddAuhtorityPaint();
refreshDottedLine();
fireAuthorityStateToNomal();
@ -415,7 +431,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
try {
@SuppressWarnings("unchecked")
List<BufferedImage> image = ICODecoder.read(DesignerFrame.class
.getResourceAsStream("/com/fr/base/images/oem/logo.ico"));
.getResourceAsStream("/com/fr/base/images/oem/logo.ico"));
this.setIconImages(image);
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -460,11 +476,11 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
public void populateAuthorityArea() {
int centerWidth = contentWidth - WestRegionContainerPane.getInstance().getContainerWidth()
- EastRegionContainerPane.getInstance().getContainerWidth();
- EastRegionContainerPane.getInstance().getContainerWidth();
// 上面的虚线
upDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth);
upDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT - 1, centerWidth,
3);
3);
// 下面的虚线
downDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth);
@ -542,7 +558,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
int x = contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - closeMode.getIconWidth() / 2;
int y = MENU_HEIGHT - closeMode.getIconHeight() / 2;
closeButton.setBounds(x, y, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH,
UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH);
UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH);
}
/**
@ -721,8 +737,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName);
String username = null;
if (info != null){
username = info.getName();
if (info != null) {
WorkspaceConnection connection = info.getConnection();
username = connection == null ? StringUtils.EMPTY : connection.getUserName();
}
defaultTitleSB.append(username).append("@").append(envName).append("[").append(workspace.getDescription()).append("]");
if (editingTemplate != null) {
@ -808,19 +825,19 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
editingTemplate.stopEditing();
if (!editingTemplate.getEditingFILE().exists()) {
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
Inter.getLocText("Utils-Would_you_like_to_save") + " \"" + editingTemplate.getEditingFILE()
+ "\" ?", ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
Inter.getLocText("Utils-Would_you_like_to_save") + " \"" + editingTemplate.getEditingFILE()
+ "\" ?", ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.YES_OPTION && editingTemplate.saveTemplate()) {
editingTemplate.saveTemplate();
FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Template", "already-saved"}, new String[]{
editingTemplate.getEditingFILE().getName(), "."}));
editingTemplate.getEditingFILE().getName(), "."}));
}
} else {
if (editingTemplate.saveTemplate()) {
editingTemplate.saveTemplate();
FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Template", "already-saved"}, new String[]{
editingTemplate.getEditingFILE().getName(), "."}));
editingTemplate.getEditingFILE().getName(), "."}));
}
}
}
@ -930,7 +947,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
// p:判断一下,如何文件为空或者文件不存在,直接返回.
if (tplFile == null || !tplFile.exists()) {
JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"),
ProductConstants.PRODUCT_NAME, JOptionPane.INFORMATION_MESSAGE);
ProductConstants.PRODUCT_NAME, JOptionPane.INFORMATION_MESSAGE);
DesignerFrameFileDealerPane.getInstance().refresh();
return;
}
@ -986,7 +1003,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (inValidDesigner(jt)) {
this.addAndActivateJTemplate();
MutilTempalteTabPane.getInstance().setTemTemplate(
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
} else {
activeTemplate(tplFile, jt);
}
@ -1049,16 +1066,16 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
DesignerEnvManager.getEnvManager().setLastOpenFile(
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
DesignerEnvManager.getEnvManager().setLastWestRegionToolPaneY(
WestRegionContainerPane.getInstance().getToolPaneY());
WestRegionContainerPane.getInstance().getToolPaneY());
DesignerEnvManager.getEnvManager().setLastWestRegionContainerWidth(
WestRegionContainerPane.getInstance().getContainerWidth());
WestRegionContainerPane.getInstance().getContainerWidth());
DesignerEnvManager.getEnvManager().setLastEastRegionToolPaneY(
EastRegionContainerPane.getInstance().getToolPaneY());
EastRegionContainerPane.getInstance().getToolPaneY());
DesignerEnvManager.getEnvManager().setLastEastRegionContainerWidth(
EastRegionContainerPane.getInstance().getContainerWidth());
EastRegionContainerPane.getInstance().getContainerWidth());
DesignerEnvManager.getEnvManager().saveXMLFile();

Loading…
Cancel
Save