Browse Source

REPORT-4714 单元格背景选择图片问题

master
plough 7 years ago
parent
commit
c515500b2d
  1. 7
      designer_base/src/com/fr/design/gui/style/BackgroundPane.java
  2. 2
      designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java
  3. 5
      designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  4. 15
      designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java
  5. 6
      designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  6. 5
      designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java
  7. 7
      designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java
  8. 6
      designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java

7
designer_base/src/com/fr/design/gui/style/BackgroundPane.java

@ -140,6 +140,7 @@ public class BackgroundPane extends AbstractBasicStylePane {
* Populate background.
*/
public void populateBean(Background background) {
resetPaneList();
for (int i = 0; i < paneList.length; i++) {
BackgroundQuickPane pane = paneList[i];
if (pane.accept(background)) {
@ -151,6 +152,12 @@ public class BackgroundPane extends AbstractBasicStylePane {
}
}
private void resetPaneList() {
for (BackgroundQuickPane pane : paneList) {
pane.reset();
}
}
/**
* Update background.
*/

2
designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java

@ -21,6 +21,8 @@ public abstract class BackgroundQuickPane extends BasicBeanPane<Background> impl
@Override
public abstract String title4PopupWindow();
public abstract void reset();
/**
* 组件是否需要响应添加的观察者事件
*

5
designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -76,4 +76,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
public String title4PopupWindow() {
return Inter.getLocText("Color");
}
@Override
public void reset() {
this.detailColorSelectPane.setColor(null);
}
}

15
designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java

@ -119,4 +119,19 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane {
return Inter.getLocText("Gradient-Color");
}
@Override
public void reset() {
this.gradientBar.getSelectColorPointBtnP1().setColorInner(Color.WHITE);
this.gradientBar.getSelectColorPointBtnP2().setColorInner(Color.BLACK);
directionPane.setSelectedItem(0);
int startValue = 4;
int endValue = this.gradientBarWidth;
gradientBar.setStartValue(startValue);
gradientBar.setEndValue(endValue);
if(this.gradientBar.getSelectColorPointBtnP1() != null && this.gradientBar.getSelectColorPointBtnP2() != null){
this.gradientBar.getSelectColorPointBtnP1().setX(startValue);
this.gradientBar.getSelectColorPointBtnP2().setX(endValue);
}
}
}

6
designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java

@ -179,4 +179,10 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane {
public String title4PopupWindow() {
return Inter.getLocText("FR-Background_Image");
}
@Override
public void reset() {
imageLayoutPane.setSelectedIndex(0);
previewPane.setImage(null);
}
}

5
designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java

@ -51,4 +51,9 @@ public class NullBackgroundQuickPane extends BackgroundQuickPane {
return Inter.getLocText("Background-Null");
}
@Override
public void reset() {
// do nothing
}
}

7
designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java

@ -215,4 +215,11 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane {
public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Background-Pattern");
}
@Override
public void reset() {
patternButtonArray[0].setSelected(true);
foregroundColorPane.setSelectObject(null);
backgroundColorPane.setSelectObject(null);
}
}

6
designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java

@ -169,4 +169,10 @@ public class TextureBackgroundQuickPane extends BackgroundQuickPane {
public String title4PopupWindow() {
return Inter.getLocText("Background-Texture");
}
@Override
public void reset() {
this.texturePaint = null;
textureButtonArray[0].setSelected(true);
}
}
Loading…
Cancel
Save