|
|
|
@ -13,11 +13,15 @@ import com.fr.general.FRFont;
|
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.FontMetrics; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Shape; |
|
|
|
|
import java.awt.geom.Rectangle2D; |
|
|
|
|
import java.awt.geom.Rectangle2D.Double; |
|
|
|
|
import java.awt.geom.RoundRectangle2D; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -91,6 +95,7 @@ public class LayoutBorderPreviewPane extends JPanel{
|
|
|
|
|
jp.setPreferredSize(new Dimension(getWidth() - GAP, height)); |
|
|
|
|
jp.setBounds(smallGAP,smallGAP, getWidth() - GAP, height); |
|
|
|
|
borderStyle.paint(g, new Rectangle2D.Double(smallGAP, smallGAP, getWidth() - GAP, getHeight() - GAP)); |
|
|
|
|
jp.setFontObject(borderStyle.getTitle().getFrFont()); |
|
|
|
|
showTitlePreviewPane(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -106,6 +111,7 @@ public class LayoutBorderPreviewPane extends JPanel{
|
|
|
|
|
frFont = FRContext.getDefaultValues().getFRFont(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void paintComponent(Graphics g) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
Dimension d = getSize(); |
|
|
|
@ -147,7 +153,7 @@ public class LayoutBorderPreviewPane extends JPanel{
|
|
|
|
|
} |
|
|
|
|
g.setColor(borderStyle.getColor()); |
|
|
|
|
int line = GraphHelper.getLineStyleSize(borderStyle.getBorder()); |
|
|
|
|
Double double1 = new Rectangle2D.Double(0, getHeight()-1, getWidth(), getHeight()); |
|
|
|
|
Rectangle2D.Double double1 = new Rectangle2D.Double(0, getHeight()-1, getWidth(), getHeight()); |
|
|
|
|
double x = double1.getX() + (line == 1 ? 1 : 2) - line - 1; |
|
|
|
|
double y = double1.getY() + (line == 1 ? 1 : 2) - line ; |
|
|
|
|
RoundRectangle2D.Double double2 = new RoundRectangle2D.Double(x, y, double1.getWidth() + line, double1.getHeight() + line, 0, 0); |
|
|
|
|