forked from fanruan/design
Browse Source
# Conflicts: # designer_base/src/com/fr/design/locale/designer.properties # designer_base/src/com/fr/design/locale/designer_en_US.properties # designer_base/src/com/fr/design/locale/designer_zh_CN.properties # designer_base/src/com/fr/design/locale/designer_zh_TW.propertiesmaster
64 changed files with 1605 additions and 519 deletions
@ -1 +1 @@
|
||||
package com.fr.design.widget.ui;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
design.gui.icheckbox.UICheckBox;
design.gui.icheckbox.UICheckBox;
design.gui.icheckbox.UICheckBox;
design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
design.gui.icheckbox.UICheckBox;
import com.fr.design.utils.gui.GUICoreUtils;
design.gui.icheckbox.UICheckBox;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
design.gui.icheckbox.UICheckBox;
import com.fr.general.Inter;
design.gui.icheckbox.UICheckBox;
design.gui.icheckbox.UICheckBox;
import javax.swing.*;
design.gui.icheckbox.UICheckBox;
import java.awt.*;
design.gui.icheckbox.UICheckBox;
/**
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.FRGUIPaneFactory;
design.gui.icheckbox.UICheckBox;
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
this.customDataCheckBox.setPreferredSize(new Dimension(100, 30));
getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5));
JPanel otherContentPane = this.setForthContentPane();
if (otherContentPane != null) {
contentPane.add(otherContentPane,BorderLayout.CENTER);
}
return contentPane;
}
protected abstract JPanel setForthContentPane();
protected void populateSubWritableRepeatEditorBean(T e) {
this.customDataCheckBox.setSelected(e.isCustomData());
populateSubCustomWritableRepeatEditorBean(e);
}
protected abstract void populateSubCustomWritableRepeatEditorBean(T e);
protected T updateSubWritableRepeatEditorBean() {
T e = updateSubCustomWritableRepeatEditorBean();
e.setCustomData(this.customDataCheckBox.isSelected());
return e;
}
protected abstract T updateSubCustomWritableRepeatEditorBean();
} |
||||
package com.fr.design.widget.ui;
import com.fr.base.GraphHelper;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils;
design.gui.icheckbox.UICheckBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import com.fr.design.utils.gui.GUICoreUtils;
import java.awt.*;
import com.fr.design.utils.gui.GUICoreUtils;
/**
import com.fr.design.utils.gui.GUICoreUtils;
design.gui.icheckbox.UICheckBox;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
design.gui.icheckbox.UICheckBox;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
design.gui.icheckbox.UICheckBox;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.general.Inter;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import javax.swing.*;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import java.awt.*;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
/**
import com.fr.general.Inter;
import com.fr.general.Inter;
design.gui.icheckbox.UICheckBox;
import com.fr.general.Inter;
import com.fr.design.layout.FRGUIPaneFactory;
));
getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5));
JPanel otherContentPane = this.setForthContentPane();
if (otherContentPane != null) {
contentPane.add(otherContentPane,BorderLayout.CENTER);
}
return contentPane;
}
protected abstract JPanel setForthContentPane();
protected void populateSubWritableRepeatEditorBean(T e) {
this.customDataCheckBox.setSelected(e.isCustomData());
populateSubCustomWritableRepeatEditorBean(e);
}
protected abstract void populateSubCustomWritableRepeatEditorBean(T e);
protected T updateSubWritableRepeatEditorBean() {
T e = updateSubCustomWritableRepeatEditorBean();
e.setCustomData(this.customDataCheckBox.isSelected());
return e;
}
protected abstract T updateSubCustomWritableRepeatEditorBean();
} |
@ -0,0 +1,22 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.data.impl.DBTableData; |
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
/** |
||||
* Created by xiaxiang on 2017/1/15. |
||||
*/ |
||||
public interface DBTableDataMenuHandler extends Immutable { |
||||
String MARK_STRING = "DBTableDataMenuHandler"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
UpdateAction createQueryAction(); |
||||
|
||||
void populate(DBTableData dbTableData); |
||||
|
||||
DBTableData update(); |
||||
|
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.file.FILE; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
/** |
||||
* 指定设计器启动时默认打开的文件 |
||||
* Created by rinoux on 2016/12/16. |
||||
*/ |
||||
public interface DesignerStartOpenFileProcessor extends Immutable { |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
String XML_TAG = "DesignerStartOpenFileProcessor"; |
||||
|
||||
/** |
||||
* 显示需要打开的报表文件 |
||||
*/ |
||||
FILE fileToShow(); |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.data.impl.DBTableData; |
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.design.fun.DBTableDataMenuHandler; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by xiaxiang on 2017/1/15. |
||||
*/ |
||||
@API(level = DBTableDataMenuHandler.CURRENT_LEVEL) |
||||
public abstract class AbstractDBTableDataMenuHandler implements DBTableDataMenuHandler { |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
|
||||
public UpdateAction createQueryAction() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public DBTableData update() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public void populate(DBTableData dbTableData) { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.DesignerStartOpenFileProcessor; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by rinoux on 2016/12/16. |
||||
*/ |
||||
@API(level = DesignerStartOpenFileProcessor.CURRENT_LEVEL) |
||||
public abstract class AbstractDesignerStartOpenFileProcessor implements DesignerStartOpenFileProcessor { |
||||
public int currentAPILevel() { |
||||
return DesignerStartOpenFileProcessor.CURRENT_LEVEL; |
||||
} |
||||
|
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
} |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.6 KiB |
File diff suppressed because one or more lines are too long
@ -1,56 +1,192 @@
|
||||
package com.fr.design.style.color; |
||||
|
||||
import com.fr.file.XMLFileManager; |
||||
|
||||
|
||||
import com.fr.base.FRContext; |
||||
import com.fr.cluster.rpc.RPC; |
||||
import com.fr.file.BaseClusterHelper; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.stable.EnvChangedListener; |
||||
import com.fr.stable.xml.XMLPrintWriter; |
||||
import com.fr.stable.xml.XMLTools; |
||||
import com.fr.stable.xml.XMLableReader; |
||||
import com.fr.general.FRLogger; |
||||
|
||||
import java.awt.Color; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.io.InputStream; |
||||
|
||||
/** |
||||
* 最近使用颜色 |
||||
* @author focus |
||||
* |
||||
* @author focus |
||||
*/ |
||||
public class ColorSelectConfigManager{ |
||||
|
||||
// 最近使用的颜色个数
|
||||
private int colorNums = 20; |
||||
// 最近使用颜色
|
||||
private List<Color> colors; |
||||
|
||||
private static ColorSelectConfigManager colorSelectConfigManager = null; |
||||
|
||||
public Color[] getColors() { |
||||
if(colors == null){ |
||||
colors = new ArrayList<Color>(); |
||||
} |
||||
return colors.toArray(new Color[colors.size()]); |
||||
} |
||||
|
||||
public int getColorNum() { |
||||
return colorNums; |
||||
} |
||||
public void setColorNum(int colorNums) { |
||||
this.colorNums = colorNums; |
||||
} |
||||
|
||||
public synchronized static ColorSelectConfigManager getInstance() { |
||||
if (colorSelectConfigManager == null) { |
||||
colorSelectConfigManager = new ColorSelectConfigManager(); |
||||
} |
||||
return colorSelectConfigManager; |
||||
} |
||||
|
||||
/** |
||||
* 添加颜色到最近使用队列中 |
||||
* |
||||
* @param color 颜色 |
||||
* |
||||
*/ |
||||
public void addToColorQueue(Color color){ |
||||
// 过滤重复的最近使用颜色
|
||||
// 因为有个后进先出的问题,最近使用的颜色需要放到最前面所以没用set
|
||||
if(colors.contains(color)){ |
||||
colors.remove(color); |
||||
} |
||||
colors.add(color); |
||||
} |
||||
} |
||||
public class ColorSelectConfigManager extends XMLFileManager implements ColorSelectConfigManagerProvider { |
||||
|
||||
// 最近使用的颜色个数
|
||||
private int colorNums = 20; |
||||
|
||||
private static ColorSelectConfigManagerProvider configManager = null; |
||||
private static ColorSelectConfigManager colorSelectConfigManager = null; |
||||
private boolean init = true; |
||||
// 最近使用颜色
|
||||
private List<Color> colors = new ArrayList<Color>(); |
||||
private static final String RECENT_COLOR_TAG = "RecentColors"; |
||||
private static final String COLOR_TAG = "Color"; |
||||
|
||||
static { |
||||
GeneralContext.addEnvChangedListener(new EnvChangedListener() { |
||||
public void envChanged() { |
||||
ColorSelectConfigManager.envChanged(); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
private static void envChanged() { |
||||
configManager = null; |
||||
} |
||||
|
||||
public Color[] getColors() { |
||||
|
||||
//初次打开软件时从xml文件中获取历史颜色信息
|
||||
if (init) { |
||||
ColorSelectConfigManagerProvider manager = ColorSelectConfigManager.getProviderInstance(); |
||||
this.colors = manager.getColorsFromFile(); |
||||
init = false; |
||||
} |
||||
if (colors == null) { |
||||
colors = new ArrayList<Color>(); |
||||
} |
||||
return colors.toArray(new Color[colors.size()]); |
||||
} |
||||
|
||||
public int getColorNum() { |
||||
return colorNums; |
||||
} |
||||
|
||||
public void setColorNum(int colorNums) { |
||||
this.colorNums = colorNums; |
||||
} |
||||
|
||||
public synchronized static ColorSelectConfigManager getInstance() { |
||||
if (colorSelectConfigManager == null) { |
||||
colorSelectConfigManager = new ColorSelectConfigManager(); |
||||
} |
||||
return colorSelectConfigManager; |
||||
} |
||||
|
||||
/** |
||||
* 添加颜色到最近使用队列中 |
||||
* |
||||
* @param color 颜色 |
||||
*/ |
||||
public void addToColorQueue(Color color) { |
||||
// 过滤重复的最近使用颜色
|
||||
// 因为有个后进先出的问题,最近使用的颜色需要放到最前面所以没用set
|
||||
if (colors.contains(color)) { |
||||
colors.remove(color); |
||||
} |
||||
colors.add(color); |
||||
|
||||
/*@author yaohwu*/ |
||||
//将历史颜色信息保存到xml文件中去
|
||||
ColorSelectConfigManagerProvider manager = ColorSelectConfigManager.getProviderInstance(); |
||||
if (colors != null && !colors.isEmpty()) { |
||||
manager.setColorsToFile(colors); |
||||
} |
||||
try { |
||||
FRContext.getCurrentEnv().writeResource(manager); |
||||
} catch (Exception e) { |
||||
FRLogger.getLogger().error(e.getMessage()); |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 读取配置文件流 |
||||
* |
||||
* @param input 流 |
||||
* @throws Exception 异常 |
||||
*/ |
||||
@Override |
||||
public void readFromInputStream(InputStream input) throws Exception { |
||||
ColorSelectConfigManager manager = new ColorSelectConfigManager(); |
||||
XMLTools.readInputStreamXML(manager, input); |
||||
configManager = manager; |
||||
FRContext.getCurrentEnv().writeResource(configManager); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 获取配置管理接口 |
||||
* |
||||
* @return 配置管理接口ConfigManagerProvider |
||||
*/ |
||||
public synchronized static ColorSelectConfigManagerProvider getProviderInstance() { |
||||
if (configManager == null) { |
||||
if (isClusterMember()) { |
||||
return configManager; |
||||
} |
||||
configManager.readXMLFile(); |
||||
} |
||||
return configManager; |
||||
} |
||||
|
||||
private synchronized static boolean isClusterMember() { |
||||
switch (BaseClusterHelper.getClusterState()) { |
||||
case LEADER: |
||||
configManager = new ColorSelectConfigManager(); |
||||
RPC.registerSkeleton(configManager); |
||||
return false; |
||||
case MEMBER: |
||||
String ip = BaseClusterHelper.getMainServiceIP(); |
||||
configManager = (ColorSelectConfigManagerProvider) RPC.getProxy(ColorSelectConfigManager.class, ip); |
||||
return true; |
||||
default: |
||||
configManager = new ColorSelectConfigManager(); |
||||
break; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
public boolean writeResource() throws Exception { |
||||
return FRContext.getCurrentEnv().writeResource(ColorSelectConfigManager.getProviderInstance()); |
||||
} |
||||
|
||||
public String fileName() { |
||||
return "recentcolors.xml"; |
||||
} |
||||
|
||||
public void readXML(XMLableReader reader) { |
||||
String name = reader.getTagName(); |
||||
if (reader.isChildNode()) { |
||||
if (ComparatorUtils.equals(COLOR_TAG, name)) { |
||||
Color color = null; |
||||
colors.add(reader.getAttrAsColor("colors", color)); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void writeXML(XMLPrintWriter writer) { |
||||
writer.startTAG(RECENT_COLOR_TAG); |
||||
if (this.colors != null && !this.colors.isEmpty()) { |
||||
for (int i = 0; i < this.colors.size(); i++) { |
||||
writer.startTAG(COLOR_TAG); |
||||
writer.attr("colors", colors.get(i).getRGB()); |
||||
writer.end(); |
||||
} |
||||
} |
||||
writer.end(); |
||||
} |
||||
|
||||
public List<Color> getColorsFromFile() { |
||||
return this.colors; |
||||
} |
||||
|
||||
public void setColorsToFile(List<Color> colors) { |
||||
this.colors = colors; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,17 @@
|
||||
package com.fr.design.style.color; |
||||
|
||||
import com.fr.stable.file.RemoteXMLFileManagerProvider; |
||||
|
||||
import java.awt.Color; |
||||
import java.util.List; |
||||
|
||||
|
||||
/** |
||||
* Created by yaohwu on 2017/2/8. |
||||
*/ |
||||
public interface ColorSelectConfigManagerProvider extends RemoteXMLFileManagerProvider { |
||||
|
||||
List<Color> getColorsFromFile(); |
||||
|
||||
void setColorsToFile(List<Color> colors); |
||||
} |
@ -1 +1 @@
|
||||
package com.fr.design.write.submit;
import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.JavaEditorPane;
import com.fr.design.gui.frpane.ObjectProperiesPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
data.AbstractClassJob;
import com.fr.design.dialog.DialogActionAdapter;
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.stable.StringUtils;
data.AbstractClassJob;
import com.fr.design.formula.JavaEditorPane;
data.AbstractClassJob;
import com.fr.design.gui.ibutton.UIButton;
import java.awt.*;
data.AbstractClassJob;
import com.fr.design.gui.itextfield.UITextField;
import java.awt.event.ActionListener;
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
/**
* Author : Shockway
* Date: 13-7-29
* Time: 下午6:48
*/
public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane;
public static final int DEFAULT_LENGTH = 30;
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
UIButton browserButton = new UIButton(Inter.getLocText("Select"));
browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
editButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
import com.fr.design.formula.JavaEditorPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
reportletNamePane.add(editButton);
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
final ClassNameSelectPane bPane = new ClassNameSelectPane();
bPane.setClassPath(classNameTextField.getText());
bPane.showWindow(
SwingUtilities.getWindowAncestor(getWindowAncestor()),
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(bPane.getClassPath());
checkAddButtonEnable();
}
}).setVisible(true);
}
});
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB);
final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this),
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(javaEditorPane.getClassText());
checkAddButtonEnable();
}
});
javaEditorPane.addSaveActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dlg.doOK();
}
});
dlg.setVisible(true);
}
});
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null));
this.add(reportletNamePane, BorderLayout.NORTH);
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null));
this.add(objectProperiesPane, BorderLayout.CENTER);
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
UITextArea area = new UITextArea(2, 1);
area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.SubmitJob");
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.add(area);
dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null));
this.add(dsPane, BorderLayout.SOUTH);
checkAddButtonEnable();
}
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
public int getLengthOfTextField() {
import com.fr.design.layout.FRGUIPaneFactory;
data.AbstractClassJob;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
protected String title4PopupWindow() {
return "CustomJob";
}
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
protected Component getWindowAncestor() {
return this;
}
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
@Override
public void populateBean(Object ob) {
if (ob instanceof AbstractClassJob) {
AbstractClassJob cj = (AbstractClassJob) ob;
data.AbstractClassJob;
data.AbstractClassJob;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
data.AbstractClassJob;
import com.fr.design.beans.BasicBeanPane;
}
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
data.AbstractClassJob;
import com.fr.design.formula.JavaEditorPane;
data.AbstractClassJob;
import com.fr.design.gui.frpane.ObjectProperiesPane;
data.AbstractClassJob;
import com.fr.design.gui.ibutton.UIButton;
data.AbstractClassJob;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.gui.itextfield.UITextField;
Empty(classNameTextField.getText()));
}
/**
* 重置
*/
public void reset() {
this.classNameTextField.setText(null);
this.checkAddButtonEnable();
}
} |
||||
package com.fr.design.write.submit;
import com.fr.data.AbstractClassJob;
import com.fr.design.layout.FRGUIPaneFactory;
data.AbstractClassJob;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.dialog.DialogActionAdapter;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
data.AbstractClassJob;
import com.fr.stable.StringUtils;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.formula.JavaEditorPane;
data.AbstractClassJob;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.gui.ibutton.UIButton;
data.AbstractClassJob;
import java.awt.*;
data.AbstractClassJob;
data.AbstractClassJob;
import com.fr.design.gui.itextfield.UITextField;
data.AbstractClassJob;
import java.awt.event.ActionListener;
data.AbstractClassJob;
/**
data.AbstractClassJob;
* Author : Shockway
data.AbstractClassJob;
* Date: 13-7-29
data.AbstractClassJob;
* Time: 下午6:48
data.AbstractClassJob;
*/
data.AbstractClassJob;
public abstract class CustomJobPane extends BasicBeanPane {
data.AbstractClassJob;
protected UITextField classNameTextField;
data.AbstractClassJob;
protected ObjectProperiesPane objectProperiesPane;
data.AbstractClassJob;
public static final int DEFAULT_LENGTH = 30;
data.AbstractClassJob;
*/
data.AbstractClassJob;
public CustomJobPane() {
data.AbstractClassJob;
this.setLayout(FRGUIPaneFactory.createBorderLayout());
data.AbstractClassJob;
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
data.AbstractClassJob;
classNameTextField = new UITextField(getLengthOfTextField());
data.AbstractClassJob;
reportletNamePane.add(classNameTextField);
data.AbstractClassJob;
UIButton browserButton = new UIButton(Inter.getLocText("Select"));
data.AbstractClassJob;
browserButton.setPreferredSize(new Dimension(
data.AbstractClassJob;
browserButton.getPreferredSize().width,
data.AbstractClassJob;
classNameTextField.getPreferredSize().height));
data.AbstractClassJob;
*/
data.AbstractClassJob;
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
data.AbstractClassJob;
editButton.setPreferredSize(new Dimension(
data.AbstractClassJob;
browserButton.getPreferredSize().width,
data.AbstractClassJob;
classNameTextField.getPreferredSize().height));
data.AbstractClassJob;
reportletNamePane.add(browserButton);
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.formula.JavaEditorPane;
data.AbstractClassJob;
reportletNamePane.add(editButton);
data.AbstractClassJob;
browserButton.addActionListener(new ActionListener() {
data.AbstractClassJob;
public void actionPerformed(ActionEvent evt) {
data.AbstractClassJob;
final ClassNameSelectPane bPane = new ClassNameSelectPane();
data.AbstractClassJob;
bPane.setClassPath(classNameTextField.getText());
data.AbstractClassJob;
bPane.showWindow(
data.AbstractClassJob;
SwingUtilities.getWindowAncestor(getWindowAncestor()),
data.AbstractClassJob;
new DialogActionAdapter() {
data.AbstractClassJob;
public void doOk() {
data.AbstractClassJob;
classNameTextField.setText(bPane.getClassPath());
data.AbstractClassJob;
checkAddButtonEnable();
data.AbstractClassJob;
}
data.AbstractClassJob;
}).setVisible(true);
data.AbstractClassJob;
}
data.AbstractClassJob;
});
data.AbstractClassJob;
editButton.addActionListener(new ActionListener() {
data.AbstractClassJob;
@Override
data.AbstractClassJob;
public void actionPerformed(ActionEvent e) {
data.AbstractClassJob;
final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB);
data.AbstractClassJob;
final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this),
data.AbstractClassJob;
new DialogActionAdapter() {
data.AbstractClassJob;
public void doOk() {
data.AbstractClassJob;
classNameTextField.setText(javaEditorPane.getClassText());
data.AbstractClassJob;
}
data.AbstractClassJob;
});
data.AbstractClassJob;
javaEditorPane.addSaveActionListener(new ActionListener() {
data.AbstractClassJob;
@Override
data.AbstractClassJob;
public void actionPerformed(ActionEvent e) {
data.AbstractClassJob;
dlg.doOK();
data.AbstractClassJob;
}
data.AbstractClassJob;
});
data.AbstractClassJob;
dlg.setVisible(true);
checkAddButtonEnable();
data.AbstractClassJob;
}
data.AbstractClassJob;
});
data.AbstractClassJob;
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null));
data.AbstractClassJob;
this.add(reportletNamePane, BorderLayout.NORTH);
data.AbstractClassJob;
objectProperiesPane = new ObjectProperiesPane();
data.AbstractClassJob;
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null));
data.AbstractClassJob;
this.add(objectProperiesPane, BorderLayout.CENTER);
data.AbstractClassJob;
UITextArea area = new UITextArea(2, 1);
data.AbstractClassJob;
area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.SubmitJob");
data.AbstractClassJob;
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
data.AbstractClassJob;
dsPane.add(area);
data.AbstractClassJob;
dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null));
data.AbstractClassJob;
this.add(dsPane, BorderLayout.SOUTH);
data.AbstractClassJob;
checkAddButtonEnable();
data.AbstractClassJob;
}
data.AbstractClassJob;
public int getLengthOfTextField() {
data.AbstractClassJob;
*/
data.AbstractClassJob;
import com.fr.design.layout.FRGUIPaneFactory;
data.AbstractClassJob;
data.AbstractClassJob;
protected String title4PopupWindow() {
data.AbstractClassJob;
return "CustomJob";
data.AbstractClassJob;
protected Component getWindowAncestor() {
data.AbstractClassJob;
return this;
data.AbstractClassJob;
@Override
data.AbstractClassJob;
public void populateBean(Object ob) {
data.AbstractClassJob;
if (ob instanceof AbstractClassJob) {
data.AbstractClassJob;
AbstractClassJob cj = (AbstractClassJob) ob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
data.AbstractClassJob;
if (ob instanceof AbstractClassJob) {
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
data.AbstractClassJob;
if (ob instanceof AbstractClassJob) {
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.beans.BasicBeanPane;
return this;
data.AbstractClassJob;
if (ob instanceof AbstractClassJob) {
data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.formula.JavaEditorPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.gui.frpane.ObjectProperiesPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.gui.itextarea.UITextArea;
AbstractClassJob cj = (AbstractClassJob) ob;
this.classNameTextField.setText(cj.getClassName());
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.dialog.BasicDialog;
checkAddButtonEnable();
}
import java.awt.event.ActionListener;
import com.fr.design.gui.itextfield.UITextField;
/**
* 添加按钮可用
*/
public void checkAddButtonEnable() {
objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText()));
}
/**
* 重置
*/
public void reset() {
this.classNameTextField.setText(null);
this.checkAddButtonEnable();
}
} |
@ -0,0 +1,32 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.designer.beans.actions.FormUndoableAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
/** |
||||
* Created by zhouping on 2017/2/9. |
||||
*/ |
||||
public class TabMoveCustomAction extends FormUndoableAction { |
||||
private XCardSwitchButton xCardSwitchButton; |
||||
|
||||
public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { |
||||
super(t); |
||||
this.setName(""); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
return false; |
||||
} |
||||
|
||||
public XCardSwitchButton getxCardSwitchButton() { |
||||
return xCardSwitchButton; |
||||
} |
||||
|
||||
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
} |
@ -0,0 +1,66 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.designer.beans.actions.FormUndoableAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.form.ui.CardSwitchButton; |
||||
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
||||
import com.fr.general.FRLogger; |
||||
import com.fr.general.Inter; |
||||
|
||||
/** |
||||
* Created by zhouping on 2017/2/9. |
||||
*/ |
||||
public class TabMoveEndAction extends FormUndoableAction { |
||||
private XCardSwitchButton xCardSwitchButton; |
||||
|
||||
public TabMoveEndAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer-Move_Tab_End")); |
||||
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/rightright.png")); |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); |
||||
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); |
||||
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); |
||||
try { |
||||
int currentIndex = currentButton.getIndex(); |
||||
int maxIndex = xwCardTagLayout.getComponentCount(); |
||||
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); |
||||
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); |
||||
xwCardTagLayout.setSwitchingTab(true); |
||||
//修改当前tab往后所有tab的索引号
|
||||
for (int i = currentIndex + 1; i < maxIndex; i++) { |
||||
CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); |
||||
tempBtn.setIndex(i - 1); |
||||
WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); |
||||
tempTab.setIndex(i - 1); |
||||
tempTab.setTabNameIndex(i - 1); |
||||
} |
||||
xwCardTagLayout.remove(xCardSwitchButton); |
||||
xwCardTagLayout.add(xCardSwitchButton); |
||||
xwCardLayout.remove(xCurrentTab); |
||||
xwCardLayout.add(xCurrentTab); |
||||
currentButton.setIndex(maxIndex - 1); |
||||
currentTab.setIndex(maxIndex - 1); |
||||
currentTab.setTabNameIndex(maxIndex - 1); |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
}catch (Exception e){ |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
FRLogger.getLogger().error(e.getMessage()); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public XCardSwitchButton getxCardSwitchButton() { |
||||
return xCardSwitchButton; |
||||
} |
||||
|
||||
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
} |
@ -0,0 +1,65 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.designer.beans.actions.FormUndoableAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.form.ui.CardSwitchButton; |
||||
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
||||
import com.fr.general.FRLogger; |
||||
import com.fr.general.Inter; |
||||
|
||||
/** |
||||
* Created by zhouping on 2017/2/9. |
||||
*/ |
||||
public class TabMoveFirstAction extends FormUndoableAction { |
||||
private XCardSwitchButton xCardSwitchButton; |
||||
|
||||
public TabMoveFirstAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer-Move_Tab_First")); |
||||
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/leftleft.png")); |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); |
||||
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); |
||||
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); |
||||
try { |
||||
int currentIndex = currentButton.getIndex(); |
||||
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); |
||||
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); |
||||
xwCardTagLayout.setSwitchingTab(true); |
||||
//修改当前tab往前所有tab的索引号
|
||||
for (int i = currentIndex - 1; i >= 0; i--) { |
||||
CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); |
||||
tempBtn.setIndex(i + 1); |
||||
WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); |
||||
tempTab.setIndex(i + 1); |
||||
tempTab.setTabNameIndex(i + 1); |
||||
} |
||||
xwCardTagLayout.remove(xCardSwitchButton); |
||||
xwCardTagLayout.add(xCardSwitchButton, 0); |
||||
xwCardLayout.remove(xCurrentTab); |
||||
xwCardLayout.add(xCurrentTab, 0); |
||||
currentButton.setIndex(0); |
||||
currentTab.setIndex(0); |
||||
currentTab.setTabNameIndex(0); |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
}catch (Exception e){ |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
FRLogger.getLogger().error(e.getMessage()); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public XCardSwitchButton getxCardSwitchButton() { |
||||
return xCardSwitchButton; |
||||
} |
||||
|
||||
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
} |
@ -0,0 +1,64 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.designer.beans.actions.FormUndoableAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.form.ui.CardSwitchButton; |
||||
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
||||
import com.fr.general.FRLogger; |
||||
import com.fr.general.Inter; |
||||
|
||||
/** |
||||
* Created by zhouping on 2017/2/9. |
||||
*/ |
||||
public class TabMoveNextAction extends FormUndoableAction { |
||||
private XCardSwitchButton xCardSwitchButton; |
||||
|
||||
public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer-Move_Tab_Next")); |
||||
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/right.png")); |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); |
||||
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); |
||||
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); |
||||
try { |
||||
int currentIndex = currentButton.getIndex(); |
||||
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); |
||||
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); |
||||
xwCardTagLayout.setSwitchingTab(true); |
||||
//修改下一个tab的索引号
|
||||
CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData(); |
||||
nextBtn.setIndex(currentIndex); |
||||
WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData(); |
||||
nextTab.setIndex(currentIndex); |
||||
nextTab.setTabNameIndex(currentIndex); |
||||
|
||||
xwCardTagLayout.remove(xCardSwitchButton); |
||||
xwCardTagLayout.add(xCardSwitchButton, currentIndex + 1); |
||||
xwCardLayout.remove(xCurrentTab); |
||||
xwCardLayout.add(xCurrentTab, currentIndex + 1); |
||||
currentButton.setIndex(currentIndex + 1); |
||||
currentTab.setIndex(currentIndex + 1); |
||||
currentTab.setTabNameIndex(currentIndex + 1); |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
}catch (Exception e){ |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
FRLogger.getLogger().error(e.getMessage()); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public XCardSwitchButton getxCardSwitchButton() { |
||||
return xCardSwitchButton; |
||||
} |
||||
|
||||
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
} |
@ -0,0 +1,64 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.designer.beans.actions.FormUndoableAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.form.ui.CardSwitchButton; |
||||
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
||||
import com.fr.general.FRLogger; |
||||
import com.fr.general.Inter; |
||||
|
||||
/** |
||||
* Created by zhouping on 2017/2/9. |
||||
*/ |
||||
public class TabMovePrevAction extends FormUndoableAction { |
||||
private XCardSwitchButton xCardSwitchButton; |
||||
|
||||
public TabMovePrevAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer-Move_Tab_Prev")); |
||||
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/left.png")); |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); |
||||
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); |
||||
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); |
||||
try { |
||||
int currentIndex = currentButton.getIndex(); |
||||
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); |
||||
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); |
||||
xwCardTagLayout.setSwitchingTab(true); |
||||
//修改上一个tab的索引号
|
||||
CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData(); |
||||
prevBtn.setIndex(currentIndex); |
||||
WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData(); |
||||
prevTab.setIndex(currentIndex); |
||||
prevTab.setTabNameIndex(currentIndex); |
||||
|
||||
xwCardTagLayout.remove(xCardSwitchButton); |
||||
xwCardTagLayout.add(xCardSwitchButton, currentIndex - 1); |
||||
xwCardLayout.remove(xCurrentTab); |
||||
xwCardLayout.add(xCurrentTab, currentIndex - 1); |
||||
currentButton.setIndex(currentIndex - 1); |
||||
currentTab.setIndex(currentIndex - 1); |
||||
currentTab.setTabNameIndex(currentIndex - 1); |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
}catch (Exception e){ |
||||
xwCardTagLayout.setSwitchingTab(false); |
||||
FRLogger.getLogger().error(e.getMessage()); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public XCardSwitchButton getxCardSwitchButton() { |
||||
return xCardSwitchButton; |
||||
} |
||||
|
||||
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { |
||||
this.xCardSwitchButton = xCardSwitchButton; |
||||
} |
||||
} |
Loading…
Reference in new issue