diff --git a/designer/src/com/fr/design/actions/edit/EditFloatElementNameAction.java b/designer/src/com/fr/design/actions/edit/EditFloatElementNameAction.java
index 6f235307e1..15a0b07d18 100644
--- a/designer/src/com/fr/design/actions/edit/EditFloatElementNameAction.java
+++ b/designer/src/com/fr/design/actions/edit/EditFloatElementNameAction.java
@@ -39,7 +39,7 @@ public class EditFloatElementNameAction extends FloatSelectionAction {
if (report.getFloatElement(name) == null) {
selectedFloatElement.setName(name);
}
- reportPane.setSelection(new FloatSelection(name));
+ ((FloatSelection) reportPane.getSelection()).setFloatName(name);
}
});
nameDialog.setVisible(true);
diff --git a/designer/src/com/fr/design/actions/package.html b/designer/src/com/fr/design/actions/package.html
new file mode 100644
index 0000000000..b3f9a9493e
--- /dev/null
+++ b/designer/src/com/fr/design/actions/package.html
@@ -0,0 +1,5 @@
+
+
+定义了响应各种事件的 Action
+
+
\ No newline at end of file
diff --git a/designer/src/com/fr/design/cell/editor/package.html b/designer/src/com/fr/design/cell/editor/package.html
index 181bdb68cf..f44232f536 100644
--- a/designer/src/com/fr/design/cell/editor/package.html
+++ b/designer/src/com/fr/design/cell/editor/package.html
@@ -1,13 +1,9 @@
-
-
+文本单元格编辑器({@link com.fr.cell.editor.GeneralCellEditor GeneralCellEditor})类.
\ No newline at end of file
diff --git a/designer/src/com/fr/design/condition/package.html b/designer/src/com/fr/design/condition/package.html
new file mode 100644
index 0000000000..7ad30f8025
--- /dev/null
+++ b/designer/src/com/fr/design/condition/package.html
@@ -0,0 +1,5 @@
+
+
+条件属性悬浮编辑框中的相关面板
+
+
\ No newline at end of file
diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java
index 603356a882..45434fa82c 100644
--- a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java
+++ b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java
@@ -14,8 +14,9 @@ import com.fr.report.cell.CellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellExpandAttr;
-import javax.swing.*;
-import java.awt.*;
+import javax.swing.BorderFactory;
+import java.awt.BorderLayout;
+import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -27,6 +28,29 @@ public class DSColumnBasicPane extends BasicPane {
private ExpandDirectionPane expandDirectionPane;
private CellElement cellElement;
+ private ActionListener summaryDirectionActionlistener = new ActionListener() {
+
+ public void actionPerformed(ActionEvent evt) {
+ if (expandDirectionPane != null) {
+ expandDirectionPane.setNoneRadioButtonSelected(true);
+ }
+ }
+ };
+ private ActionListener othergroupDirectionActionlistener = new ActionListener() {
+
+ public void actionPerformed(ActionEvent evt) {
+ if (expandDirectionPane != null) {
+ expandDirectionPane.setNoneRadioButtonSelected(false);
+ }
+ }
+ };
+ private ActionListener sdcupdateActionlistener = new ActionListener() {
+
+ public void actionPerformed(ActionEvent evt) {
+ selectDataColumnPane.update(cellElement);
+ }
+ };
+
public DSColumnBasicPane() {
this(DSColumnPane.SETTING_ALL);
}
@@ -78,7 +102,7 @@ public class DSColumnBasicPane extends BasicPane {
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER);
- this.resultSetGroupPane.addListeners(summary_direction_ActionListener, otherGroup_direction_ActionListener, sdcUpdate_ActionListener);
+ this.resultSetGroupPane.addListeners(summaryDirectionActionlistener, othergroupDirectionActionlistener, sdcupdateActionlistener);
}
@Override
@@ -93,7 +117,7 @@ public class DSColumnBasicPane extends BasicPane {
this.cellElement = cellElement;
- selectDataColumnPane.populate(source, cellElement);
+ selectDataColumnPane.populate(source, cellElement, null);
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr();
if (conditionParentPane != null) {
@@ -134,29 +158,6 @@ public class DSColumnBasicPane extends BasicPane {
resultSetGroupPane.update();
}
- ActionListener summary_direction_ActionListener = new ActionListener() {
-
- public void actionPerformed(ActionEvent evt) {
- if (expandDirectionPane != null) {
- expandDirectionPane.setNoneRadioButtonSelected(true);
- }
- }
- };
- ActionListener otherGroup_direction_ActionListener = new ActionListener() {
-
- public void actionPerformed(ActionEvent evt) {
- if (expandDirectionPane != null) {
- expandDirectionPane.setNoneRadioButtonSelected(false);
- }
- }
- };
- ActionListener sdcUpdate_ActionListener = new ActionListener() {
-
- public void actionPerformed(ActionEvent evt) {
- selectDataColumnPane.update(cellElement);
- }
- };
-
public void putElementcase(ElementCasePane t) {
if (conditionParentPane != null) {
conditionParentPane.putElementcase(t);
diff --git a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java
index e71f539ebb..9552f6ba95 100644
--- a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java
+++ b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java
@@ -6,7 +6,7 @@ import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.main.impl.WorkBook;
import com.fr.report.cell.TemplateCellElement;
-import java.awt.*;
+import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Iterator;
@@ -32,7 +32,7 @@ public class SelectedConfirmedDataColumnPane extends SelectedDataColumnPane {
tableNameComboBox.refresh(source);
tableNameComboBox.setEditable(false);
tableNameComboBox.setEnabled(false);
- super.populate(source, cell);
+ super.populate(source, cell, null);
try {
Iterator it = source.getTableDataNameIterator();
String name = (String) it.next();
diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
index 362c281667..62538e7d05 100644
--- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
+++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
@@ -26,14 +26,19 @@ import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
-import javax.swing.*;
-import java.awt.*;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JPanel;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
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.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.regex.Pattern;
/**
@@ -41,7 +46,7 @@ import java.util.regex.Pattern;
*
* @author yaoh.wu
* @version 2017年8月3日
- * 复用对话框代码,保留对话框原始布局
+ * 复用对话框代码,保留对话框原始布局
* @since 8.0
*/
public class SelectedDataColumnPane extends BasicPane {
@@ -53,19 +58,21 @@ public class SelectedDataColumnPane extends BasicPane {
private ItemListener itemListener;
private UIButton paramButton;
+ private ElementCasePane casePane;
+ private CellElement cellElement; // 保存当前选中的 CE
public SelectedDataColumnPane() {
- this(true, false, null, null);
+ this(true, false, null);
}
public SelectedDataColumnPane(boolean showParameterButton) {
- this(showParameterButton, false, null, null);
+ this(showParameterButton, false, null);
}
- public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout, ElementCasePane casePane, TemplateCellElement cellElement) {
+ public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout, TemplateCellElement cellElement) {
if (verticalLayout) {
- initComponentVerticalLayout(casePane, cellElement);
+ initComponentVerticalLayout(cellElement);
} else {
initComponent(showParameterButton);
}
@@ -119,9 +126,9 @@ public class SelectedDataColumnPane extends BasicPane {
/**
* 初始化竖直布局的组件
*/
- public void initComponentVerticalLayout(ElementCasePane casePane, TemplateCellElement cellElement) {
+ private void initComponentVerticalLayout(TemplateCellElement cellElement) {
initTableNameComboBox();
- initWithParameterButton(casePane, cellElement);
+ initWithParameterButton(cellElement);
columnNameComboBox = new LazyComboBox() {
@Override
public Object[] load() {
@@ -149,10 +156,13 @@ public class SelectedDataColumnPane extends BasicPane {
}
- public void populate(TableDataSource source, TemplateCellElement cellElement) {
+ public void populate(TableDataSource source, TemplateCellElement cellElement, ElementCasePane casePane) {
+ tableNameComboBox.refresh(source);
+ this.casePane = casePane;
if (cellElement == null) {
return;
}
+ this.cellElement = cellElement;
if (itemListener != null) {
removeListener(itemListener);
}
@@ -191,6 +201,14 @@ public class SelectedDataColumnPane extends BasicPane {
dsColumn.setParameters((ps != null && ps.length > 0) ? ps : null);
}
+ /**
+ * 释放模板对象
+ */
+ public void release() {
+ this.casePane = null;
+ this.tableNameComboBox.setModel(new DefaultComboBoxModel());
+ }
+
/**
* 更新面板
*
@@ -245,10 +263,20 @@ public class SelectedDataColumnPane extends BasicPane {
protected void initTableNameComboBox() {
tableNameComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource());
+ final ExecutorService executorService = Executors.newSingleThreadExecutor();
tableNameComboBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
- columnNameComboBox.setLoaded(false);
+ if (e.getStateChange() == ItemEvent.SELECTED) {
+ executorService.execute(new Runnable() {
+ @Override
+ public void run() {
+ synchronized (columnNameComboBox) {
+ columnNameComboBox.loadInstant();
+ }
+ }
+ });
+ }
}
});
tableNameComboBox.setPreferredSize(new Dimension(100, 20));
@@ -279,8 +307,7 @@ public class SelectedDataColumnPane extends BasicPane {
});
}
- private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) {
- final SelectedDataColumnPane that = this;
+ private void initWithParameterButton(final TemplateCellElement cellElement) {
editorPane = new UITableEditorPane(new ParameterTableModel());
paramButton = new UIButton(Inter.getLocText("FR-Designer-Basic_Dynamic_Parameter_Injection"));
paramButton.addActionListener(new ActionListener() {
@@ -290,7 +317,7 @@ public class SelectedDataColumnPane extends BasicPane {
public void doOk() {
List parameterList = editorPane.update();
ps = parameterList.toArray(new Parameter[parameterList.size()]);
- that.update(cellElement);
+ update(SelectedDataColumnPane.this.cellElement);
casePane.fireTargetModified();
}
});
diff --git a/designer/src/com/fr/design/dscolumn/package.html b/designer/src/com/fr/design/dscolumn/package.html
new file mode 100644
index 0000000000..7c3869f2a7
--- /dev/null
+++ b/designer/src/com/fr/design/dscolumn/package.html
@@ -0,0 +1,5 @@
+
+
+数据列相关面板
+
+
\ No newline at end of file
diff --git a/designer/src/com/fr/design/expand/package.html b/designer/src/com/fr/design/expand/package.html
new file mode 100644
index 0000000000..038eb5319c
--- /dev/null
+++ b/designer/src/com/fr/design/expand/package.html
@@ -0,0 +1,5 @@
+
+
+"单元格属性"->"扩展"的界面
+
+
\ No newline at end of file
diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java
index 656d2ec93a..547fdcf480 100644
--- a/designer/src/com/fr/design/mainframe/ElementCasePane.java
+++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java
@@ -3,7 +3,13 @@
*/
package com.fr.design.mainframe;
-import com.fr.base.*;
+import com.fr.base.BaseFormula;
+import com.fr.base.BaseUtils;
+import com.fr.base.DynamicUnitList;
+import com.fr.base.FRContext;
+import com.fr.base.Formula;
+import com.fr.base.ScreenResolution;
+import com.fr.base.Style;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@@ -12,8 +18,30 @@ import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.BorderAction;
import com.fr.design.actions.cell.CleanAuthorityAction;
-import com.fr.design.actions.cell.style.*;
-import com.fr.design.actions.columnrow.*;
+import com.fr.design.actions.cell.style.AlignmentAction;
+import com.fr.design.actions.cell.style.ReportFontBoldAction;
+import com.fr.design.actions.cell.style.ReportFontForegroundAction;
+import com.fr.design.actions.cell.style.ReportFontItalicAction;
+import com.fr.design.actions.cell.style.ReportFontNameAction;
+import com.fr.design.actions.cell.style.ReportFontSizeAction;
+import com.fr.design.actions.cell.style.ReportFontUnderlineAction;
+import com.fr.design.actions.cell.style.StyleBackgroundAction;
+import com.fr.design.actions.columnrow.CancelColumnAction;
+import com.fr.design.actions.columnrow.CancelRowAction;
+import com.fr.design.actions.columnrow.ColumnHideAction;
+import com.fr.design.actions.columnrow.ColumnWidthAction;
+import com.fr.design.actions.columnrow.DeleteColumnAction;
+import com.fr.design.actions.columnrow.DeleteRowAction;
+import com.fr.design.actions.columnrow.FootColumnAction;
+import com.fr.design.actions.columnrow.FootRowAction;
+import com.fr.design.actions.columnrow.HeadColumnAction;
+import com.fr.design.actions.columnrow.HeadRowAction;
+import com.fr.design.actions.columnrow.InsertColumnAction;
+import com.fr.design.actions.columnrow.InsertRowAction;
+import com.fr.design.actions.columnrow.ResetColumnHideAction;
+import com.fr.design.actions.columnrow.ResetRowHideAction;
+import com.fr.design.actions.columnrow.RowHeightAction;
+import com.fr.design.actions.columnrow.RowHideAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.CopyAction;
import com.fr.design.actions.edit.CutAction;
@@ -24,8 +52,17 @@ import com.fr.design.cell.bar.DynamicScrollBar;
import com.fr.design.cell.clipboard.CellElementsClip;
import com.fr.design.cell.clipboard.ElementsTransferable;
import com.fr.design.cell.clipboard.FloatElementsClip;
-import com.fr.design.cell.editor.*;
+import com.fr.design.cell.editor.BiasTextPainterCellEditor;
import com.fr.design.cell.editor.CellEditor;
+import com.fr.design.cell.editor.ChartCellEditor;
+import com.fr.design.cell.editor.ChartFloatEditor;
+import com.fr.design.cell.editor.DSColumnCellEditor;
+import com.fr.design.cell.editor.FormulaCellEditor;
+import com.fr.design.cell.editor.FormulaFloatEditor;
+import com.fr.design.cell.editor.ImageCellEditor;
+import com.fr.design.cell.editor.ImageFloatEditor;
+import com.fr.design.cell.editor.RichTextCellEditor;
+import com.fr.design.cell.editor.SubReportCellEditor;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.EditingState;
import com.fr.design.designer.TargetComponent;
@@ -35,7 +72,11 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
-import com.fr.design.menu.*;
+import com.fr.design.menu.KeySetUtils;
+import com.fr.design.menu.MenuDef;
+import com.fr.design.menu.NameSeparator;
+import com.fr.design.menu.ShortCut;
+import com.fr.design.menu.ToolBarDef;
import com.fr.design.selection.QuickEditor;
import com.fr.design.selection.Selectedable;
import com.fr.design.selection.SelectionEvent;
@@ -43,7 +84,11 @@ import com.fr.design.selection.SelectionListener;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
-import com.fr.grid.*;
+import com.fr.grid.Grid;
+import com.fr.grid.GridColumn;
+import com.fr.grid.GridCorner;
+import com.fr.grid.GridRow;
+import com.fr.grid.GridUtils;
import com.fr.grid.dnd.ElementCasePaneDropTarget;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection;
@@ -65,12 +110,27 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.ColumnRow;
import com.fr.stable.unit.FU;
-import javax.swing.*;
-import java.awt.*;
+import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollBar;
+import javax.swing.KeyStroke;
+import java.awt.AWTEvent;
+import java.awt.Adjustable;
+import java.awt.Dimension;
+import java.awt.Image;
+import java.awt.Rectangle;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
-import java.awt.event.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
import java.lang.reflect.Constructor;
import java.util.Set;
@@ -462,8 +522,15 @@ public abstract class ElementCasePane extends Tar
* 因为这边判断selection是一个selection,所以不会触发fireSelectionChanged
*/
public void setSelection(Selection selection) {
+
if (!ComparatorUtils.equals(this.selection, selection) ||
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) {
+ try {
+ //旧选中内容编辑器释放模板对象
+ this.getCurrentEditor().release();
+ } catch (UnsupportedOperationException e) {
+ FRLogger.getLogger().info("Nothing to release");
+ }
this.selection = selection;
fireSelectionChanged();
}
diff --git a/designer/src/com/fr/design/mainframe/InformationCollector.java b/designer/src/com/fr/design/mainframe/InformationCollector.java
index 7cc6eb6c44..5b80c2ecd9 100644
--- a/designer/src/com/fr/design/mainframe/InformationCollector.java
+++ b/designer/src/com/fr/design/mainframe/InformationCollector.java
@@ -344,7 +344,8 @@ public class InformationCollector implements XMLReadable, XMLWriter {
}
private void sendUserInfoInOtherThread(){
- if (!DesignerEnvManager.getEnvManager().isJoinProductImprove() || !FRContext.isChineseEnv()) {
+
+ if (!DesignerEnvManager.getEnvManager().isJoinProductImprove() || !FRContext.isChineseEnv() || !FRContext.getCurrentEnv().isLocalEnv()) {
return;
}
diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java
index 6d6a9b9fcc..70b75e1576 100644
--- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java
+++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java
@@ -127,9 +127,8 @@ public class ReportComponentComposite extends JComponent {
templateStateList.add(null);
}
centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement());
- if (jSliderContainer != null){
- jSliderContainer.reset();
- }
+ jSliderContainer=JSliderPane.getInstance();
+ jSliderContainer.reset();
}
if (centerCardPane.editingComponet.elementCasePane == null) {
diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java
index 8da604ab13..8cc5786833 100644
--- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java
+++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java
@@ -15,15 +15,12 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.json.JSONObject;
-import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
@@ -40,6 +37,7 @@ public class FileSearchManager implements AlphaFineSearchProvider {
private SearchResult filterModelList;
private SearchResult lessModelList;
private SearchResult moreModelList;
+ private String searchText;
private List fileNodes = null;
//停止搜索
private boolean stopSearch = false;
@@ -75,8 +73,8 @@ public class FileSearchManager implements AlphaFineSearchProvider {
this.filterModelList = new SearchResult();
this.lessModelList = new SearchResult();
this.moreModelList = new SearchResult();
- searchText = dealWithSearchText(searchText);
- if (StringUtils.isBlank(searchText) || ComparatorUtils.equals(searchText, DS_NAME)) {
+ this.searchText = dealWithSearchText(searchText);
+ if (StringUtils.isBlank(this.searchText) || ComparatorUtils.equals(this.searchText, DS_NAME)) {
lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer_Templates")));
return lessModelList;
}
@@ -86,7 +84,7 @@ public class FileSearchManager implements AlphaFineSearchProvider {
AlphaFineHelper.checkCancel();
isContainCpt = true;
isContainFrm = true;
- doSearch(searchText, true, env);
+ doSearch(this.searchText, true, env);
if (stopSearch) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE));
lessModelList.addAll(filterModelList.subList(0, AlphaFineConstants.SHOW_SIZE));
@@ -107,14 +105,12 @@ public class FileSearchManager implements AlphaFineSearchProvider {
return moreModelList;
}
this.filterModelList = new SearchResult();
- this.lessModelList = new SearchResult();
this.moreModelList = new SearchResult();
- searchText = dealWithSearchText(searchText);
Env env = FRContext.getCurrentEnv();
AlphaFineHelper.checkCancel();
isContainCpt = true;
isContainFrm = true;
- doSearch(searchText, false, env);
+ doSearch(this.searchText, false, env);
moreModelList.addAll(filterModelList.subList(AlphaFineConstants.SHOW_SIZE, filterModelList.size()));
return moreModelList;
}
@@ -122,10 +118,13 @@ public class FileSearchManager implements AlphaFineSearchProvider {
private void doSearch(String searchText, boolean needMore, Env env) {
for (FileNode node : fileNodes) {
boolean isAlreadyContain = false;
- String fileEnvPath = node.getEnvPath();
- String filePath = StableUtils.pathJoin(env.getPath(), fileEnvPath);
isAlreadyContain = searchFile(searchText, node, isAlreadyContain, needMore);
- searchFileContent(searchText, node, isAlreadyContain, filePath, needMore);
+ if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainFileContent() && node.getLock() == null) {
+ searchFileContent(env, searchText, node, isAlreadyContain, needMore);
+ }
+ if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE && stopSearch) {
+ return;
+ }
}
}
@@ -147,40 +146,36 @@ public class FileSearchManager implements AlphaFineSearchProvider {
* @param searchText
* @param node
* @param isAlreadyContain
- * @param filePath
*/
- private void searchFileContent(String searchText, FileNode node, boolean isAlreadyContain, String filePath, boolean needMore) {
- if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainFileContent()) {
-
- try {
- InputStreamReader isr = new InputStreamReader(new FileInputStream(new File(filePath)), "UTF-8");
- BufferedReader reader = new BufferedReader(isr);
- String line;
- int columnNumber;
- boolean isFoundInContent = false;
- while ((line = reader.readLine()) != null) {
- columnNumber = line.toLowerCase().indexOf(searchText);
- if (columnNumber != -1) {
- isFoundInContent = true;
- break;
- }
+ private void searchFileContent(Env env, String searchText, FileNode node, boolean isAlreadyContain, boolean needMore) {
+ try {
+ InputStream inputStream = env.readBean(node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1), ProjectConstants.REPORTLETS_NAME);
+ InputStreamReader isr = new InputStreamReader(inputStream, "UTF-8");
+ BufferedReader reader = new BufferedReader(isr);
+ String line;
+ int columnNumber;
+ boolean isFoundInContent = false;
+ while ((line = reader.readLine()) != null) {
+ columnNumber = line.toLowerCase().indexOf(searchText);
+ if (columnNumber != -1) {
+ isFoundInContent = true;
+ break;
}
- if (isFoundInContent && !isAlreadyContain) {
- FileModel model = new FileModel(node.getName(), node.getEnvPath());
- if (!AlphaFineHelper.getFilterResult().contains(model)) {
- filterModelList.add(model);
- }
- if (this.filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) {
- stopSearch = true;
- }
+ }
+ if (isFoundInContent && !isAlreadyContain) {
+ FileModel model = new FileModel(node.getName(), node.getEnvPath());
+ if (!AlphaFineHelper.getFilterResult().contains(model)) {
+ AlphaFineHelper.checkCancel();
+ filterModelList.add(model);
+ }
+ if (this.filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) {
+ stopSearch = true;
}
- isr.close();
- reader.close();
- } catch (FileNotFoundException e) {
- FRLogger.getLogger().error(e.getMessage());
- } catch (IOException e) {
- FRLogger.getLogger().error(e.getMessage());
}
+ isr.close();
+ reader.close();
+ } catch (Exception e) {
+ FRLogger.getLogger().error("file read error: " + e.getMessage());
}
}
@@ -197,9 +192,10 @@ public class FileSearchManager implements AlphaFineSearchProvider {
if (node.getName().toLowerCase().contains(searchText)) {
FileModel model = new FileModel(node.getName(), node.getEnvPath());
if (!AlphaFineHelper.getFilterResult().contains(model)) {
+ AlphaFineHelper.checkCancel();
filterModelList.add(model);
}
- if(filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) {
+ if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) {
stopSearch = true;
}
isAlreadyContain = true;
@@ -286,4 +282,12 @@ public class FileSearchManager implements AlphaFineSearchProvider {
public void setMoreModelList(SearchResult moreModelList) {
this.moreModelList = moreModelList;
}
+
+ public String getSearchText() {
+ return searchText;
+ }
+
+ public void setSearchText(String searchText) {
+ this.searchText = searchText;
+ }
}
\ No newline at end of file
diff --git a/designer/src/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java b/designer/src/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java
index a56d251a7a..8a3b2ded4d 100644
--- a/designer/src/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java
+++ b/designer/src/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java
@@ -120,4 +120,9 @@ public abstract class AbstractDSCellEditorPane extends JPanel {
scrollBar.setBlockIncrement(SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP);
scrollBar.setBorder(BorderFactory.createMatteBorder(0, CONTENT_PANE_WIDTH_GAP, 0, 0, this.getBackground()));
}
+
+ /**
+ * 释放tc
+ */
+ protected abstract void release();
}
diff --git a/designer/src/com/fr/design/module/DesignerModule.java b/designer/src/com/fr/design/module/DesignerModule.java
index 1ec15dabb8..c87ef19875 100644
--- a/designer/src/com/fr/design/module/DesignerModule.java
+++ b/designer/src/com/fr/design/module/DesignerModule.java
@@ -140,23 +140,21 @@ public class DesignerModule extends DesignModule {
* kunsnat:注册单元格选中Editor
*/
private void registerCellEditor() {
-
- ActionFactory.registerCellEditorClass(String.class, CellStringQuickEditor.class);
- ActionFactory.registerCellEditorClass(Number.class, CellStringQuickEditor.class);
- ActionFactory.registerCellEditorClass(BaseFormula.class, CellFormulaQuickEditor.class);
- ActionFactory.registerCellEditorClass(SubReport.class, CellSubReportEditor.class);
- ActionFactory.registerCellEditorClass(RichText.class, CellRichTextEditor.class);
- ActionFactory.registerCellEditorClass(DSColumn.class, CellDSColumnEditor.class);
- ActionFactory.registerCellEditorClass(Image.class, CellImageQuickEditor.class);
- ActionFactory.registerCellEditorClass(BiasTextPainter.class, CellBiasTextPainterEditor.class);
- ActionFactory.registerCellEditorClass(BufferedImage.class, CellImageQuickEditor.class);
-
+ ActionFactory.registerCellEditor(String.class, new CellStringQuickEditor());
+ ActionFactory.registerCellEditor(Number.class, new CellStringQuickEditor());
+ ActionFactory.registerCellEditor(BaseFormula.class, new CellFormulaQuickEditor());
+ ActionFactory.registerCellEditor(SubReport.class, new CellSubReportEditor());
+ ActionFactory.registerCellEditor(RichText.class, new CellRichTextEditor());
+ ActionFactory.registerCellEditor(DSColumn.class, new CellDSColumnEditor());
+ ActionFactory.registerCellEditor(Image.class, new CellImageQuickEditor());
+ ActionFactory.registerCellEditor(BiasTextPainter.class, new CellBiasTextPainterEditor());
+ ActionFactory.registerCellEditor(BufferedImage.class, new CellImageQuickEditor());
+ //todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class);
-
Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
try {
- ActionFactory.registerCellEditorClass(provider.targetObjectClass(), provider.quickEditor());
+ ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor().newInstance());
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e);
}
@@ -174,11 +172,11 @@ public class DesignerModule extends DesignModule {
*/
private void registerFloatEditor() {
- ActionFactory.registerFloatEditorClass(String.class, FloatStringQuickEditor.class);
- ActionFactory.registerFloatEditorClass(Formula.class, FloatStringQuickEditor.class);
- ActionFactory.registerFloatEditorClass(Image.class, FloatImageQuickEditor.class);
- ActionFactory.registerFloatEditorClass(BufferedImage.class, FloatImageQuickEditor.class);
-
+ ActionFactory.registerFloatEditor(String.class, new FloatStringQuickEditor());
+ ActionFactory.registerFloatEditor(Formula.class, new FloatStringQuickEditor());
+ ActionFactory.registerFloatEditor(Image.class, new FloatImageQuickEditor());
+ ActionFactory.registerFloatEditor(BufferedImage.class, new FloatImageQuickEditor());
+ //todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class);
}
diff --git a/designer/src/com/fr/design/present/BarCodePane.java b/designer/src/com/fr/design/present/BarCodePane.java
index 04a9667860..2c10de3f80 100644
--- a/designer/src/com/fr/design/present/BarCodePane.java
+++ b/designer/src/com/fr/design/present/BarCodePane.java
@@ -8,7 +8,6 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel;
-import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
@@ -22,11 +21,18 @@ import com.fr.report.cell.painter.barcode.BarcodeImpl;
import com.fr.report.cell.painter.barcode.core.BarCodeUtils;
import com.fr.stable.pinyin.ChineseHelper;
-import javax.swing.*;
+import javax.swing.JList;
+import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
-import java.awt.*;
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.font.FontRenderContext;
@@ -49,10 +55,10 @@ public class BarCodePane extends FurtherBasicBeanPane {
private UIComboBox typeComboBox;
private UISpinner barWidthSpinner;
private UISpinner barHeightSpinner;
- private UISpinner RCodesizespinner;
+ private UISpinner sizeSpinner;
private UICheckBox drawingTextCheckBox;
- private UIComboBox RCodeVersionComboBox;
- private UIComboBox RCodeErrorCorrectComboBox;
+ private UIComboBox versionComboBox;
+ private UIComboBox errorCorrectComboBox;
private UILabel typeSetLabel;
private String testText = "12345";
@@ -74,9 +80,9 @@ public class BarCodePane extends FurtherBasicBeanPane {
borderPane.add(barCodePreviewPane, BorderLayout.CENTER);
setTypeComboBox();
setSome();
- RCodesizespinner = new UISpinner(1,6,1,2);
- RCodeVersionComboBox = new UIComboBox();
- RCodeErrorCorrectComboBox = new UIComboBox();
+ sizeSpinner = new UISpinner(1,6,1,2);
+ versionComboBox = new UIComboBox();
+ errorCorrectComboBox = new UIComboBox();
typeSetLabel = new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT);
initVersionComboBox();
initErrorCorrectComboBox();
@@ -170,13 +176,13 @@ public class BarCodePane extends FurtherBasicBeanPane {
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion"), UILabel.LEFT);
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize());
- RCodeVersionComboBox.setPreferredSize(new Dimension(155,20));
- RCodeErrorCorrectComboBox.setPreferredSize(new Dimension(155,20));
- RCodesizespinner.setPreferredSize(new Dimension(155,20));
+ versionComboBox.setPreferredSize(new Dimension(155,20));
+ errorCorrectComboBox.setPreferredSize(new Dimension(155,20));
+ sizeSpinner.setPreferredSize(new Dimension(155,20));
Component[][] components_special = new Component[][]{
- new Component[]{uiLabel, RCodeVersionComboBox},
- new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect"), UILabel.LEFT), RCodeErrorCorrectComboBox},
- new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix"), UILabel.LEFT), RCodesizespinner}
+ new Component[]{uiLabel, versionComboBox},
+ new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect"), UILabel.LEFT), errorCorrectComboBox},
+ new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix"), UILabel.LEFT), sizeSpinner}
};
JPanel specialPane = TableLayoutHelper.createGapTableLayoutPane(components_special, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);
@@ -184,17 +190,17 @@ public class BarCodePane extends FurtherBasicBeanPane {
}
private void addlistener() {
- RCodesizespinner.addChangeListener(new ChangeListener() {
+ sizeSpinner.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
repaintPreviewBarCode();
}
});
- RCodeVersionComboBox.addItemListener(new ItemListener() {
+ versionComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
repaintPreviewBarCode();
}
});
- RCodeErrorCorrectComboBox.addItemListener(new ItemListener() {
+ errorCorrectComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
repaintPreviewBarCode();
}
@@ -227,12 +233,12 @@ public class BarCodePane extends FurtherBasicBeanPane {
private void initVersionComboBox() {
String[] array = {Inter.getLocText(new String[]{"Auto", "Choose"}), "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"};
- initcombobox(this.RCodeVersionComboBox, array, 0);
+ initcombobox(this.versionComboBox, array, 0);
}
private void initErrorCorrectComboBox() {
String[] array = {"L" + Inter.getLocText("Level") + "7%", "M" + Inter.getLocText("Level") + "15%", "Q" + Inter.getLocText("Level") + "25%", "H" + Inter.getLocText("Level") + "30%"};
- initcombobox(this.RCodeErrorCorrectComboBox, array, 1);
+ initcombobox(this.errorCorrectComboBox, array, 1);
}
private void initcombobox(UIComboBox combobox, String[] array, int index) {
@@ -270,10 +276,12 @@ public class BarCodePane extends FurtherBasicBeanPane {
}
this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType()));
this.typeComboBox.setSelectedIndex(barcodeAttr.getType());
+ this.versionComboBox.setSelectedIndex(barcodeAttr.getRCodeVersion());
+ this.errorCorrectComboBox.setSelectedIndex(barcodeAttr.getRCodeErrorCorrect());
this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth()) * 10);
this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight()));
this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText());
- this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix()));
+ this.sizeSpinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix()));
this.repaintPreviewBarCode();
}
@@ -281,9 +289,9 @@ public class BarCodePane extends FurtherBasicBeanPane {
public BarcodePresent updateBean() {
BarcodeAttr barcodeAttr = new BarcodeAttr();
if ((typeComboBox.getSelectedIndex() == NUM16)) {
- barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex());
- barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex());
- barcodeAttr.setRcodeDrawPix((int) this.RCodesizespinner.getValue());
+ barcodeAttr.setRCodeVersion(this.versionComboBox.getSelectedIndex());
+ barcodeAttr.setRCodeErrorCorrect(this.errorCorrectComboBox.getSelectedIndex());
+ barcodeAttr.setRcodeDrawPix((int) this.sizeSpinner.getValue());
}
barcodeAttr.setType(this.typeComboBox.getSelectedIndex());
barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10);
diff --git a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
index 6eac1c5710..5aafd01edb 100644
--- a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
+++ b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
@@ -16,6 +16,7 @@ import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection;
+import com.fr.grid.selection.Selection;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
@@ -29,6 +30,7 @@ import com.fr.stable.Nameable;
public class ConditionAttributesGroupPane extends UIListControlPane {
private static ConditionAttributesGroupPane singleton;
private TemplateCellElement editCellElement; // 当前单元格对象
+ private Selection editSelection; // 当前编辑对象
private ElementCasePane ePane;
private ConditionAttributesGroupPane() {
@@ -52,10 +54,8 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
if (isPopulating) {
return;
}
- final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
-
- ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
+ ReportActionUtils.actionIterateWithCellSelection((CellSelection) editSelection, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup());
}
@@ -75,6 +75,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
public void populate(ElementCasePane ePane) {
this.ePane = ePane;
+ this.editSelection = ePane.getSelection();
CellSelection cs = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow());
diff --git a/designer/src/com/fr/design/report/package.html b/designer/src/com/fr/design/report/package.html
new file mode 100644
index 0000000000..c956ed1f36
--- /dev/null
+++ b/designer/src/com/fr/design/report/package.html
@@ -0,0 +1,5 @@
+
+
+包含制作模版过程中可能用到的各种面板(如页面设置、富文本编辑、Excel导出、移动端自适应等)
+
+
\ No newline at end of file
diff --git a/designer/src/com/fr/design/webattr/EditToolBar.java b/designer/src/com/fr/design/webattr/EditToolBar.java
index 938fd4509b..a8ebd932fc 100644
--- a/designer/src/com/fr/design/webattr/EditToolBar.java
+++ b/designer/src/com/fr/design/webattr/EditToolBar.java
@@ -34,13 +34,12 @@ import com.fr.report.web.button.Export;
import com.fr.report.web.button.PDFPrint;
import com.fr.report.web.button.Print;
import com.fr.report.web.button.write.AppendColumnRow;
+import com.fr.report.web.button.write.ExcelImport;
import com.fr.report.web.button.write.Submit;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
@@ -52,488 +51,512 @@ import java.util.Set;
public class EditToolBar extends BasicPane {
- private JWorkBook jwb;
- private JList list;
- private DefaultListModel listModel;
- private JPanel right;
- private CardLayout card;
- private ButtonPane bp;
- private ToolBarButton lastButton;
- private Background background = null;
- private UICheckBox defaultCheckBox;
-
- private ListSelectionListener listSelectionListener = new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent evt) {
- if (lastButton != null) {
- lastButton.setWidget(bp.update());
- }
- if (list.getSelectedValue() instanceof ToolBarButton) {
- lastButton = (ToolBarButton) list.getSelectedValue();
- if (lastButton.getWidget() instanceof Button) {
- card.show(right, "button");
- bp.populate(lastButton.getWidget());
- } else {
- bp.populate(lastButton.getWidget());
- card.show(right, "none");
- }
- }
- }
- };
-
-
- private ActionListener actioner = new ActionListener() {
- /**
- *
- */
- public void actionPerformed(ActionEvent arg0) {
- final BackgroundPane backgroundPane = new BackgroundPane();
- BasicDialog dialog = backgroundPane.showWindow(DesignerContext.getDesignerFrame());
- backgroundPane.populate(EditToolBar.this.background);
- dialog.addDialogActionListener(new DialogActionAdapter() {
- public void doOk() {
- EditToolBar.this.background = backgroundPane.update();
- if (EditToolBar.this.background != null) {
- EditToolBar.this.defaultCheckBox.setSelected(false);
- }
- }
- });
- dialog.setVisible(true);
- }
- };
-
- public EditToolBar() {
- initComponent();
- }
-
- /**
- * 初始化
- */
- public void initComponent() {
- this.setLayout(FRGUIPaneFactory.createBorderLayout());
- JPanel left = FRGUIPaneFactory.createBorderLayout_S_Pane();
- listModel = new DefaultListModel();
- list = new JList(listModel);
- list.setCellRenderer(render);
- left.add(new JScrollPane(list), BorderLayout.CENTER);
- if (listModel.getSize() > 0) {
- list.setSelectedIndex(0);
- }
-
- ToolBarDef toolbarDef = new ToolBarDef();
- toolbarDef.addShortCut(new MoveUpItemAction());
- toolbarDef.addShortCut(new MoveDownItemAction());
- toolbarDef.addShortCut(new RemoveAction());
- UIToolbar toolBar = ToolBarDef.createJToolBar();
- toolbarDef.updateToolBar(toolBar);
- left.add(toolBar, BorderLayout.NORTH);
-
- right = FRGUIPaneFactory.createCardLayout_S_Pane();
- card = new CardLayout();
- right.setLayout(card);
- bp = new ButtonPane();
- right.add("none", FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane());
- right.add("button", bp);
-
- JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, left, right);
- // splitPane.setDividerLocation(left.getMinimumSize().width);
- splitPane.setDividerLocation(120);
- this.add(splitPane);
- list.addListSelectionListener(listSelectionListener);
- JPanel backgroundPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- UIButton bgButton = new UIButton(Inter.getLocText(new String[]{"Background", "Set"}));
- defaultCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Default", "Background"}));
- bgButton.addActionListener(actioner);
- backgroundPane.add(defaultCheckBox);
- backgroundPane.add(bgButton);
- backgroundPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText(new String[]{"Background", "Set"})));
- this.add(backgroundPane, BorderLayout.SOUTH);
- }
-
- ListCellRenderer render = new DefaultListCellRenderer() {
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
- super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-
- if (value instanceof ToolBarButton) {
- ToolBarButton button = (ToolBarButton) value;
- this.setText(button.getNameOption().optionName());
- this.setIcon(button.getNameOption().optionIcon());
- }
- return this;
- }
- };
-
- @Override
- protected String title4PopupWindow() {
- return Inter.getLocText("FR-Designer_Edit");
- }
-
- public void populate(FToolBar ftoolbar) {
- this.populate(ftoolbar, null);
- }
-
- public void populate(FToolBar ftoolbar, ToolBarButton button) {
- if (ftoolbar == null) {
- return;
- }
- for (int i = 0; i < ftoolbar.getButtonlist().size(); i++) {
- listModel.addElement(ftoolbar.getButtonlist().get(i));
- }
- this.list.validate();
- this.list.repaint();
- if (ftoolbar.getButtonlist().size() > 0) {
- this.list.setSelectedIndex(0);
- }
- if (button != null) {
- this.list.setSelectedValue(button, true);
- }
- this.background = ftoolbar.getBackground();
-
- this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false);
- }
-
- public FToolBar update() {
- if (this.list.getSelectedIndex() > -1) {
- for (int i = 0; i < listModel.getSize(); i++) {
- this.list.setSelectedIndex(i);
- ToolBarButton toolBarButton = (ToolBarButton) this.list.getSelectedValue();
- Widget widget = this.bp.update();
- toolBarButton.setWidget(widget);
- if (widget instanceof Button) {
- String iconname = ((Button) widget).getIconName();
- if (StringUtils.isNotBlank(iconname)) {
- Image iimage = WidgetManager.getProviderInstance().getIconManager().getIconImage(iconname);
- toolBarButton.setIcon(new ImageIcon(iimage));
- }
- }
- }
- }
- List list = new ArrayList();
- for (int i = 0; i < listModel.size(); i++) {
- list.add((ToolBarButton) listModel.get(i));
- }
- FToolBar ftoolBar = new FToolBar();
- ftoolBar.setButtonlist(list);
-
- ftoolBar.setDefault(this.defaultCheckBox.isSelected());
- if (!ftoolBar.isDefault()) {
- ftoolBar.setBackground(this.background);
- }
- return ftoolBar;
- }
-
- private class MoveUpItemAction extends UpdateAction {
- public MoveUpItemAction() {
- this.setName(Inter.getLocText("Utils-Move_Up"));
- this.setMnemonic('U');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/up.png"));
- }
-
- /**
- *
- */
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = list.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
-
- // 上移
- if (selectedIndex > 0) {
- DefaultListModel listModel = (DefaultListModel) list.getModel();
-
- Object selecteObj1 = listModel.get(selectedIndex - 1);
- listModel.set(selectedIndex - 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
-
- list.setSelectedIndex(selectedIndex - 1);
- list.ensureIndexIsVisible(selectedIndex - 1);
- list.validate();
- }
- }
- }
-
- private class MoveDownItemAction extends UpdateAction {
- public MoveDownItemAction() {
- this.setName(Inter.getLocText("Utils-Move_Down"));
- this.setMnemonic('D');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/down.png"));
- }
-
- /**
- *
- */
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = list.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
-
- // 下移
- if (selectedIndex == -1) {
- return;
- }
-
- if (selectedIndex < list.getModel().getSize() - 1) {
- DefaultListModel listModel = (DefaultListModel) list.getModel();
-
- Object selecteObj1 = listModel.get(selectedIndex + 1);
- listModel.set(selectedIndex + 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
-
- list.setSelectedIndex(selectedIndex + 1);
- list.ensureIndexIsVisible(selectedIndex + 1);
- list.validate();
- }
- }
- }
-
- public class RemoveAction extends UpdateAction {
- public RemoveAction() {
- this.setName(Inter.getLocText("FR-Designer_Delete"));
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
- }
-
- /**
- * 动作
- * @param e 事件
- */
- public void actionPerformed(ActionEvent e) {
- int i = list.getSelectedIndex();
- if (i < 0 || !(listModel.getElementAt(i) instanceof ToolBarButton)) {
- return;
- }
- int val = JOptionPane.showConfirmDialog(EditToolBar.this, Inter.getLocText("FR-Designer_Are_You_Sure_To_Delete_The_Data") + "?", "Message", JOptionPane.YES_NO_OPTION);
- if (val != JOptionPane.YES_OPTION) {
- return;
- }
- listModel.removeElementAt(i);
- list.validate();
- if (listModel.size() > 0) {
- list.setSelectedIndex(0);
- } else {
- card.show(right, "none");
- }
- }
- }
-
- public class ButtonPane extends BasicPane {
- private CardLayout card;
- private JPanel centerPane;
- private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word,
- flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit, isCurSheet;
- private UIBasicSpinner count;
- private Widget widget;
- private UITextField nameField;
- private IconDefinePane iconPane;
- private UIButton button;
- private JavaScriptActionPane javaScriptPane;
- private ExportToolBarProvider[] exportToolBarProviders;
-
- private ActionListener actionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- if (isVerify.isSelected()) {
- failSubmit.setVisible(true);
- } else {
- failSubmit.setVisible(false);
- failSubmit.setSelected(false);
- }
- }
- };
-
- public ButtonPane() {
- this.initComponents();
- }
-
- /**
- * 初始化元素
- */
- public void initComponents() {
- Set set = ExtraDesignClassManager.getInstance().getArray(ExportToolBarProvider.XML_TAG);
- exportToolBarProviders = set.toArray(new ExportToolBarProvider[set.size()]);
- this.setLayout(FRGUIPaneFactory.createBorderLayout());
- JPanel north = FRGUIPaneFactory.createBorderLayout_S_Pane();
- icon = new UICheckBox(Inter.getLocText("FR-Designer_Show_Icon"));
- text = new UICheckBox(Inter.getLocText("FR-Designer_Show_Text"));
-
- north.add(icon, BorderLayout.NORTH);
- north.add(text, BorderLayout.CENTER);
-
- nameField = new UITextField(8);
- iconPane = new IconDefinePane();
- javaScriptPane = JavaScriptActionPane.createDefault();
-
- double p = TableLayout.PREFERRED;
- double rowSize[] = {p, p};
- double columnSize[] = {p, p};
-
- Component[][] coms = new Component[][]{{new UILabel(Inter.getLocText(new String[]{"Widget", "Printer-Alias"}) + ":"), nameField}, {new UILabel(Inter.getLocText(new String[]{"Widget", "Icon"}) + ":"), iconPane}};
-
- JPanel nameIconPane = TableLayoutHelper.createTableLayoutPane(coms, rowSize, columnSize);
-
- north.add(nameIconPane, BorderLayout.SOUTH);
-
- north.setBorder(BorderFactory.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"})));
- this.add(north, BorderLayout.NORTH);
- JPanel none = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- centerPane = FRGUIPaneFactory.createCardLayout_S_Pane();
- card = new CardLayout();
- centerPane.setLayout(card);
- centerPane.add("custom", getCustomPane());
- centerPane.add("export", getExport());
- centerPane.add("print", getPrint());
- centerPane.add("none", none);
- centerPane.add("pdfprint", getPdfPrintSetting());
- // centerPane.add("editexcel", editExcel);
- centerPane.add(getCpane(), "appendcount");
- centerPane.add(getSubmitPane(), "submit");
+ private JWorkBook jwb;
+ private JList list;
+ private DefaultListModel listModel;
+ private JPanel right;
+ private CardLayout card;
+ private ButtonPane bp;
+ private ToolBarButton lastButton;
+ private Background background = null;
+ private UICheckBox defaultCheckBox;
+
+ private ListSelectionListener listSelectionListener = new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent evt) {
+ if (lastButton != null) {
+ lastButton.setWidget(bp.update());
+ }
+ if (list.getSelectedValue() instanceof ToolBarButton) {
+ lastButton = (ToolBarButton) list.getSelectedValue();
+ if (lastButton.getWidget() instanceof Button) {
+ card.show(right, "button");
+ bp.populate(lastButton.getWidget());
+ } else {
+ bp.populate(lastButton.getWidget());
+ card.show(right, "none");
+ }
+ }
+ }
+ };
+
+
+ private ActionListener actioner = new ActionListener() {
+ /**
+ *
+ */
+ public void actionPerformed(ActionEvent arg0) {
+ final BackgroundPane backgroundPane = new BackgroundPane();
+ BasicDialog dialog = backgroundPane.showWindow(DesignerContext.getDesignerFrame());
+ backgroundPane.populate(EditToolBar.this.background);
+ dialog.addDialogActionListener(new DialogActionAdapter() {
+ public void doOk() {
+ EditToolBar.this.background = backgroundPane.update();
+ if (EditToolBar.this.background != null) {
+ EditToolBar.this.defaultCheckBox.setSelected(false);
+ }
+ }
+ });
+ dialog.setVisible(true);
+ }
+ };
+
+ public EditToolBar() {
+ initComponent();
+ }
+
+ /**
+ * 初始化
+ */
+ public void initComponent() {
+ this.setLayout(FRGUIPaneFactory.createBorderLayout());
+ JPanel left = FRGUIPaneFactory.createBorderLayout_S_Pane();
+ listModel = new DefaultListModel();
+ list = new JList(listModel);
+ list.setCellRenderer(render);
+ left.add(new JScrollPane(list), BorderLayout.CENTER);
+ if (listModel.getSize() > 0) {
+ list.setSelectedIndex(0);
+ }
+
+ ToolBarDef toolbarDef = new ToolBarDef();
+ toolbarDef.addShortCut(new MoveUpItemAction());
+ toolbarDef.addShortCut(new MoveDownItemAction());
+ toolbarDef.addShortCut(new RemoveAction());
+ UIToolbar toolBar = ToolBarDef.createJToolBar();
+ toolbarDef.updateToolBar(toolBar);
+ left.add(toolBar, BorderLayout.NORTH);
+
+ right = FRGUIPaneFactory.createCardLayout_S_Pane();
+ card = new CardLayout();
+ right.setLayout(card);
+ bp = new ButtonPane();
+ right.add("none", FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane());
+ right.add("button", bp);
+
+ JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, left, right);
+ // splitPane.setDividerLocation(left.getMinimumSize().width);
+ splitPane.setDividerLocation(120);
+ this.add(splitPane);
+ list.addListSelectionListener(listSelectionListener);
+ JPanel backgroundPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
+ UIButton bgButton = new UIButton(Inter.getLocText(new String[]{"Background", "Set"}));
+ defaultCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Default", "Background"}));
+ bgButton.addActionListener(actioner);
+ backgroundPane.add(defaultCheckBox);
+ backgroundPane.add(bgButton);
+ backgroundPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText(new String[]{"Background", "Set"})));
+ this.add(backgroundPane, BorderLayout.SOUTH);
+ }
+
+ ListCellRenderer render = new DefaultListCellRenderer() {
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+
+ if (value instanceof ToolBarButton) {
+ ToolBarButton button = (ToolBarButton) value;
+ this.setText(button.getNameOption().optionName());
+ this.setIcon(button.getNameOption().optionIcon());
+ }
+ return this;
+ }
+ };
+
+ @Override
+ protected String title4PopupWindow() {
+ return Inter.getLocText("FR-Designer_Edit");
+ }
+
+ public void populate(FToolBar ftoolbar) {
+ this.populate(ftoolbar, null);
+ }
+
+ public void populate(FToolBar ftoolbar, ToolBarButton button) {
+ if (ftoolbar == null) {
+ return;
+ }
+ for (int i = 0; i < ftoolbar.getButtonlist().size(); i++) {
+ listModel.addElement(ftoolbar.getButtonlist().get(i));
+ }
+ this.list.validate();
+ this.list.repaint();
+ if (ftoolbar.getButtonlist().size() > 0) {
+ this.list.setSelectedIndex(0);
+ }
+ if (button != null) {
+ this.list.setSelectedValue(button, true);
+ }
+ this.background = ftoolbar.getBackground();
+
+ this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false);
+ }
+
+ public FToolBar update() {
+ if (this.list.getSelectedIndex() > -1) {
+ for (int i = 0; i < listModel.getSize(); i++) {
+ this.list.setSelectedIndex(i);
+ ToolBarButton toolBarButton = (ToolBarButton) this.list.getSelectedValue();
+ Widget widget = this.bp.update();
+ toolBarButton.setWidget(widget);
+ if (widget instanceof Button) {
+ String iconname = ((Button) widget).getIconName();
+ if (StringUtils.isNotBlank(iconname)) {
+ Image iimage = WidgetManager.getProviderInstance().getIconManager().getIconImage(iconname);
+ toolBarButton.setIcon(new ImageIcon(iimage));
+ }
+ }
+ }
+ }
+ List list = new ArrayList();
+ for (int i = 0; i < listModel.size(); i++) {
+ list.add((ToolBarButton) listModel.get(i));
+ }
+ FToolBar ftoolBar = new FToolBar();
+ ftoolBar.setButtonlist(list);
+
+ ftoolBar.setDefault(this.defaultCheckBox.isSelected());
+ if (!ftoolBar.isDefault()) {
+ ftoolBar.setBackground(this.background);
+ }
+ return ftoolBar;
+ }
+
+ private class MoveUpItemAction extends UpdateAction {
+ public MoveUpItemAction() {
+ this.setName(Inter.getLocText("Utils-Move_Up"));
+ this.setMnemonic('U');
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/up.png"));
+ }
+
+ /**
+ *
+ */
+ public void actionPerformed(ActionEvent evt) {
+ int selectedIndex = list.getSelectedIndex();
+ if (selectedIndex == -1) {
+ return;
+ }
+
+ // 上移
+ if (selectedIndex > 0) {
+ DefaultListModel listModel = (DefaultListModel) list.getModel();
+
+ Object selecteObj1 = listModel.get(selectedIndex - 1);
+ listModel.set(selectedIndex - 1, listModel.get(selectedIndex));
+ listModel.set(selectedIndex, selecteObj1);
+
+ list.setSelectedIndex(selectedIndex - 1);
+ list.ensureIndexIsVisible(selectedIndex - 1);
+ list.validate();
+ }
+ }
+ }
+
+ private class MoveDownItemAction extends UpdateAction {
+ public MoveDownItemAction() {
+ this.setName(Inter.getLocText("Utils-Move_Down"));
+ this.setMnemonic('D');
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/down.png"));
+ }
+
+ /**
+ *
+ */
+ public void actionPerformed(ActionEvent evt) {
+ int selectedIndex = list.getSelectedIndex();
+ if (selectedIndex == -1) {
+ return;
+ }
+
+ // 下移
+ if (selectedIndex == -1) {
+ return;
+ }
+
+ if (selectedIndex < list.getModel().getSize() - 1) {
+ DefaultListModel listModel = (DefaultListModel) list.getModel();
+
+ Object selecteObj1 = listModel.get(selectedIndex + 1);
+ listModel.set(selectedIndex + 1, listModel.get(selectedIndex));
+ listModel.set(selectedIndex, selecteObj1);
+
+ list.setSelectedIndex(selectedIndex + 1);
+ list.ensureIndexIsVisible(selectedIndex + 1);
+ list.validate();
+ }
+ }
+ }
+
+ public class RemoveAction extends UpdateAction {
+ public RemoveAction() {
+ this.setName(Inter.getLocText("FR-Designer_Delete"));
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
+ }
+
+ /**
+ * 动作
+ *
+ * @param e 事件
+ */
+ public void actionPerformed(ActionEvent e) {
+ int i = list.getSelectedIndex();
+ if (i < 0 || !(listModel.getElementAt(i) instanceof ToolBarButton)) {
+ return;
+ }
+ int val = JOptionPane.showConfirmDialog(EditToolBar.this, Inter.getLocText("FR-Designer_Are_You_Sure_To_Delete_The_Data") + "?", "Message", JOptionPane.YES_NO_OPTION);
+ if (val != JOptionPane.YES_OPTION) {
+ return;
+ }
+ listModel.removeElementAt(i);
+ list.validate();
+ if (listModel.size() > 0) {
+ list.setSelectedIndex(0);
+ } else {
+ card.show(right, "none");
+ }
+ }
+ }
+
+ public class ButtonPane extends BasicPane {
+ private CardLayout card;
+ private JPanel centerPane;
+ private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word,
+ flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit,
+ isCurSheet, excelImClean, excelImCover, excelImAppend, excelImCust;
+ private UIBasicSpinner count;
+ private Widget widget;
+ private UITextField nameField;
+ private IconDefinePane iconPane;
+ private UIButton button;
+ private JavaScriptActionPane javaScriptPane;
+ private ExportToolBarProvider[] exportToolBarProviders;
+
+ private ActionListener actionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if (isVerify.isSelected()) {
+ failSubmit.setVisible(true);
+ } else {
+ failSubmit.setVisible(false);
+ failSubmit.setSelected(false);
+ }
+ }
+ };
+
+ public ButtonPane() {
+ this.initComponents();
+ }
+
+ /**
+ * 初始化元素
+ */
+ public void initComponents() {
+ Set set = ExtraDesignClassManager.getInstance().getArray(ExportToolBarProvider.XML_TAG);
+ exportToolBarProviders = set.toArray(new ExportToolBarProvider[set.size()]);
+ this.setLayout(FRGUIPaneFactory.createBorderLayout());
+ JPanel north = FRGUIPaneFactory.createBorderLayout_S_Pane();
+ icon = new UICheckBox(Inter.getLocText("FR-Designer_Show_Icon"));
+ text = new UICheckBox(Inter.getLocText("FR-Designer_Show_Text"));
+
+ north.add(icon, BorderLayout.NORTH);
+ north.add(text, BorderLayout.CENTER);
+
+ nameField = new UITextField(8);
+ iconPane = new IconDefinePane();
+ javaScriptPane = JavaScriptActionPane.createDefault();
+
+ double p = TableLayout.PREFERRED;
+ double rowSize[] = {p, p};
+ double columnSize[] = {p, p};
+
+ Component[][] coms = new Component[][]{{new UILabel(Inter.getLocText(new String[]{"Widget", "Printer-Alias"}) + ":"), nameField}, {new UILabel(Inter.getLocText(new String[]{"Widget", "Icon"}) + ":"), iconPane}};
+
+ JPanel nameIconPane = TableLayoutHelper.createTableLayoutPane(coms, rowSize, columnSize);
+
+ north.add(nameIconPane, BorderLayout.SOUTH);
+
+ north.setBorder(BorderFactory.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"})));
+ this.add(north, BorderLayout.NORTH);
+ JPanel none = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
+ centerPane = FRGUIPaneFactory.createCardLayout_S_Pane();
+ card = new CardLayout();
+ centerPane.setLayout(card);
+ centerPane.add("custom", getCustomPane());
+ centerPane.add("export", getExport());
+ centerPane.add("import", getImport());
+ centerPane.add("print", getPrint());
+ centerPane.add("none", none);
+ centerPane.add("pdfprint", getPdfPrintSetting());
+ // centerPane.add("editexcel", editExcel);
+ centerPane.add(getCpane(), "appendcount");
+ centerPane.add(getSubmitPane(), "submit");
Set extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
provider.updateCenterPane(centerPane);
}
- this.add(centerPane, BorderLayout.CENTER);
- }
-
-
- private JPanel getCustomPane() {
- JPanel customPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
-
- button = new UIButton(Inter.getLocText("FR-Designer_User_Defined_Event"));
- customPane.add(button);
- customPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Edit") + "JS", null));
- button.addActionListener(l);
- return customPane;
- }
-
- private JPanel getExport() {
- JPanel export = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
- // export.setLayout(new BoxLayout(export, BoxLayout.Y_AXIS));
- pdf = new UICheckBox(Inter.getLocText("FR-Designer_Output_PDF"));
- excelP = new UICheckBox(Inter.getLocText("FR-Designer-Output_Excel_Page"));
- excelO = new UICheckBox(Inter.getLocText("FR-Designer-Output_Excel_Simple"));
- excelS = new UICheckBox(Inter.getLocText("FR-Designer-Output_Excel_Sheet"));
- word = new UICheckBox(Inter.getLocText("FR-Designer_Output_Word"));
- image = new UICheckBox(Inter.getLocText("FR-Designer_Image"));
- export.add(pdf);
- export.add(Box.createVerticalStrut(2));
- export.add(excelP);
- export.add(Box.createVerticalStrut(2));
- export.add(excelO);
- export.add(Box.createVerticalStrut(2));
- export.add(excelS);
- export.add(Box.createVerticalStrut(2));
- export.add(word);
- export.add(Box.createVerticalStrut(2));
- export.add(image);
- for(int i=0; i extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
@@ -541,137 +564,157 @@ public class EditToolBar extends BasicPane {
}
}
- private void populateAppendColumnRow(){
- card.show(centerPane, "appendcount");
- count.setValue(((AppendColumnRow) widget).getCount());
- }
-
- private void populateExport(){
- card.show(centerPane, "export");
- Export export = (Export) widget;
- this.pdf.setSelected(export.isPdfAvailable());
- this.excelP.setSelected(export.isExcelPAvailable());
- this.excelO.setSelected(export.isExcelOAvailable());
- this.excelS.setSelected(export.isExcelSAvailable());
- this.word.setSelected(export.isWordAvailable());
- this.image.setSelected(export.isImageAvailable());
- if(exportToolBarProviders != null){
- for(int i=0; i extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
provider.update(widget);
}
- return widget;
- }
-
- private void updateDefault(){
- ((Button) widget).setShowIcon(this.icon.isSelected());
- ((Button) widget).setShowText(this.text.isSelected());
- ((Button) widget).setText(this.nameField.getText());
- ((Button) widget).setIconName(this.iconPane.update());
- }
-
- private void updateSubmit(){
- Submit submit = ((Submit) widget);
- submit.setVerify(this.isVerify.isSelected());
- submit.setFailVerifySubmit(this.failSubmit.isSelected());
- submit.setOnlySubmitSelect(this.isCurSheet.isSelected());
- }
-
- private void updatePrint(){
- Print print = (Print) widget;
- print.setAppletPrint(this.appletPrint.isSelected());
- print.setFlashPrint(this.flashPrint.isSelected());
- print.setPDFPrint(this.pdfPrint.isSelected());
- print.setServerPrint(this.serverPrint.isSelected());
- }
-
- private void updateExport(){
- Export export = (Export) widget;
- export.setPdfAvailable(this.pdf.isSelected());
- export.setExcelPAvailable(this.excelP.isSelected());
- export.setExcelOAvailable(this.excelO.isSelected());
- export.setExcelSAvailable(this.excelS.isSelected());
- export.setWordAvailable(this.word.isSelected());
- export.setImageAvailable(this.image.isSelected());
- if(exportToolBarProviders != null){
- for(int i=0; i
+
+模版web属性相关界面
+
+