Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
1616070f93
  1. 2
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 29
      designer/src/com/fr/design/mainframe/alphafine/preview/DocumentPreviewPane.java
  3. 4
      designer/src/com/fr/design/widget/WidgetPane.java
  4. 10
      designer/src/com/fr/design/widget/ui/ButtonDefinePane.java
  5. 4
      designer_base/src/com/fr/design/gui/itextarea/UITextArea.java
  6. 2
      designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java
  7. 4
      designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java
  8. 9
      designer_base/src/com/fr/start/StartServer.java
  9. 17
      designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java
  10. 14
      designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java
  11. 10
      designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

2
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -684,7 +684,7 @@ public class AlphaFineDialog extends UIDialog {
} else {
try {
Thread.sleep(10);
doSearch(searchTextField.getText());
doSearch(searchTextField.getText().toLowerCase());
} catch (InterruptedException e1) {
FRLogger.getLogger().error(e1.getMessage());
}

29
designer/src/com/fr/design/mainframe/alphafine/preview/DocumentPreviewPane.java

@ -3,7 +3,6 @@ package com.fr.design.mainframe.alphafine.preview;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
@ -16,30 +15,18 @@ public class DocumentPreviewPane extends JPanel {
public DocumentPreviewPane(String title, String summary) {
this.setLayout(new BorderLayout());
this.setBackground(Color.WHITE);
this.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
UITextArea titleArea = new UITextArea(title);
UITextArea contentArea = new UITextArea(summary);
titleArea.setOpaque(false);
contentArea.setOpaque(false);
titleArea.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
titleArea.setBorder(null);
titleArea.setEditable(false);
titleArea.setForeground(AlphaFineConstants.BLUE);
contentArea.setForeground(AlphaFineConstants.BLACK);
titleArea.setPreferredSize(new Dimension(360, 30));
titleArea.setFont(AlphaFineConstants.LARGE_FONT);
contentArea.setFont(AlphaFineConstants.MEDIUM_FONT);
add(titleArea, BorderLayout.NORTH);
UITextArea contentArea = new UITextArea(summary);
contentArea.setEditable(false);
contentArea.setBorder(null);
contentArea.setForeground(AlphaFineConstants.BLACK);
contentArea.setFont(AlphaFineConstants.MEDIUM_FONT);
add(contentArea, BorderLayout.CENTER);
}
public static void main(String[] args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(null);
content.add(new DocumentPreviewPane("test", "ababababaabbababab"));
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
}

4
designer/src/com/fr/design/widget/WidgetPane.java

@ -92,7 +92,9 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
AttributeChangeListener listener = new AttributeChangeListener() {
@Override
public void attributeChange() {
CellWidgetPropertyPane.getInstance().update();
if(shouldFireSelectedEvent){
CellWidgetPropertyPane.getInstance().update();
}
}
};

10
designer/src/com/fr/design/widget/ui/ButtonDefinePane.java

@ -28,6 +28,12 @@ public class ButtonDefinePane extends AbstractDataModify<Button> {
}
private void resetDetailPane(Button btn, Class cls) {
initDetailPane(btn, cls);
CellWidgetPropertyPane.getInstance().reInitAllListener();
CellWidgetPropertyPane.getInstance().update();
}
public void initDetailPane(Button btn, Class cls){
if (detailPane != null) {
remove(detailPane);
}
@ -40,13 +46,11 @@ public class ButtonDefinePane extends AbstractDataModify<Button> {
}
});
this.updateUI();
CellWidgetPropertyPane.getInstance().reInitAllListener();
CellWidgetPropertyPane.getInstance().update();
}
@Override
public void populateBean(Button btn) {
resetDetailPane(btn, btn instanceof FreeButton && !((FreeButton) btn).isCustomStyle() ? Button.class : null);
initDetailPane(btn, btn instanceof FreeButton && !((FreeButton) btn).isCustomStyle() ? Button.class : null);
}
@Override

4
designer_base/src/com/fr/design/gui/itextarea/UITextArea.java

