diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java
index 4a4097941..1640f3de8 100644
--- a/designer_base/src/com/fr/design/DesignerEnvManager.java
+++ b/designer_base/src/com/fr/design/DesignerEnvManager.java
@@ -13,22 +13,47 @@ import com.fr.design.constants.UIConstants;
import com.fr.env.RemoteEnv;
import com.fr.env.SignIn;
import com.fr.file.FILEFactory;
-import com.fr.general.*;
-import com.fr.stable.*;
+import com.fr.general.ComparatorUtils;
+import com.fr.general.FRLevel;
+import com.fr.general.FRLogFormatter;
+import com.fr.general.FRLogger;
+import com.fr.general.GeneralContext;
+import com.fr.general.IOUtils;
+import com.fr.general.Inter;
+import com.fr.stable.Constants;
+import com.fr.stable.EnvChangedListener;
+import com.fr.stable.ListMap;
+import com.fr.stable.ProductConstants;
+import com.fr.stable.StableUtils;
+import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID;
import com.fr.stable.project.ProjectConstants;
-import com.fr.stable.xml.*;
+import com.fr.stable.xml.XMLPrintWriter;
+import com.fr.stable.xml.XMLReadable;
+import com.fr.stable.xml.XMLTools;
+import com.fr.stable.xml.XMLWriter;
+import com.fr.stable.xml.XMLableReader;
+import org.apache.log4j.Level;
import javax.swing.*;
import javax.swing.SwingWorker.StateValue;
import java.awt.*;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.FileHandler;
import java.util.logging.Handler;
-import org.apache.log4j.Level;
/**
* The manager of Designer GUI.
@@ -36,6 +61,7 @@ import org.apache.log4j.Level;
public class DesignerEnvManager implements XMLReadable, XMLWriter {
private static final int MAX_SHOW_NUM = 10;
+ private static final String VERSION_80 = "80";
private static DesignerEnvManager designerEnvManager; // gui.
private String activationKey = null;
@@ -145,19 +171,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
designerEnvManager.setCurEnvName(name);
}
}
-
+
GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override
public void envChanged() {
-
+
designerEnvManager.setCurrentDirectoryPrefix(FILEFactory.ENV_PREFIX);
designerEnvManager.setDialogCurrentDirectory(ProjectConstants.REPORTLETS_NAME);
}
});
-
+
}
-
+
return designerEnvManager;
}
@@ -219,9 +245,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
calender.setTimeInMillis(System.currentTimeMillis());
String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH);
- String fileName = StableUtils.pathJoin(new String[]{
- logLocation, "fr_" + today + "_%g.log"
- });
+ String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log");
if (!new java.io.File(fileName).exists()) {
StableUtils.makesureFileExist(new java.io.File(fileName));
}
@@ -253,11 +277,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
try {
FileWriter fileWriter = new FileWriter(envFile);
File oldEnvFile = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "6-1" + "Env.xml");
+ File envFile80 = new File(getEnvHome(VERSION_80) + File.separator + getEnvFile().getName());
if (oldEnvFile.exists()) {
// marks:兼容DesignerEnv6-1.xml
FileReader fileReader = new FileReader(oldEnvFile);
Utils.copyCharTo(fileReader, fileWriter);
fileReader.close();
+ } else if (envFile80.exists()) {
+ compatibilityPrevVersion(envFile80);
} else {
// marks:生成一个新的xml文件
StringReader stringReader = new StringReader("");
@@ -270,6 +297,33 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
}
+ private static String getEnvHome(String version) {
+ String userHome = System.getProperty("user.home");
+ if (userHome == null) {
+ userHome = System.getProperty("userHome");
+ }
+
+ File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version);
+ if (!envHome.exists()) {
+ StableUtils.mkdirs(envHome);
+ }
+
+ return envHome.getAbsolutePath();
+ }
+
+ private void compatibilityPrevVersion(File prevEnvFile) {
+ try {
+ XMLTools.readFileXML(designerEnvManager, prevEnvFile);
+ } catch (Exception e) {
+ FRContext.getLogger().error(e.getMessage(), e);
+ }
+ // 清空前一个版本中的工作目录和最近打开
+ nameEnvMap = new ListMap();
+ recentOpenedFilePathList = new ArrayList();
+ curEnvName = null;
+ designerEnvManager.saveXMLFile();
+ }
+
public static void setEnvFile(File envFile) {
DesignerEnvManager.envFile = envFile;
}
@@ -285,6 +339,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
/**
* 是否启用了https
+ *
* @return 同上
*/
public boolean isHttps() {
@@ -311,7 +366,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return certificatePass;
}
- public void setCertificatePass(String certificatePass){
+ public void setCertificatePass(String certificatePass) {
this.certificatePass = certificatePass;
}
@@ -531,13 +586,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.reportLengthUnit = reportLengthUnit;
}
- private void writeTempFile(File tempFile){
- try{
+ private void writeTempFile(File tempFile) {
+ try {
OutputStream fout = new FileOutputStream(tempFile);
XMLTools.writeOutputStreamXML(this, fout);
fout.flush();
fout.close();
- }catch (Exception e) {
+ } catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
}
}
@@ -546,9 +601,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* 保存设计器的配置文件, 该文件不在env的resource目录下
* 而是在Consts.getEnvHome() + File.separator + Consts.APP_NAME
*
- *
* @date 2014-9-29-上午11:04:23
- *
*/
public void saveXMLFile() {
File xmlFile = this.getDesignerEnvFile();
@@ -577,7 +630,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* 是否加入产品改良
*
* @return 是否加入产品改良
- *
*/
public boolean isJoinProductImprove() {
return joinProductImprove;
@@ -585,7 +637,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
/**
* 设置加入产品改良
- *
*/
public void setJoinProductImprove(boolean joinProductImprove) {
this.joinProductImprove = joinProductImprove;
@@ -1155,63 +1206,63 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.lastShowBBSNewsTime = lastShowBBSNewsTime;
}
- private void readXMLVersion(XMLableReader reader){
+ private void readXMLVersion(XMLableReader reader) {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
reader.setXmlVersionByString(tmpVal);
}
}
- private void readActiveKey(XMLableReader reader){
+ private void readActiveKey(XMLableReader reader) {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
this.setActivationKey(tmpVal);
}
}
- private void readLogLocation(XMLableReader reader){
+ private void readLogLocation(XMLableReader reader) {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
this.setLogLocation(tmpVal);
}
}
- private void readLanguage(XMLableReader reader){
+ private void readLanguage(XMLableReader reader) {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
this.setLanguage(Integer.parseInt(tmpVal));
}
}
- private void readJettyPort(XMLableReader reader){
+ private void readJettyPort(XMLableReader reader) {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
this.setJettyServerPort(Integer.parseInt(tmpVal));
}
}
- private void readPageLengthUnit(XMLableReader reader){
+ private void readPageLengthUnit(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.pageLengthUnit = Short.parseShort(tmpVal);
}
}
- private void readReportLengthUnit(XMLableReader reader){
+ private void readReportLengthUnit(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.reportLengthUnit = Short.parseShort(tmpVal);
}
}
- private void readLastOpenFile(XMLableReader reader){
+ private void readLastOpenFile(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.lastOpenFilePath = tmpVal;
}
}
- private void readEncrytionKey(XMLableReader reader){
+ private void readEncrytionKey(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.encryptionKey = tmpVal;
@@ -1219,15 +1270,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
-
- private void readLastBBSTime(XMLableReader reader){
+ private void readLastBBSTime(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.lastShowBBSTime = tmpVal;
}
}
- private void readLastBBSNewsTime(XMLableReader reader){
+ private void readLastBBSNewsTime(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.lastShowBBSNewsTime = tmpVal;
@@ -1275,15 +1325,15 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
readEncrytionKey(reader);
} else if ("jdkHome".equals(name)) {
this.jdkHome = reader.getElementValue();
- }else if ("lastBBSTime".equals(name)){
+ } else if ("lastBBSTime".equals(name)) {
readLastBBSTime(reader);
- } else if ("lastBBSNewsTime".equals(name)){
+ } else if ("lastBBSNewsTime".equals(name)) {
readLastBBSNewsTime(reader);
- }else if ("uuid".equals(name)){
+ } else if ("uuid".equals(name)) {
readUUID(reader);
- } else if ("status".equals(name)){
+ } else if ("status".equals(name)) {
readActiveStatus(reader);
- } else if (ComparatorUtils.equals(CAS_PARAS,name)){
+ } else if (ComparatorUtils.equals(CAS_PARAS, name)) {
readHttpsParas(reader);
} else if (name.equals("AlphaFineConfigManager")) {
readAlphaFineAttr(reader);
@@ -1297,12 +1347,12 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
reader.readXMLObject(this.alphaFineConfigManager = new AlphaFineConfigManager());
}
- private void readHttpsParas(XMLableReader reader){
+ private void readHttpsParas(XMLableReader reader) {
String tempVal;
- if((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PATH, null)) != null){
+ if ((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PATH, null)) != null) {
this.setCertificatePath(tempVal);
}
- if((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PASSWORD, null)) != null){
+ if ((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PASSWORD, null)) != null) {
this.setCertificatePass(tempVal);
}
@@ -1519,14 +1569,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
//写入uuid
- private void writeUUID(XMLPrintWriter writer){
+ private void writeUUID(XMLPrintWriter writer) {
writer.startTAG("uuid");
writer.textNode(getUUID());
writer.end();
}
//读取uuid
- private void readUUID(XMLableReader reader){
+ private void readUUID(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.uuid = tmpVal;
@@ -1534,8 +1584,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
//写入激活状态
- private void writeActiveStatus(XMLPrintWriter writer){
- if (this.activeKeyStatus == 0){
+ private void writeActiveStatus(XMLPrintWriter writer) {
+ if (this.activeKeyStatus == 0) {
writer.startTAG("status");
writer.textNode(this.activeKeyStatus + "");
writer.end();
@@ -1543,7 +1593,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
//读取激活状态
- private void readActiveStatus(XMLableReader reader){
+ private void readActiveStatus(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.activeKeyStatus = Integer.parseInt(tmpVal);
@@ -1596,7 +1646,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if (!this.isOracleSystemSpace()) {
writer.attr("useOracleSystemSpace", this.isOracleSystemSpace());
}
- if (!this.isJoinProductImprove()){
+ if (!this.isJoinProductImprove()) {
writer.attr("joinProductImprove", this.isJoinProductImprove());
}
if (!this.isAutoBackUp()) {
@@ -1681,29 +1731,29 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
//写论坛相关的两个属性
- private void writeBBSRelated(XMLPrintWriter writer){
- if (StringUtils.isNotEmpty(this.lastShowBBSTime)){
+ private void writeBBSRelated(XMLPrintWriter writer) {
+ if (StringUtils.isNotEmpty(this.lastShowBBSTime)) {
writer.startTAG("lastBBSTime");
writer.textNode(lastShowBBSTime);
writer.end();
}
- if (StringUtils.isNotEmpty(this.lastShowBBSNewsTime)){
+ if (StringUtils.isNotEmpty(this.lastShowBBSNewsTime)) {
writer.startTAG("lastBBSNewsTime");
writer.textNode(lastShowBBSNewsTime);
writer.end();
}
}
- private void writeHttpsParas(XMLPrintWriter writer){
+ private void writeHttpsParas(XMLPrintWriter writer) {
writer.startTAG(CAS_PARAS);
- if(StringUtils.isNotBlank(certificatePath)){
+ if (StringUtils.isNotBlank(certificatePath)) {
writer.attr(CAS_CERTIFICATE_PATH, certificatePath);
}
- if(StringUtils.isNotBlank(certificatePass)){
+ if (StringUtils.isNotBlank(certificatePass)) {
writer.attr(CAS_CERTIFICATE_PASSWORD, certificatePass);
}
- if(isHttps){
+ if (isHttps) {
writer.attr("enable", true);
}
writer.end();
@@ -1736,7 +1786,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if (env == null) {
return;
}
-
+
writer.startTAG("Env");
writer.classAttr(env.getClass());
writer.attr("name", name);
diff --git a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java
index 4448c1024..f8f1cd655 100644
--- a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java
+++ b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java
@@ -15,7 +15,7 @@ public class PlatformManagerAction extends UpdateAction {
this.setMenuKeySet(PLATEFORM_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/web/images/platform/platform_16_16.png"));
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/server/platform_16_16.png"));
}
/**
diff --git a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
index 83cf7a50d..bccff1ad7 100644
--- a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
+++ b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
@@ -451,7 +451,7 @@ public abstract class JListControlPane extends JControlPane {
this.setName(Inter.getLocText("FR-Action_Copy"));
this.setMnemonic('C');
this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/base/images/cell/control/copy.png"));
+ .readIcon("/com/fr/design/images/m_edit/copy.png"));
}
@Override
diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
index f1cd5f874..c5e12fa69 100644
--- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
+++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
@@ -601,7 +601,7 @@ public abstract class UIListControlPane extends UIControlPane {
this.setName(Inter.getLocText("FR-Action_Copy"));
this.setMnemonic('C');
this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/base/images/cell/control/copy.png"));
+ .readIcon("/com/fr/design/images/m_edit/copy.png"));
}
@Override
diff --git a/designer_base/src/com/fr/design/gui/core/WidgetOption.java b/designer_base/src/com/fr/design/gui/core/WidgetOption.java
index e6326aa25..c7cff45af 100644
--- a/designer_base/src/com/fr/design/gui/core/WidgetOption.java
+++ b/designer_base/src/com/fr/design/gui/core/WidgetOption.java
@@ -127,27 +127,27 @@ public abstract class WidgetOption implements Serializable {
}
public static final WidgetOption DATEEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Date", "Widget"}),
- BaseUtils.readIcon("/com/fr/web/images/form/resources/date_16.png"),
+ BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/date_16.png"),
DateEditor.class);
public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("Form-View_Tree"),
- BaseUtils.readIcon("/com/fr/web/images/form/resources/tree_16.png"), TreeEditor.class);
+ BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/tree_16.png"), TreeEditor.class);
- public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Tree-ComboBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/comboboxtree.png"),
+ public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Tree-ComboBox"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/comboboxtree.png"),
TreeComboBoxEditor.class);
public static final WidgetOption CHECKBOXGROUP = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-CheckBoxGroup", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/checkbox_group_16.png"), CheckBoxGroup.class);
+ Inter.getLocText(new String[]{"Form-CheckBoxGroup", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/checkbox_group_16.png"), CheckBoxGroup.class);
public static final WidgetOption RADIOGROUP = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-RadioGroup", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/button_group_16.png"),
+ Inter.getLocText(new String[]{"Form-RadioGroup", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/button_group_16.png"),
RadioGroup.class);
public static final WidgetOption NUMBEREDITOR = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Number", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/number_field_16.png"), NumberEditor.class);
+ Inter.getLocText(new String[]{"Number", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/number_field_16.png"), NumberEditor.class);
public static final WidgetOption LABEL = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Label", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/label_16.png"),
+ Inter.getLocText(new String[]{"Label", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/label_16.png"),
Label.class);
public static final WidgetOption BUTTON = WidgetOptionFactory.createByWidgetClass(
@@ -155,23 +155,23 @@ public abstract class WidgetOption implements Serializable {
Button.class);
public static final WidgetOption FREEBUTTON = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-Button", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/button_16.png"),
+ Inter.getLocText(new String[]{"Form-Button", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/button_16.png"),
FreeButton.class);
public static final WidgetOption MULTI_FILEEDITOR = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"File", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/files_up.png"),
+ Inter.getLocText(new String[]{"File", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/files_up.png"),
MultiFileEditor.class);
public static final WidgetOption COMBOBOX = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-ComboBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/combo_box_16.png"),
+ Inter.getLocText(new String[]{"Form-ComboBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/combo_box_16.png"),
ComboBox.class);
public static final WidgetOption COMBOCHECKBOX = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-ComboCheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/combo_check_16.png"),
+ Inter.getLocText(new String[]{"Form-ComboCheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/combo_check_16.png"),
ComboCheckBox.class);
public static final WidgetOption CHECKBOX = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-CheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/check_box_16.png"),
+ Inter.getLocText(new String[]{"Form-CheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/check_box_16.png"),
CheckBox.class);
public static final WidgetOption LIST = WidgetOptionFactory.createByWidgetClass(
@@ -183,16 +183,16 @@ public abstract class WidgetOption implements Serializable {
TableTree.class);
public static final WidgetOption TEXTEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Text", "Widget"})
- , BaseUtils.readIcon("/com/fr/web/images/form/resources/text_field_16.png"),
+ , BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/text_field_16.png"),
TextEditor.class);
public static final WidgetOption TEXTAREA = WidgetOptionFactory.createByWidgetClass(
- Inter.getLocText(new String[]{"Form-TextArea", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/text_area_16.png"),
+ Inter.getLocText(new String[]{"Form-TextArea", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/text_area_16.png"),
TextArea.class);
public static final WidgetOption PASSWORD = WidgetOptionFactory.createByWidgetClass(
Inter.getLocText(new String[]{"Form-Password", "Widget"}),
- BaseUtils.readIcon("/com/fr/web/images/form/resources/password_field_16.png"), Password.class);
+ BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/password_field_16.png"), Password.class);
public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Form-Iframe"), BaseUtils.readIcon("/com/fr/web/images/form/resources/iframe_16.png"),
IframeEditor.class);
diff --git a/designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png b/designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png
new file mode 100644
index 000000000..1b9a5df8f
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/layout_absolute_new.png b/designer_base/src/com/fr/design/images/buttonicon/layout_absolute_new.png
new file mode 100644
index 000000000..66ea68149
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/layout_absolute_new.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png b/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png
index de264df1e..9914c24d3 100644
Binary files a/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png and b/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/new_form3.png b/designer_base/src/com/fr/design/images/buttonicon/new_form3.png
new file mode 100644
index 000000000..cbf9e82c6
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/new_form3.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/report_16.png b/designer_base/src/com/fr/design/images/buttonicon/report_16.png
new file mode 100644
index 000000000..4a2b136cd
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/report_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/button_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/button_16.png
new file mode 100644
index 000000000..4c293a700
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/button_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/button_group_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/button_group_16.png
new file mode 100644
index 000000000..1f2f8d715
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/button_group_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png
new file mode 100644
index 000000000..1c505d3a5
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/checkbox_group_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/checkbox_group_16.png
new file mode 100644
index 000000000..17cd1fcde
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/checkbox_group_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png
new file mode 100644
index 000000000..4554959ff
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png
new file mode 100644
index 000000000..71380190a
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/comboboxtree.png b/designer_base/src/com/fr/design/images/buttonicon/widget/comboboxtree.png
new file mode 100644
index 000000000..8d0db5c31
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/comboboxtree.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/date_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/date_16.png
new file mode 100644
index 000000000..1603e5698
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/date_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/files_up.png b/designer_base/src/com/fr/design/images/buttonicon/widget/files_up.png
new file mode 100644
index 000000000..6b5ee56b9
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/files_up.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png
new file mode 100644
index 000000000..023406cd8
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png
new file mode 100644
index 000000000..19b688df4
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png
new file mode 100644
index 000000000..e6bc29772
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/text_area_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/text_area_16.png
new file mode 100644
index 000000000..4b57472dc
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/text_area_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png
new file mode 100644
index 000000000..553a90846
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png differ
diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png
new file mode 100644
index 000000000..5e442d2d8
Binary files /dev/null and b/designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png differ
diff --git a/designer_base/src/com/fr/design/images/control/sortAsc.png b/designer_base/src/com/fr/design/images/control/sortAsc.png
index a5be47df3..9fcdee421 100644
Binary files a/designer_base/src/com/fr/design/images/control/sortAsc.png and b/designer_base/src/com/fr/design/images/control/sortAsc.png differ
diff --git a/designer_base/src/com/fr/design/images/data/source/dataDictionary.png b/designer_base/src/com/fr/design/images/data/source/dataDictionary.png
index 2f0fc8c87..516d368b2 100644
Binary files a/designer_base/src/com/fr/design/images/data/source/dataDictionary.png and b/designer_base/src/com/fr/design/images/data/source/dataDictionary.png differ
diff --git a/designer_base/src/com/fr/design/images/expand/cellAttr.gif b/designer_base/src/com/fr/design/images/expand/cellAttr.gif
index ce34c2b30..1211f7985 100644
Binary files a/designer_base/src/com/fr/design/images/expand/cellAttr.gif and b/designer_base/src/com/fr/design/images/expand/cellAttr.gif differ
diff --git a/designer_base/src/com/fr/design/images/gui/color/foreground.png b/designer_base/src/com/fr/design/images/gui/color/foreground.png
index 1803c1117..faac2e1ac 100644
Binary files a/designer_base/src/com/fr/design/images/gui/color/foreground.png and b/designer_base/src/com/fr/design/images/gui/color/foreground.png differ
diff --git a/designer_base/src/com/fr/design/images/gui/color/foreground2.png b/designer_base/src/com/fr/design/images/gui/color/foreground2.png
new file mode 100644
index 000000000..1803c1117
Binary files /dev/null and b/designer_base/src/com/fr/design/images/gui/color/foreground2.png differ
diff --git a/designer_base/src/com/fr/design/images/lookandfeel/FileIcon.png b/designer_base/src/com/fr/design/images/lookandfeel/FileIcon.png
index 7b797d4ee..fcaca10b7 100644
Binary files a/designer_base/src/com/fr/design/images/lookandfeel/FileIcon.png and b/designer_base/src/com/fr/design/images/lookandfeel/FileIcon.png differ
diff --git a/designer_base/src/com/fr/design/images/m_edit/redo.png b/designer_base/src/com/fr/design/images/m_edit/redo.png
index d9225f68b..f6b77b4f4 100644
Binary files a/designer_base/src/com/fr/design/images/m_edit/redo.png and b/designer_base/src/com/fr/design/images/m_edit/redo.png differ
diff --git a/designer_base/src/com/fr/design/images/m_edit/undo.png b/designer_base/src/com/fr/design/images/m_edit/undo.png
index 2276c3384..f86a17441 100644
Binary files a/designer_base/src/com/fr/design/images/m_edit/undo.png and b/designer_base/src/com/fr/design/images/m_edit/undo.png differ
diff --git a/designer_base/src/com/fr/design/images/m_file/excel.png b/designer_base/src/com/fr/design/images/m_file/excel.png
index c32746763..7e04e7073 100644
Binary files a/designer_base/src/com/fr/design/images/m_file/excel.png and b/designer_base/src/com/fr/design/images/m_file/excel.png differ
diff --git a/designer_base/src/com/fr/design/images/m_file/export.png b/designer_base/src/com/fr/design/images/m_file/export.png
index f0908eae2..c56ee4419 100644
Binary files a/designer_base/src/com/fr/design/images/m_file/export.png and b/designer_base/src/com/fr/design/images/m_file/export.png differ
diff --git a/designer_base/src/com/fr/design/images/m_file/pageSetup.png b/designer_base/src/com/fr/design/images/m_file/pageSetup.png
index 7e9788f89..06fa9dd28 100644
Binary files a/designer_base/src/com/fr/design/images/m_file/pageSetup.png and b/designer_base/src/com/fr/design/images/m_file/pageSetup.png differ
diff --git a/designer_base/src/com/fr/design/images/m_file/save.png b/designer_base/src/com/fr/design/images/m_file/save.png
index 92c333375..1db40d0b4 100644
Binary files a/designer_base/src/com/fr/design/images/m_file/save.png and b/designer_base/src/com/fr/design/images/m_file/save.png differ
diff --git a/designer_base/src/com/fr/design/images/m_format/cellAttr.png b/designer_base/src/com/fr/design/images/m_format/cellAttr.png
index 9243c1343..5cd5db716 100644
Binary files a/designer_base/src/com/fr/design/images/m_format/cellAttr.png and b/designer_base/src/com/fr/design/images/m_format/cellAttr.png differ
diff --git a/designer_base/src/com/fr/design/images/m_format/highlight.png b/designer_base/src/com/fr/design/images/m_format/highlight.png
index 7491cb9c2..14ff765e4 100644
Binary files a/designer_base/src/com/fr/design/images/m_format/highlight.png and b/designer_base/src/com/fr/design/images/m_format/highlight.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/chart.png b/designer_base/src/com/fr/design/images/m_insert/chart.png
index 504ca9484..c6de0fe5e 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/chart.png and b/designer_base/src/com/fr/design/images/m_insert/chart.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/float.png b/designer_base/src/com/fr/design/images/m_insert/float.png
index 48d5ee59c..a84c636d3 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/float.png and b/designer_base/src/com/fr/design/images/m_insert/float.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/floatPop.png b/designer_base/src/com/fr/design/images/m_insert/floatPop.png
index 91600bd0f..46dca4f87 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/floatPop.png and b/designer_base/src/com/fr/design/images/m_insert/floatPop.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/hyperLink.png b/designer_base/src/com/fr/design/images/m_insert/hyperLink.png
index a23db4f76..b81a666d5 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/hyperLink.png and b/designer_base/src/com/fr/design/images/m_insert/hyperLink.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/insertRow.png b/designer_base/src/com/fr/design/images/m_insert/insertRow.png
index 9b681aa70..680879833 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/insertRow.png and b/designer_base/src/com/fr/design/images/m_insert/insertRow.png differ
diff --git a/designer_base/src/com/fr/design/images/m_insert/subReport.png b/designer_base/src/com/fr/design/images/m_insert/subReport.png
index 6b999b0ff..89d3df9ca 100644
Binary files a/designer_base/src/com/fr/design/images/m_insert/subReport.png and b/designer_base/src/com/fr/design/images/m_insert/subReport.png differ
diff --git a/designer_base/src/com/fr/design/images/m_report/allow_authority_edit.png b/designer_base/src/com/fr/design/images/m_report/allow_authority_edit.png
index 86932458f..b6053b72c 100644
Binary files a/designer_base/src/com/fr/design/images/m_report/allow_authority_edit.png and b/designer_base/src/com/fr/design/images/m_report/allow_authority_edit.png differ
diff --git a/designer_base/src/com/fr/design/images/m_report/exportAttr.png b/designer_base/src/com/fr/design/images/m_report/exportAttr.png
index f0908eae2..c56ee4419 100644
Binary files a/designer_base/src/com/fr/design/images/m_report/exportAttr.png and b/designer_base/src/com/fr/design/images/m_report/exportAttr.png differ
diff --git a/designer_base/src/com/fr/design/images/m_report/p.png b/designer_base/src/com/fr/design/images/m_report/p.png
index 1256e9fd1..d944f88d2 100644
Binary files a/designer_base/src/com/fr/design/images/m_report/p.png and b/designer_base/src/com/fr/design/images/m_report/p.png differ
diff --git a/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png b/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png
index 4ffcaba05..7d1389bfd 100644
Binary files a/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png and b/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png differ
diff --git a/designer_base/src/com/fr/design/images/m_web/datasource.png b/designer_base/src/com/fr/design/images/m_web/datasource.png
index 4b8bd89ab..2ff090e33 100644
Binary files a/designer_base/src/com/fr/design/images/m_web/datasource.png and b/designer_base/src/com/fr/design/images/m_web/datasource.png differ
diff --git a/designer_base/src/com/fr/design/images/m_web/edit.png b/designer_base/src/com/fr/design/images/m_web/edit.png
index a6b49911d..8af26fa1e 100644
Binary files a/designer_base/src/com/fr/design/images/m_web/edit.png and b/designer_base/src/com/fr/design/images/m_web/edit.png differ
diff --git a/designer_base/src/com/fr/design/images/m_web/function.png b/designer_base/src/com/fr/design/images/m_web/function.png
index 5b85a0c7a..5f8119e09 100644
Binary files a/designer_base/src/com/fr/design/images/m_web/function.png and b/designer_base/src/com/fr/design/images/m_web/function.png differ
diff --git a/designer_base/src/com/fr/design/images/m_web/style.png b/designer_base/src/com/fr/design/images/m_web/style.png
index 2f42e1e4c..e000c81b7 100644
Binary files a/designer_base/src/com/fr/design/images/m_web/style.png and b/designer_base/src/com/fr/design/images/m_web/style.png differ
diff --git a/designer_base/src/com/fr/design/images/server/platform_16_16.png b/designer_base/src/com/fr/design/images/server/platform_16_16.png
new file mode 100644
index 000000000..3c3c80833
Binary files /dev/null and b/designer_base/src/com/fr/design/images/server/platform_16_16.png differ
diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java
index a3d278f8a..3f24b645a 100644
--- a/designer_base/src/com/fr/start/BaseDesigner.java
+++ b/designer_base/src/com/fr/start/BaseDesigner.java
@@ -59,11 +59,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
private Timer timer;
public BaseDesigner(String[] args) {
- BuildContext.setBuildFilePath(buildPropertiesPath());
- if (isDebug()) {
- setDebugEnv();
- }
RestartHelper.deleteRecordFilesWhenStart();
//初始化插件引擎
PluginStartup.start();
@@ -71,7 +67,12 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
PluginConversionModule.getInstance().markDesignerStart();
SiteCenter.getInstance();
- DesignUtils.setPort(getStartPort());
+ BuildContext.setBuildFilePath(buildPropertiesPath());
+ if (isDebug()) {
+ setDebugEnv();
+ } else {
+ DesignUtils.setPort(getStartPort());
+ }
// 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了
if (DesignUtils.isStarted()) {
DesignUtils.clientSend(args);
@@ -99,7 +100,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
DesignUtils.initLookAndFeel();
DesignUtils.creatListeningServer(getStartPort(), startFileSuffix());
-
+
// 初始化Log Handler
DesignerEnvManager.loadLogSetting();
DesignerFrame df = createDesignerFrame();
diff --git a/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java b/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java
index 0140e0406..b22b3f5be 100644
--- a/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java
+++ b/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java
@@ -1,6 +1,8 @@
package com.fr.plugin.chart.map.server;
import com.fr.base.ConfigManager;
+import com.fr.base.Env;
+import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.general.GeneralContext;
@@ -24,7 +26,8 @@ public class ChartMapEditorAction extends UpdateAction {
int port = DesignerEnvManager.getEnvManager().getJettyServerPort();
String web = GeneralContext.getCurrentAppNameOfEnv();
String serverlet = ConfigManager.getProviderInstance().getServletMapping();
- StartServer.browserURLWithLocalEnv(String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet));
+ Env env = FRContext.getCurrentEnv();
+ StartServer.browserURLWithLocalEnv(env.isLocalEnv() ? String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet) : env.getPath() + "?op=map");
}
}
diff --git a/designer_form/src/com/fr/design/form/images/delete icon.png b/designer_form/src/com/fr/design/form/images/delete icon.png
index 398c5db5c..6fb2baac5 100644
Binary files a/designer_form/src/com/fr/design/form/images/delete icon.png and b/designer_form/src/com/fr/design/form/images/delete icon.png differ
diff --git a/designer_form/src/com/fr/design/form/images/download icon.png b/designer_form/src/com/fr/design/form/images/download icon.png
index 68ff09ac4..b4cf81713 100644
Binary files a/designer_form/src/com/fr/design/form/images/download icon.png and b/designer_form/src/com/fr/design/form/images/download icon.png differ
diff --git a/designer_form/src/com/fr/design/form/images/install icon.png b/designer_form/src/com/fr/design/form/images/install icon.png
index 37877a62c..5cd5db716 100644
Binary files a/designer_form/src/com/fr/design/form/images/install icon.png and b/designer_form/src/com/fr/design/form/images/install icon.png differ
diff --git a/designer_form/src/com/fr/design/form/images/refresh.png b/designer_form/src/com/fr/design/form/images/refresh.png
index d0efaf048..3a5ef7368 100644
Binary files a/designer_form/src/com/fr/design/form/images/refresh.png and b/designer_form/src/com/fr/design/form/images/refresh.png differ
diff --git a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java
index b3fa73a26..156970060 100644
--- a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java
+++ b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java
@@ -1 +1,107 @@
-package com.fr.design.gui.core;
import javax.swing.Icon;
import com.fr.base.BaseUtils;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WCardLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WHorizontalBoxLayout;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WVerticalBoxLayout;
import com.fr.general.Inter;
/**
* Author : Shockway
* Date: 13-6-17
* Time: 上午10:40
*/
public class FormWidgetOption extends WidgetOption {
/**
* 返回名字
* @return 名字
*/
@Override
public String optionName() {
return null;
}
/**
* 返回图标
* @return 图标
*/
@Override
public Icon optionIcon() {
return null;
}
/**
* 组件类
* @return 类
*/
@Override
public Class extends Widget> widgetClass() {
return null;
}
/**
* 返回组件
* @return 控件
*/
@Override
public Widget createWidget() {
return null;
}
/*
* 表单容器
*/
public static WidgetOption[] getFormContainerInstance() {
return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER,
CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER };
}
/**
* 表单工具栏上的布局
* @return 控件
*/
public static WidgetOption[] getFormLayoutInstance() {
return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER};
}
public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_absolute_new.png"),
WAbsoluteLayout.class);
public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"),
WBorderLayout.class);
public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/web/images/form/resources/card_layout_16.png"),
WCardLayout.class);
public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"),
WHorizontalBoxLayout.class);
public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WVerticalBoxLayout.class);
public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"),
BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WFitLayout.class);
public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"),
WParameterLayout.class);
public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/web/images/form/resources/report_16.png"),
ElementCaseEditor.class);
}
\ No newline at end of file
+package com.fr.design.gui.core;
+
+import javax.swing.Icon;
+
+import com.fr.base.BaseUtils;
+import com.fr.form.ui.ElementCaseEditor;
+import com.fr.form.ui.Widget;
+import com.fr.form.ui.container.WAbsoluteLayout;
+import com.fr.form.ui.container.WBorderLayout;
+import com.fr.form.ui.container.WCardLayout;
+import com.fr.form.ui.container.WFitLayout;
+import com.fr.form.ui.container.WHorizontalBoxLayout;
+import com.fr.form.ui.container.WParameterLayout;
+import com.fr.form.ui.container.WVerticalBoxLayout;
+import com.fr.general.Inter;
+
+/**
+ * Author : Shockway
+ * Date: 13-6-17
+ * Time: 上午10:40
+ */
+public class FormWidgetOption extends WidgetOption {
+
+ /**
+ * 返回名字
+ * @return 名字
+ */
+ @Override
+ public String optionName() {
+ return null;
+ }
+
+ /**
+ * 返回图标
+ * @return 图标
+ */
+ @Override
+ public Icon optionIcon() {
+ return null;
+ }
+
+ /**
+ * 组件类
+ * @return 类
+ */
+ @Override
+ public Class extends Widget> widgetClass() {
+ return null;
+ }
+
+ /**
+ * 返回组件
+ * @return 控件
+ */
+ @Override
+ public Widget createWidget() {
+ return null;
+ }
+
+ /*
+ * 表单容器
+ */
+ public static WidgetOption[] getFormContainerInstance() {
+ return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER,
+ CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER };
+ }
+
+ /**
+ * 表单工具栏上的布局
+ * @return 控件
+ */
+ public static WidgetOption[] getFormLayoutInstance() {
+ return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER};
+ }
+
+ public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/layout_absolute_new.png"),
+ WAbsoluteLayout.class);
+
+ public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"),
+ WBorderLayout.class);
+
+ public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/card_layout_16.png"),
+ WCardLayout.class);
+
+ public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"),
+ WHorizontalBoxLayout.class);
+
+ public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
+ WVerticalBoxLayout.class);
+
+ public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"),
+ BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
+ WFitLayout.class);
+
+ public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"),
+ WParameterLayout.class);
+
+ public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter
+ .getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/report_16.png"),
+ ElementCaseEditor.class);
+}
\ No newline at end of file
diff --git a/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java b/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java
index 78b17d4b3..dfcc8805c 100644
--- a/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java
+++ b/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java
@@ -22,7 +22,7 @@ public class NewFormAction extends UpdateAction {
this.setMenuKeySet(NEW_FORM);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/web/images/form/new_form3.png"));
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/new_form3.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke());
}