Browse Source

Merge remote-tracking branch 'origin/release' into release

master
mengao 8 years ago
parent
commit
8a3e42ce1f
  1. 12
      designer/src/com/fr/design/webattr/EditToolBar.java
  2. 7
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  3. 7
      designer_form/src/com/fr/design/designer/creator/XElementCase.java
  4. 10
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  5. 1
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java
  6. 9
      designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java
  7. 3
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

12
designer/src/com/fr/design/webattr/EditToolBar.java

@ -329,15 +329,16 @@ public class EditToolBar extends BasicPane {
private JavaScriptActionPane javaScriptPane;
private ExportToolBarProvider[] exportToolBarProviders;
private ChangeListener changeListener = new ChangeListener() {
public void stateChanged(ChangeEvent e) {
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() {
@ -481,7 +482,7 @@ public class EditToolBar extends BasicPane {
submitPane.add(isVerify);
submitPane.add(failSubmit);
submitPane.add(isCurSheet);
isVerify.addChangeListener(changeListener);
isVerify.addActionListener(actionListener);
return submitPane;
}
@ -573,6 +574,9 @@ public class EditToolBar extends BasicPane {
card.show(centerPane, "submit");
Submit submit = ((Submit) widget);
this.isVerify.setSelected(submit.isVerify());
if (!submit.isVerify()) {
this.failSubmit.setVisible(false);
}
this.failSubmit.setSelected(submit.isFailVerifySubmit());
this.isCurSheet.setSelected(submit.isOnlySubmitSelect());
}

7
designer_form/src/com/fr/design/designer/creator/XChartEditor.java

@ -85,6 +85,13 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

7
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -83,6 +83,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass())
.setI18NName(Inter.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

10
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -8,6 +8,7 @@ import java.awt.event.ContainerEvent;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.beans.IntrospectionException;
import java.util.ArrayList;
import java.util.HashMap;
import com.fr.design.designer.beans.AdapterBus;
@ -16,6 +17,7 @@ import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter;
import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.form.layout.FRAbsoluteLayout;
import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.*;
@ -154,6 +156,14 @@ public class XWAbsoluteLayout extends XLayoutContainer {
if (xCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) xCreator).updateBoundsWidget();
}
// 如果子组件时tab布局,则tab布局内部的组件的wiget也要更新,否则保存后重新打开大小不对
ArrayList<?> childrenList = xCreator.getTargetChildrenList();
if(!childrenList.isEmpty()){
for(int i=0; i<childrenList.size(); i++){
XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(i);
tabLayout.updateBoundsWidget();
}
}
BoundsWidget boundsWidget = layout.getBoundsWidget(xCreator.toData());
Rectangle rectangle = dealWidgetBound(xCreator.getBounds());
}

1
designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

@ -759,6 +759,7 @@ public class XWFitLayout extends XLayoutContainer {
//如果子组件是绝对布局,则内部的widget也要更新
if (creator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) creator).updateBoundsWidget();
creator.setBackupBound(creator.getBounds());
}
}
layout.setContainerHeight(containerHeight);

9
designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java

@ -146,6 +146,15 @@ public abstract class XWidgetCreator extends XCreator {
}
}
/**
* 渲染Painter
*/
public void paint(Graphics g) {
//不可见时,按钮.4f透明
AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY);
((Graphics2D)g).setComposite(composite);
super.paint(g);
}
/**
* 重命名
*

3
designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

@ -53,6 +53,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){
creator.resetCreatorName(value.toString());
}
if(ComparatorUtils.equals("visible", properties[row].getName())){
creator.resetVisible((boolean) value);
}
properties[row].firePropertyChanged();
return true;
} catch (Exception e) {

Loading…
Cancel
Save