Browse Source

Merge pull request #98 in BA/design from ~RICHIE/design:dev to dev

* commit '6c3c766fdc5cbbf8d8db5834b09ae647b1a8d16d':
  方法调用一点小错误
  自定义背景的示例
master
superman 9 years ago
parent
commit
ac22564246
  1. 1
      designer/designer.iml
  2. 2
      designer_base/designer_base.iml
  3. 8
      designer_base/src/com/fr/design/style/background/BackgroundFactory.java
  4. 4
      designer_base/src/com/fr/design/style/background/BackgroundPane4Browser.java

1
designer/designer.iml

@ -17,6 +17,5 @@
<orderEntry type="module" module-name="designer_base" />
<orderEntry type="module" module-name="engine" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="module" module-name="plugins-free" />
</component>
</module>

2
designer_base/designer_base.iml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://E:/env/8.0/WebReport/WEB-INF/classes" />
<output url="file://$MODULE_DIR$/../../env/WebReport/WEB-INF/classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>

8
designer_base/src/com/fr/design/style/background/BackgroundFactory.java

@ -9,7 +9,7 @@ import com.fr.design.style.background.impl.*;
import com.fr.general.Background;
import com.fr.general.Inter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
@ -18,8 +18,8 @@ import java.util.Set;
*/
public class BackgroundFactory {
private static Map<Class<? extends Background>, BackgroundUIWrapper> map = new HashMap<>();
private static Map<Class<? extends Background>, BackgroundUIWrapper> browser = new HashMap<>();
private static Map<Class<? extends Background>, BackgroundUIWrapper> map = new LinkedHashMap<>();
private static Map<Class<? extends Background>, BackgroundUIWrapper> browser = new LinkedHashMap<>();
static {
registerUniversal(map);
@ -96,7 +96,7 @@ public class BackgroundFactory {
return createByWrapper(wrapper);
}
public static BackgroundDetailPane createBrowerIfAbsent(int index) {
public static BackgroundDetailPane createBrowserIfAbsent(int index) {
for (BackgroundUIWrapper wrapper : browser.values()) {
if (wrapper.getIndex() == index) {
return createByWrapper(wrapper);

4
designer_base/src/com/fr/design/style/background/BackgroundPane4Browser.java

@ -16,7 +16,7 @@ public class BackgroundPane4Browser extends BackgroundPane {
protected void initTabPane() {
int index = 0;
for (Class<? extends Background> key : BackgroundFactory.browserKindsOfKey()) {
BackgroundUIWrapper wrapper = BackgroundFactory.getWrapper(key);
BackgroundUIWrapper wrapper = BackgroundFactory.getBrosweWrapper(key);
wrapper.setIndex(index++);
tabbedPane.addTab(Inter.getLocText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
}
@ -37,7 +37,7 @@ public class BackgroundPane4Browser extends BackgroundPane {
protected BackgroundDetailPane getTabItemPaneByIndex(int index) {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createBrowerIfAbsent(index);
quickPane = BackgroundFactory.createBrowserIfAbsent(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);

Loading…
Cancel
Save