Browse Source

线程安全问题

master
zack 7 years ago
parent
commit
ed6a4965c0
  1. 6
      designer-base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 8
      designer-base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  3. 6
      designer-realize/src/com/fr/design/mainframe/CellElementPropertyPane.java

6
designer-base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -53,7 +53,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private static final String FILE = "file";
private static DesignerFrameFileDealerPane THIS;
private static volatile DesignerFrameFileDealerPane THIS;
private CardLayout card;
@ -84,9 +84,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public static final DesignerFrameFileDealerPane getInstance() {
if (THIS == null) {
synchronized (DesignerFrameFileDealerPane.class) {
if (THIS == null) {
THIS = new DesignerFrameFileDealerPane();
}
}
}
return THIS;
}

8
designer-base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -30,7 +30,7 @@ import java.util.Map;
import java.util.Set;
public class EastRegionContainerPane extends UIEastResizableContainer {
private static EastRegionContainerPane THIS;
private static volatile EastRegionContainerPane THIS;
private Map<String, PropertyItem> propertyItemMap;
private CardLayout propertyCard;
private JPanel leftPane;
@ -83,14 +83,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
* @return
*/
public static EastRegionContainerPane getInstance() {
if (THIS == null) {
synchronized (EastRegionContainerPane.class) {
if (THIS == null) {
THIS = new EastRegionContainerPane();
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth());
}
}
}
return THIS;
}
public EastRegionContainerPane() {
private EastRegionContainerPane() {
super();
initPropertyItemList();
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));

6
designer-realize/src/com/fr/design/mainframe/CellElementPropertyPane.java

@ -68,13 +68,17 @@ public class CellElementPropertyPane extends DockingView {
public synchronized static CellElementPropertyPane getInstance() {
if (singleton == null) {
synchronized (CellElementPropertyPane.class) {
if (singleton == null) {
singleton = new CellElementPropertyPane();
}
}
}
return singleton;
}
private static CellElementPropertyPane singleton;
private static volatile CellElementPropertyPane singleton;
private CellElementEditPane cellElementEditPane;

Loading…
Cancel
Save