Browse Source

Merge pull request #744 in BA/design from ~KERRY/design:dev to dev

* commit '14ab8a49694aefa2531b76bd8ae6eca63f3e495e':
  REPORT-1858 frm组件隐藏
master
superman 8 years ago
parent
commit
7fd694a56e
  1. 7
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  2. 8
      designer_form/src/com/fr/design/designer/creator/XCreator.java
  3. 7
      designer_form/src/com/fr/design/designer/creator/XElementCase.java
  4. 11
      designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java
  5. 3
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

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")

8
designer_form/src/com/fr/design/designer/creator/XCreator.java

@ -379,6 +379,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
toData().setWidgetName(name);
}
/**
* 重置组件的可见性
* @param visible 可见性
*/
public void resetVisible(boolean visible){
toData().setVisible(visible);
}
/**
* 返回编辑的子组件scale为其内部组件
* @return 组件

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")

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

@ -145,7 +145,16 @@ public abstract class XWidgetCreator extends XCreator {
this.draw();
}
}
/**
* 渲染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