8 changed files with 81 additions and 161 deletions
@ -1,31 +0,0 @@
|
||||
package com.fr.design.mainframe.shadow.ui.component; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.Color; |
||||
import java.awt.Dimension; |
||||
import java.awt.Graphics; |
||||
import java.awt.Graphics2D; |
||||
|
||||
/** |
||||
* @author fly.li |
||||
* @since 10.0 |
||||
* Created on 2021/11/11 |
||||
* 线条相关的面板 |
||||
*/ |
||||
public class LinePane extends JPanel { |
||||
|
||||
private final int WIDTH = 615; |
||||
|
||||
public LinePane() { |
||||
this.setPreferredSize(new Dimension(WIDTH, 2)); |
||||
} |
||||
|
||||
@Override |
||||
protected void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
Graphics2D graphics2D = (Graphics2D) g.create(); |
||||
graphics2D.setColor(new Color(220, 220, 220)); |
||||
graphics2D.drawLine(0, 0, WIDTH, 0); |
||||
this.repaint(); |
||||
} |
||||
} |
@ -1,33 +0,0 @@
|
||||
package com.fr.design.mainframe.shadow.ui.component.cell; |
||||
|
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.JPanel; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Color; |
||||
import java.awt.Dimension; |
||||
|
||||
/** |
||||
* 单元格面板 |
||||
* |
||||
* @author fly.li |
||||
* @since 10.0 |
||||
* Created on 2021/09/16 |
||||
*/ |
||||
public abstract class AbstractCellPane extends JPanel { |
||||
private final int HEIGHT = 20; |
||||
|
||||
public AbstractCellPane() { |
||||
|
||||
} |
||||
|
||||
public AbstractCellPane(int columnWidth) { |
||||
defaultInit(columnWidth); |
||||
} |
||||
|
||||
private void defaultInit(int columnWidth) { |
||||
this.setLayout(new BorderLayout()); |
||||
this.setPreferredSize(new Dimension(columnWidth, HEIGHT)); |
||||
this.setBackground(Color.WHITE); |
||||
this.setBorder(BorderFactory.createLineBorder(new Color(245, 245, 245))); |
||||
} |
||||
} |
@ -1,38 +0,0 @@
|
||||
package com.fr.design.mainframe.shadow.ui.component.cell; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.general.IOUtils; |
||||
|
||||
import javax.swing.Icon; |
||||
import javax.swing.JLabel; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Dimension; |
||||
import java.awt.event.MouseAdapter; |
||||
|
||||
/** |
||||
* @author fly.li |
||||
* @since 10.0 |
||||
* Created on 2021/09/16 |
||||
* <>相比普通单元格面板多了跳转标记</> |
||||
*/ |
||||
public class JumpCellPane extends AbstractCellPane { |
||||
|
||||
private static Icon icon = IOUtils.readIcon("com/fr/nx/analyze/shadow/jump.png"); |
||||
|
||||
public JumpCellPane() { |
||||
|
||||
} |
||||
|
||||
public JumpCellPane(int width, String value, MouseAdapter mouseAdapter) { |
||||
super(width); |
||||
JLabel showResultLabel = new JLabel(value); |
||||
this.add(showResultLabel, BorderLayout.WEST); |
||||
showResultLabel.setToolTipText(value); |
||||
JLabel jumpIconLabel = new JLabel(); |
||||
jumpIconLabel.setPreferredSize(new Dimension(15, 20)); |
||||
jumpIconLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Template_Assistant_Jump_Information")); |
||||
jumpIconLabel.setIcon(icon); |
||||
this.add(jumpIconLabel, BorderLayout.EAST); |
||||
jumpIconLabel.addMouseListener(mouseAdapter); |
||||
} |
||||
} |
Loading…
Reference in new issue