@ -24,15 +24,18 @@ public class ECPreviewPane extends AbstractECPreviewPane {
private final List < AbstractPreviewCell > headerCellList = new ArrayList < > ( ) ;
private final List < AbstractPreviewCell > contentCellList = new ArrayList < > ( ) ;
private final List < AbstractPreviewCell > highLightCellList = new ArrayList < > ( ) ;
private final List < AbstractPreviewCell > assistCellList = new ArrayList < > ( ) ;
private static final int COL_COUNT = 5 ;
private static final int CONTENT_ROW_COUNT = 2 ;
public ECPreviewPane ( ) {
this . setPreferredSize ( new Dimension ( 517 , 147 ) ) ;
this . setPreferredSize ( new Dimension ( 517 , 158 ) ) ;
this . setBorder ( BorderFactory . createEmptyBorder ( 0 , 1 , 2 , 1 ) ) ;
this . setLayout ( FRGUIPaneFactory . createBorderLayout ( ) ) ;
JPanel titlePane = new UINoOpaquePanel ( new GridLayout ( ) ) ;
this . add ( titlePane , BorderLayout . NORTH ) ;
JPanel extCenterPane = FRGUIPaneFactory . createBorderLayout_NO_Opaque_Pane ( ) ;
this . add ( extCenterPane , BorderLayout . CENTER ) ;
extCenterPane . add ( titlePane , BorderLayout . NORTH ) ;
for ( int i = 0 ; i < COL_COUNT ; i + + ) {
PreviewCell cell = new PreviewCell ( Toolkit . i18nText ( "Fine-Design_Basic_Predefined_Style_Header" ) ) ;
cell . setPreferredSize ( new Dimension ( 103 , 36 ) ) ;
@ -40,22 +43,29 @@ public class ECPreviewPane extends AbstractECPreviewPane {
headerCellList . add ( cell ) ;
}
JPanel contentPane = new UINoOpaquePanel ( new GridLayout ( 2 , 5 , 0 , 0 ) ) ;
this . add ( contentPane , BorderLayout . CENTER ) ;
extCenterPane . add ( contentPane , BorderLayout . CENTER ) ;
for ( int i = 0 ; i < COL_COUNT * CONTENT_ROW_COUNT ; i + + ) {
PreviewCell cell = new PreviewCell ( Toolkit . i18nText ( "Fine-Design_Basic_Predefined_Style_Main_Text" ) ) ;
cell . setPreferredSize ( new Dimension ( 103 , 33 ) ) ;
cell . setPreferredSize ( new Dimension ( 103 , 30 ) ) ;
contentPane . add ( cell ) ;
contentCellList . add ( cell ) ;
}
JPanel endPane = new UINoOpaquePanel ( new GridLayout ( ) ) ;
this . add ( endPane , BorderLayout . SOUTH ) ;
extCenterPane . add ( endPane , BorderLayout . SOUTH ) ;
for ( int i = 0 ; i < COL_COUNT ; i + + ) {
PreviewCell cell = new PreviewCell ( Toolkit . i18nText ( "Fine-Design_Basic_Predefined_Style_Highlight_Text" ) ) ;
cell . setPreferredSize ( new Dimension ( 103 , 33 ) ) ;
cell . setPreferredSize ( new Dimension ( 103 , 30 ) ) ;
endPane . add ( cell ) ;
highLightCellList . add ( cell ) ;
}
JPanel extSouthPane = FRGUIPaneFactory . createBorderLayout_NO_Opaque_Pane ( ) ;
PreviewCell assistCell = new PreviewCell ( Toolkit . i18nText ( "Fine-Design_Basic_Predefined_Style_Assist_Text" ) ) ;
assistCell . setPreferredSize ( new Dimension ( 123 , 30 ) ) ;
assistCellList . add ( assistCell ) ;
extSouthPane . add ( assistCell ) ;
this . add ( extSouthPane , BorderLayout . SOUTH ) ;
}
@Override
@ -64,6 +74,8 @@ public class ECPreviewPane extends AbstractECPreviewPane {
refresh ( headerCellList , getReportHeaderStyle ( cellStyleConfig ) ) ;
refresh ( contentCellList , getMainContentStyle ( cellStyleConfig ) ) ;
refresh ( highLightCellList , getHighLightStyle ( cellStyleConfig ) ) ;
refresh ( highLightCellList , getHighLightStyle ( cellStyleConfig ) ) ;
refresh ( assistCellList , getAssistMsgStyle ( cellStyleConfig ) ) ;
}