|
|
|
@ -25,10 +25,20 @@ import com.fr.general.FRFont;
|
|
|
|
|
|
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.CardLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.util.Vector; |
|
|
|
@ -67,11 +77,20 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
|
|
|
|
|
private UIToggleButton subPane; |
|
|
|
|
private JPanel linePane; |
|
|
|
|
private int italic_bold; |
|
|
|
|
/** |
|
|
|
|
* LeftPane和RightPane之间的间隙,也是fontSizeStyleComboBox与fontSizeComboBox之间的间隙,之前的默认值为VGAP_LARGE |
|
|
|
|
*/ |
|
|
|
|
private int hGapBetweenLeftPaneAndRightPane = LayoutConstants.VGAP_LARGE; |
|
|
|
|
|
|
|
|
|
public FRFontPane() { |
|
|
|
|
this.initComponents(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public FRFontPane(int hGapBetweenLeftPaneAndRightPane) { |
|
|
|
|
this.hGapBetweenLeftPaneAndRightPane = hGapBetweenLeftPaneAndRightPane; |
|
|
|
|
this.initComponents(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
JFrame jf = new JFrame("test"); |
|
|
|
|
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
@ -345,7 +364,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
|
|
|
|
|
private JPanel createPane() { |
|
|
|
|
JPanel createPane = new JPanel(new BorderLayout()); |
|
|
|
|
createPane.add(fontNameComboBox, BorderLayout.NORTH); |
|
|
|
|
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); |
|
|
|
|
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, hGapBetweenLeftPaneAndRightPane, LayoutConstants.VGAP_LARGE); |
|
|
|
|
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
|
createPane.add(jPanel, BorderLayout.CENTER); |
|
|
|
|
return createPane; |
|
|
|
|