Browse Source

Merge pull request #3436 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit 'df3e3d9ea91397eda5aa88bd12c42e3519d0c3ba':
  CHART-17958  自定义配色取色器异常
  REPORT-47258 打开多个模板,切换远程时右侧面板可能出现异常
  地图富文本面板适配
  完善词云初始化富文本参数
  词云富文本新增字段适配
  散点图富文本新增字段适配
  富文本编辑器增加字段名的类属性
  调整富文本参数更新的位置
  补充新增字段富文本中的交互
  完善新增字段更新
  获取数据集字段
  完善界面
  调整代码结构
  处理新的富文本界面交互
  开发富文本字段界面
feature/10.0
superman 4 years ago
parent
commit
2183cd252e
  1. 32
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  3. 6
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java

32
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -47,6 +47,7 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut;
import com.fr.design.preview.PagePreview;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.write.submit.DBManipulationInWidgetEventPane;
import com.fr.design.write.submit.DBManipulationPane;
import com.fr.event.EventDispatcher;
@ -79,7 +80,6 @@ import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.undo.UndoManager;
import java.util.ArrayList;
@ -340,30 +340,18 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public void refreshResource(FILE file) {
new SwingWorker<Void, Void>() {
setTargetByFile(file);
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
protected Void doInBackground() throws Exception {
setTargetByFile(file);
return null;
}
public void run() {
// 先移除旧的。
removeCenterPane();
// 加入新的
addCenterPane();
@Override
public void done() {
try {
get();
// 先移除旧的。
removeCenterPane();
// 加入新的
addCenterPane();
refreshToolArea();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
refreshToolArea();
}
}.execute();
});
}

4
designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java

@ -206,6 +206,10 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
public void setVisible(boolean b) {
super.setVisible(b);
}
protected boolean selectRealTime() {
return false;
}
};
colorPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {

6
designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java

@ -115,12 +115,16 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
// 最近使用
UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, true);
UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, selectRealTime());
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8));
row1Pane.add(usedColorPane.getPane());
return row1Pane;
}
protected boolean selectRealTime() {
return true;
}
protected Color[] getColorArray() {
return ColorFactory.MenuColors;
}

Loading…
Cancel
Save