MoMeak
7 years ago
13 changed files with 97 additions and 84 deletions
After Width: | Height: | Size: 4.6 KiB |
@ -1,37 +0,0 @@
|
||||
package com.fr.design.mainframe.alphafine.preview; |
||||
|
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.mainframe.alphafine.AlphaFineConstants; |
||||
import com.fr.general.IOUtils; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
|
||||
/** |
||||
* Created by XiaXiang on 2017/5/5. |
||||
*/ |
||||
public class ActionPreviewPane extends JPanel { |
||||
private static final Font NAME = new Font("Song_TypeFace", 0, 14); |
||||
|
||||
public ActionPreviewPane() { |
||||
setLayout(new BorderLayout()); |
||||
setBackground(null); |
||||
setBorder(BorderFactory.createEmptyBorder(135, 0, 0, 0)); |
||||
UILabel image = new UILabel(); |
||||
image.setPreferredSize(new Dimension(150, 111)); |
||||
image.setHorizontalAlignment(SwingConstants.CENTER); |
||||
image.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
||||
image.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png")); |
||||
UILabel description = new UILabel(Inter.getLocText("FR-Designer_NoResult")); |
||||
description.setForeground(AlphaFineConstants.MEDIUM_GRAY); |
||||
description.setFont(NAME); |
||||
description.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); |
||||
description.setHorizontalAlignment(SwingConstants.CENTER); |
||||
this.add(image, BorderLayout.CENTER); |
||||
this.add(description, BorderLayout.SOUTH); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.fr.design.mainframe.alphafine.preview; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.mainframe.alphafine.AlphaFineConstants; |
||||
import com.fr.general.FRFont; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by XiaXiang on 2017/8/14. |
||||
*/ |
||||
public class NoResultPane extends JPanel { |
||||
public NoResultPane(String title, Icon icon) { |
||||
setLayout(new BorderLayout()); |
||||
setBackground(Color.white); |
||||
setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); |
||||
UILabel image = new UILabel(); |
||||
image.setPreferredSize(new Dimension(150, 111)); |
||||
image.setHorizontalAlignment(SwingConstants.CENTER); |
||||
image.setIcon(icon); |
||||
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)); |
||||
description.setBorder(BorderFactory.createEmptyBorder(0, 0, 135, 0)); |
||||
description.setHorizontalAlignment(SwingConstants.CENTER); |
||||
add(image, BorderLayout.CENTER); |
||||
add(description, BorderLayout.SOUTH); |
||||
} |
||||
} |
Loading…
Reference in new issue