@ -61,20 +61,20 @@ public class FRFontPane extends BasicPane {
private UICheckBox isSubscriptCheckBox ;
private FRFontPreviewArea preview ;
private EventListenerList eventChangeList = new EventListenerList ( ) ;
public static Integer [ ] Font_Sizes = { new Integer ( 6 ) , new Integer ( 8 ) , new Integer ( 9 ) ,
new Integer ( 10 ) , new Integer ( 11 ) , new Integer ( 12 ) ,
new Integer ( 14 ) , new Integer ( 16 ) , new Integer ( 18 ) ,
new Integer ( 20 ) , new Integer ( 22 ) , new Integer ( 24 ) ,
new Integer ( 26 ) , new Integer ( 28 ) , new Integer ( 36 ) ,
new Integer ( 48 ) , new Integer ( 72 ) } ;
public FRFontPane ( ) {
this . initComponents ( ) ;
}
protected void initComponents ( ) {
this . setLayout ( FRGUIPaneFactory . createBorderLayout ( ) ) ;
this . setBorder ( BorderFactory . createEmptyBorder ( 4 , 4 , 4 , 4 ) ) ;
@ -82,18 +82,18 @@ public class FRFontPane extends BasicPane {
// 名字
fontNameComboBox = new UIComboBox ( DesignUtils . getAvailableFontFamilyNames4Report ( ) ) ;
this . fontNameComboBox . addActionListener ( actionListener ) ;
// 字形和大小
fontSizeStylePane = new FontSizeStylePane ( ) ;
// 下划线 和 颜色
this . underlineCombo = new LineComboBox ( CoreConstants . UNDERLINE_STYLE_ARRAY ) ;
this . underlineCombo . addActionListener ( actionListener ) ;
foregroundColorPane = new ColorSelectBox ( 140 ) ;
foregroundColorPane . addSelectChangeListener ( new ChangeListener ( ) {
public void stateChanged ( ChangeEvent e ) {
fireStateChanged ( ) ;
}
fireStateChanged ( ) ;
}
} ) ;
initCheckbox ( ) ;
@ -166,11 +166,11 @@ public class FRFontPane extends BasicPane {
column ( 5 , cell ( new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Preview" ) ) ) , cell ( preview ) . weight ( 1 ) ) . weight ( 1 )
) . getComponent ( ) ) ;
}
public void addChangeListener ( ChangeListener changeListener ) {
eventChangeList . add ( ChangeListener . class , changeListener ) ;
}
/ * *
* /
public void fireStateChanged ( ) {
@ -186,19 +186,19 @@ public class FRFontPane extends BasicPane {
}
}
}
ActionListener actionListener = new ActionListener ( ) {
public void actionPerformed ( ActionEvent e ) {
fireStateChanged ( ) ;
}
fireStateChanged ( ) ;
}
} ;
ChangeListener changeListener = new ChangeListener ( ) {
public void stateChanged ( ChangeEvent e ) {
fireStateChanged ( ) ;
}
fireStateChanged ( ) ;
}
} ;
@Override
protected String title4PopupWindow ( ) {
return com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Sytle_FRFont" ) ;
@ -217,6 +217,16 @@ public class FRFontPane extends BasicPane {
updatePreviewLabel ( ) ;
}
} ;
ItemListener updatePreviewItemListener = new ItemListener ( ) {
public void itemStateChanged ( ItemEvent e ) {
updatePreviewLabel ( ) ;
}
} ;
this . fontNameComboBox . addItemListener ( updatePreviewItemListener ) ;
this . fontSizeStylePane . fontComboBox . addItemListener ( updatePreviewItemListener ) ;
this . fontSizeStylePane . fontSizeComboBox . addItemListener ( updatePreviewItemListener ) ;
this . isStrikethroughCheckBox . addActionListener ( updatePreviewActionListener ) ;
this . isShadowCheckBox . addActionListener ( updatePreviewActionListener ) ;
this . isSuperscriptCheckBox . addActionListener ( updatePreviewActionListener ) ;