pengda
3 years ago
13 changed files with 184 additions and 186 deletions
@ -0,0 +1,27 @@
|
||||
package com.fr.design.data; |
||||
|
||||
public class NameChangeBean { |
||||
private String oldName; |
||||
private String changedName; |
||||
|
||||
public NameChangeBean(String oldName, String changedName) { |
||||
this.oldName = oldName; |
||||
this.changedName = changedName; |
||||
} |
||||
|
||||
public String getOldName() { |
||||
return oldName; |
||||
} |
||||
|
||||
public void setOldName(String oldName) { |
||||
this.oldName = oldName; |
||||
} |
||||
|
||||
public String getChangedName() { |
||||
return changedName; |
||||
} |
||||
|
||||
public void setChangedName(String changedName) { |
||||
this.changedName = changedName; |
||||
} |
||||
} |
@ -1,77 +0,0 @@
|
||||
package com.fr.design.actions; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.dialog.DialogActionAdapter; |
||||
import com.fr.design.dialog.UIDialog; |
||||
import com.fr.design.fit.DesignerUIModeConfig; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.design.menu.MenuKeySet; |
||||
import com.fr.design.report.fit.menupane.TemplateFitAttrPane; |
||||
import com.fr.report.fit.FitProvider; |
||||
import com.fr.report.fit.ReportFitAttr; |
||||
|
||||
import javax.swing.KeyStroke; |
||||
import java.awt.event.ActionEvent; |
||||
|
||||
/** |
||||
* Created by Administrator on 2015/7/6 0006. |
||||
*/ |
||||
public class FormFitAttrAction extends JTemplateAction { |
||||
private static final MenuKeySet REPORT_FIT_ATTR_ELEMENTCASE = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'T'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return DesignerUIModeConfig.getInstance().newUIMode() ? |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit_PC_Adaptive_Attr") : |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
public FormFitAttrAction(JTemplate jTemplate) { |
||||
super(jTemplate); |
||||
initMenuStyle(); |
||||
} |
||||
|
||||
private void initMenuStyle() { |
||||
this.setMenuKeySet(REPORT_FIT_ATTR_ELEMENTCASE); |
||||
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(DesignerUIModeConfig.getInstance().newUIMode() ? |
||||
"/com/fr/design/images/reportfit/fit.png" : |
||||
"/com/fr/design/images/reportfit/fit"); |
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
final JTemplate jwb = getEditingComponent(); |
||||
if (jwb == null) { |
||||
return; |
||||
} |
||||
final FitProvider wbTpl = (FitProvider) jwb.getTarget(); |
||||
ReportFitAttr fitAttr = wbTpl.getReportFitAttr(); |
||||
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane(jwb); |
||||
showFitDialog(fitAttr, jwb, wbTpl, templateFitAttrPane); |
||||
} |
||||
|
||||
private void showFitDialog(ReportFitAttr fitAttr, final JTemplate jwb, final FitProvider wbTpl, final BasicBeanPane<ReportFitAttr> attrPane) { |
||||
attrPane.populateBean(fitAttr); |
||||
UIDialog dialog = attrPane.showMediumWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { |
||||
@Override |
||||
public void doOk() { |
||||
wbTpl.setReportFitAttr(attrPane.updateBean()); |
||||
jwb.fireTargetModified(); |
||||
} |
||||
}); |
||||
dialog.setVisible(true); |
||||
} |
||||
} |
Loading…
Reference in new issue