forked from fanruan/design
Browse Source
* commit 'cdb7de829520a8bfa2cbb2a1c3c6398b4e553f22': pmd的国际化字符串问题 pmd com.dr.data.SubmitJob接口提示更改master
neil
8 years ago
7 changed files with 43 additions and 7 deletions
@ -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;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* 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;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(Inter.getLocText("Select"));
browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
editButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
Select"));
Select"));
Select"));
Select"));
browserButton.setPreferredSize(new Dimension(
public void actionPerformed(ActionEvent evt) {
Select"));
classNameTextField.getPreferredSize().height));
bPane.setClassPath(classNameTextField.getText());
Select"));
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
SwingUtilities.getWindowAncestor(getWindowAncestor()),
new DialogActionAdapter() {
Select"));
classNameTextField.getPreferredSize().height));
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());
browserButton.setPreferredSize(new Dimension(
Select"));
}
});
javaEditorPane.addSaveActionListener(new ActionListener() {
@Override
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
dlg.doOK();
}
});
dlg.setVisible(true);
}
});
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null));
this.add(reportletNamePane, BorderLayout.NORTH);
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null));
this.add(objectProperiesPane, BorderLayout.CENTER);
UITextArea area = new UITextArea(2, 1);
Select"));
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
browserButton.getPreferredSize().width,
dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null));
this.add(dsPane, BorderLayout.SOUTH);
checkAddButtonEnable();
}
browserButton.getPreferredSize().width,
return DEFAULT_LENGTH;
}
protected String title4PopupWindow() {
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
Select"));
}
protected Component getWindowAncestor() {
return this;
}
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
classNameTextField.getPreferredSize().height));
public void populateBean(Object ob) {
if (ob instanceof AbstractClassJob) {
AbstractClassJob cj = (AbstractClassJob) ob;
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
browserButton.getPreferredSize().width,
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
classNameTextField.getPreferredSize().height));
editButton.setPreferredSize(new Dimension(
editButton.setPreferredSize(new Dimension(
Select"));
editButton.setPreferredSize(new Dimension(
editButton.setPreferredSize(new Dimension(
browserButton.setPreferredSize(new Dimension(
* 添加按钮可用
*/
public void checkAddButtonEnable() {
objectProperiesPane.enableAddButton(!StringUtils.isEmpty(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.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;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* 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;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select_panel"));
browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
browserButton.getPreferredSize().width,
Select"));
browserButton.getPreferredSize().width,
browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
browserButton.getPreferredSize().width,
editButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
final ClassNameSelectPane bPane = new ClassNameSelectPane();
bPane.setClassPath(classNameTextField.getText());
bPane.showWindow(
SwingUtilities.getWindowAncestor(getWindowAncestor()),
new DialogActionAdapter() {
classNameTextField.getPreferredSize().height));
classNameTextField.setText(bPane.getClassPath());
checkAddButtonEnable();
}
}).setVisible(true);
Select"));
Select"));
Select"));
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
reportletNamePane.add(browserButton);
Select"));
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(javaEditorPane.getClassText());
checkAddButtonEnable();
}
});
reportletNamePane.add(editButton);
browserButton.setPreferredSize(new Dimension(
Select"));
public void actionPerformed(ActionEvent evt) {
Select"));
Select"));
classNameTextField.getPreferredSize().height));
Select"));
bPane.setClassPath(classNameTextField.getText());
Select"));
Select"));
UIButton editButton = new UIButton(Inter.getLocText("Edit"));
Select"));
SwingUtilities.getWindowAncestor(getWindowAncestor()),
Select"));
new DialogActionAdapter() {
Select"));
Select"));
classNameTextField.getPreferredSize().height));
Select"));
classNameTextField.setText(bPane.getClassPath());
Select"));
checkAddButtonEnable();
Select"));
}
Select"));
}).setVisible(true);
Select"));
}
Select"));
});
Select"));
editButton.addActionListener(new ActionListener() {
Select"));
@Override
Select"));
public void actionPerformed(ActionEvent e) {
Select"));
final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB);
Select"));
final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this),
Select"));
new DialogActionAdapter() {
Select"));
public void doOk() {
Select"));
classNameTextField.setText(javaEditorPane.getClassText());
browserButton.getPreferredSize().width,
Select"));
Select"));
}
Select"));
});
}
Select"));
javaEditorPane.addSaveActionListener(new ActionListener() {
Select"));
@Override
public void actionPerformed(ActionEvent evt) {
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
Select"));
protected Component getWindowAncestor() {
Select"));
dlg.doOK();
}
Select"));
}
Select"));
});
Select"));
dlg.setVisible(true);
Select"));
}
Select"));
});
Select"));
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null));
Select"));
this.add(reportletNamePane, BorderLayout.NORTH);
Select"));
objectProperiesPane = new ObjectProperiesPane();
Select"));
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
browserButton.getPreferredSize().width,
Select"));
Select"));
classNameTextField.getPreferredSize().height));
browserButton.getPreferredSize().width,
final ClassNameSelectPane bPane = new ClassNameSelectPane();
classNameTextField.getPreferredSize().height));
bPane.setClassPath(classNameTextField.getText());
Select"));
Select"));
Select"));
browserButton.setPreferredSize(new Dimension(
Empty(classNameTextField.getText()));
}
/**
* 重置
*/
public void reset() {
this.classNameTextField.setText(null);
this.checkAddButtonEnable();
}
} |
Loading…
Reference in new issue