@ -100,7 +100,9 @@ public class UITextArea extends JTextArea implements UIObserver {
@Override
protected void paintBorder(Graphics g) {
getUI().paintBorder((Graphics2D) g, getWidth(), getHeight(), true, Constants.NULL);
if (getBorder() != null) {
getUI().paintBorder((Graphics2D) g, getWidth(), getHeight(), true, Constants.NULL);
}
}
@Override

2
designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java

@ -32,7 +32,7 @@ public class UITextAreaUI extends BasicTextAreaUI {
}
public void paintBorder(Graphics2D g2d, int width, int height, boolean isRound, int rectDirection) {
if (isRollOver && textField.isEnabled()) {
if (isRollOver && textField.isEnabled() && ((UITextArea)textField).isEditable()) {
g2d.setColor(UIConstants.TEXT_FILED_BORDER_SELECTED);
g2d.drawRect(0, 0, width - 1, height - 1);
} else {

4
designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java

@ -7,7 +7,8 @@ import java.awt.event.ActionListener;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
import javax.swing.*;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.gui.icombobox.DictionaryConstants;
@ -51,6 +52,7 @@ public class CheckBoxDictPane extends JPanel {
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(headPane, BorderLayout.NORTH);
jPanel.add(returnStringPane, BorderLayout.CENTER);
returnStringPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, 0, 0));
this.add(jPanel);
}

9
designer_base/src/com/fr/start/StartServer.java

@ -18,6 +18,7 @@ import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.OperatingSystem;
import com.fr.stable.project.ProjectConstants;
import com.fr.start.server.JettyHost;
@ -179,10 +180,16 @@ public class StartServer {
private static class InformationPane extends BasicPane {
private static final long serialVersionUID = 1L;
private static final int FREE_STYLE_TOP = 15;
private static final int FREE_STYLE_OTHER = 5;
public InformationPane(String message) {
init(message);
}
private void init(String message) {
this.setLayout(new BorderLayout(10, 10));
this.setBorder(BorderFactory.createEmptyBorder(15, 5, 5, 5));
this.setBorder(BorderFactory.createEmptyBorder(FREE_STYLE_TOP, FREE_STYLE_OTHER, FREE_STYLE_OTHER, FREE_STYLE_OTHER));
String text;
if (!ComparatorUtils.equals(message, Inter.getLocText(new String[]{"Default", "Utils-Report_Runtime_Env"}))) {
text = new StringBuffer(Inter.getLocText("FR-Designer_Open"))

17
designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java

@ -2,13 +2,11 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.present.dict.DictionaryPane;
import com.fr.design.widget.component.CheckBoxDictPane;
import com.fr.design.widget.ui.designer.btn.ButtonGroupDefinePane;
import com.fr.form.ui.CheckBoxGroup;
import com.fr.general.Inter;
@ -18,7 +16,7 @@ import java.awt.*;
public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup> {
private DictionaryPane dictPane;
private UIButtonGroup returnType;
private CheckBoxDictPane checkBoxDictPane;
private UICheckBox checkbox;
public CheckBoxGroupDefinePane(XCreator xCreator) {
@ -42,15 +40,12 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup
public JPanel createOtherPane(){
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"}));
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
final String[] tabTitles = new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")};
returnType = new UIButtonGroup(tabTitles);
checkBoxDictPane = new CheckBoxDictPane();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{checkbox, null },
new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type")), returnType},
new Component[]{checkBoxDictPane, null},
};
double[] rowSize = {p, p};
double[] columnSize = {p, f};
@ -62,7 +57,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup
@Override
protected void populateSubButtonGroupBean(CheckBoxGroup ob) {
returnType.setSelectedIndex(ob.isReturnString() ? 1 : 0);
this.checkBoxDictPane.populate(ob);
this.dictPane.populateBean(ob.getDictionary());
checkbox.setSelected(ob.isChooseAll());
}
@ -72,7 +67,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup
@Override
protected CheckBoxGroup updateSubButtonGroupBean() {
CheckBoxGroup ob = (CheckBoxGroup) creator.toData();
ob.setReturnString(returnType.getSelectedIndex() == 1);
checkBoxDictPane.update(ob);
ob.setDictionary(this.dictPane.updateBean());
ob.setChooseAll(checkbox.isSelected());
return ob;

14
designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java

@ -2,12 +2,12 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.component.CheckBoxDictPane;
import com.fr.form.ui.ComboCheckBox;
import com.fr.general.Inter;
@ -16,7 +16,7 @@ import java.awt.*;
public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox> {
private UICheckBox supportTagCheckBox;
private UIButtonGroup returnType;
private CheckBoxDictPane checkBoxDictPane;
private UITextField waterMarkDictPane;
private UICheckBox removeRepeatCheckBox;
@ -38,15 +38,13 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox>
public JPanel createOtherPane(){
supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true);
final String[] tabTitles = new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")};
returnType = new UIButtonGroup(tabTitles) ;
checkBoxDictPane = new CheckBoxDictPane();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{supportTagCheckBox, null },
new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type")), returnType},
new Component[]{checkBoxDictPane, null},
};
double[] rowSize = {p, p};
double[] columnSize = {p, f};
@ -57,7 +55,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox>
}
protected void populateSubDictionaryEditorBean(ComboCheckBox ob){
returnType.setSelectedIndex(ob.isReturnString() ? 1 : 0);
this.checkBoxDictPane.populate(ob);
waterMarkDictPane.setText(ob.getWaterMark());
formWidgetValuePane.populate(ob);
this.supportTagCheckBox.setSelected(ob.isSupportTag());
@ -66,7 +64,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox>
protected ComboCheckBox updateSubDictionaryEditorBean(){
ComboCheckBox combo = (ComboCheckBox) creator.toData();
combo.setReturnString(returnType.getSelectedIndex() == 1);
checkBoxDictPane.update(combo);
formWidgetValuePane.update(combo);
combo.setWaterMark(waterMarkDictPane.getText());
combo.setSupportTag(this.supportTagCheckBox.isSelected());

10
designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -44,7 +44,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
private UIComboBox adaptComboBox;
private UISpinner componentIntervel;
private PaddingBoundPane paddingBound;
private AccessibleWLayoutBorderStyleEditor background;
private AccessibleWLayoutBorderStyleEditor stylePane;
public FRFitLayoutDefinePane(XCreator xCreator) {
super(xCreator);
@ -65,9 +65,9 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
public JPanel createAdvancePane() {
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
background = new AccessibleWLayoutBorderStyleEditor();
stylePane = new AccessibleWLayoutBorderStyleEditor();
paddingBound = new PaddingBoundPane();
JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background")), background}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Style")), stylePane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
jp2.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0));
jPanel.add(paddingBound, BorderLayout.CENTER);
jPanel.add(jp2, BorderLayout.NORTH);
@ -119,7 +119,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());
adaptComboBox.setSelectedIndex(ob.getCompState());
componentIntervel.setValue(ob.getCompInterval());
background.setValue(ob.getBorderStyle());
stylePane.setValue(ob.getBorderStyle());
}
@ -127,7 +127,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
public WFitLayout updateBean() {
WFitLayout layout = (WFitLayout) creator.toData();
paddingBound.update(layout);
LayoutBorderStyle borderStyle = (LayoutBorderStyle) background.getValue();
LayoutBorderStyle borderStyle = (LayoutBorderStyle) stylePane.getValue();
if(borderStyle != null){
layout.setBorderStyle(borderStyle);
}

Loading…
Cancel
Save