Browse Source

Merge remote-tracking branch 'origin/feature/10.0' into feature/10.0

feature/10.0
pengda 3 years ago
parent
commit
6839bfc741
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java
  2. 11
      designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java
  3. BIN
      designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png

2
designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java

@ -108,7 +108,7 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow {
JPanel centerPanel = new JPanel(new BorderLayout());
UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Drag_And_Make_Component"));
UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/base/images/share/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH)));
UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/design/images/dashboard/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH)));
titleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, TITLE_FONT_SIZE));
titleLabel.setBorder(BorderFactory.createEmptyBorder());

11
designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java

@ -30,6 +30,7 @@ import com.fr.event.Listener;
import com.fr.log.FineLoggerFactory;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -51,7 +52,7 @@ public class ContentReplacerCenter {
}
private List<ContentChange> contentChangeList = new ArrayList<>();
private List<ContentChangeItem> items = new ArrayList<>();
private Map<ChangeItem, ContentChangeItem> itemsMap = new HashMap<>();
private ContentReplacerCenter() {
@ -61,21 +62,21 @@ public class ContentReplacerCenter {
if (param.getChangeMap().isEmpty()) {
return;
}
items.add(param);
itemsMap.put(param.getChangeItem(), param);
}
});
EventDispatcher.listen(TableDataModifyEvent.INSTANCE, new Listener<ContentChangeItem>() {
@Override
public void on(Event event, ContentChangeItem param) {
items.add(param);
itemsMap.put(param.getChangeItem(), param);
long start = System.currentTimeMillis();
ContentObjectManager.getInstance().searchObject(param.getObject());
FineLoggerFactory.getLogger().debug("search object spend {} ms", (System.currentTimeMillis() - start));
FineLoggerFactory.getLogger().debug("search result: {}", ContentObjectManager.getInstance().getObjectMap() == null
? null : ContentObjectManager.getInstance().getObjectMap().keySet());
List<ContentChangeItem> itemsCopy = new ArrayList<>(items);
items.clear();
List<ContentChangeItem> itemsCopy = new ArrayList<>(itemsMap.values());
itemsMap.clear();
onRename(itemsCopy, contentChangeList);
}
});

BIN
designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 308 KiB

Loading…
Cancel
Save