diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java index cf703d8795..cb2bbc4376 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java @@ -6,8 +6,6 @@ import com.fr.general.FRLogger; import com.fr.json.JSONException; import com.fr.json.JSONObject; -import javax.swing.*; - /** * Created by XiaXiang on 2017/4/20. */ diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java b/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java index ee9a9f55c9..04af821950 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java @@ -27,7 +27,7 @@ public abstract class AlphaCellModel implements Comparable { this.content = content; } - + public CellType getType() { return type; } @@ -68,6 +68,7 @@ public abstract class AlphaCellModel implements Comparable { public boolean isNeedToSendToServer() { return true; } + /** * model转json * @@ -102,7 +103,7 @@ public abstract class AlphaCellModel implements Comparable { @Override public int compareTo(Object o) { - AlphaCellModel cellModel = (AlphaCellModel)o; + AlphaCellModel cellModel = (AlphaCellModel) o; int difference = cellModel.getSearchCount() - this.getSearchCount(); if (difference != 0) { return difference; diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java index a99aecf3a2..d8cd66d97e 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java @@ -5,7 +5,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; -import com.fr.general.IOUtils; import com.fr.stable.StringUtils; import javax.swing.*; @@ -55,7 +54,7 @@ public class ContentCellRender implements ListCellRenderer { detailLabel.setForeground(AlphaFineConstants.LIGHT_GRAY); panel.add(detailLabel, BorderLayout.CENTER); int width = (int) (titleLabel.getPreferredSize().getWidth() + detailLabel.getPreferredSize().getWidth()); - if ( width > AlphaFineConstants.LEFT_WIDTH - OFFSET) { + if (width > AlphaFineConstants.LEFT_WIDTH - OFFSET) { int nameWidth = (int) (AlphaFineConstants.LEFT_WIDTH - detailLabel.getPreferredSize().getWidth() - OFFSET); titleLabel.setPreferredSize(new Dimension(nameWidth, AlphaFineConstants.CELL_HEIGHT)); } diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java index 97f68cbf75..8d1d5a5f9b 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.alphafine.cell.render; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; -import com.fr.general.IOUtils; import javax.swing.*; import java.awt.*; diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index 0034e5c606..d4ab8326d6 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -8,10 +8,8 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.utils.ThemeUtils; -import com.fr.general.IOUtils; import com.fr.general.Inter; -import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java index 15b69aab27..1ba7a5b915 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java @@ -18,7 +18,7 @@ public class FilePreviewPane extends JPanel { float widthScale = (AlphaFineConstants.RIGHT_WIDTH) / (float) image.getWidth(); float heightScale = (AlphaFineConstants.CONTENT_HEIGHT) / (float) image.getHeight(); Image showImage; - showImage = widthScale > heightScale? image.getScaledInstance((int) (image.getWidth() * heightScale), AlphaFineConstants.CONTENT_HEIGHT, Image.SCALE_SMOOTH) : image.getScaledInstance(AlphaFineConstants.RIGHT_WIDTH, (int) (image.getWidth() * widthScale), Image.SCALE_SMOOTH); + showImage = widthScale > heightScale ? image.getScaledInstance((int) (image.getWidth() * heightScale), AlphaFineConstants.CONTENT_HEIGHT, Image.SCALE_SMOOTH) : image.getScaledInstance(AlphaFineConstants.RIGHT_WIDTH, (int) (image.getWidth() * widthScale), Image.SCALE_SMOOTH); label.setIcon(new ImageIcon(showImage)); add(label); } diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java index 6b80aae8be..738ecf4efd 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java @@ -20,7 +20,7 @@ public class NoResultPane extends JPanel { image.setPreferredSize(new Dimension(150, 111)); image.setHorizontalAlignment(SwingConstants.CENTER); image.setIcon(IconLoader.getIcon(iconUrl)); - image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0)); + image.setBorder(BorderFactory.createEmptyBorder(100, 0, 0, 0)); UILabel description = new UILabel(title); description.setForeground(AlphaFineConstants.MEDIUM_GRAY); description.setFont(FRFont.getInstance("SimSun", Font.PLAIN, 14));