|
|
|
@ -4,38 +4,35 @@ import com.fr.base.Style;
|
|
|
|
|
import com.fr.base.theme.TemplateTheme; |
|
|
|
|
import com.fr.base.theme.settings.ThemedCellStyle; |
|
|
|
|
import com.fr.base.theme.settings.ThemedCellStyleList; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.ThemePreviewed; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.UINoOpaquePanel; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.ecpreview.cell.AbstractPreviewCell; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.ecpreview.cell.PreviewCell; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
public abstract class AbstractECPreviewPane extends UINoOpaquePanel implements ThemePreviewed<TemplateTheme> { |
|
|
|
|
protected Style getReportHeaderStyle(ThemedCellStyleList cellStyleList) { |
|
|
|
|
return getCellStyle(cellStyleList, Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); |
|
|
|
|
return getCellStyle(cellStyleList.getUse4Header()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Style getMainContentStyle(ThemedCellStyleList cellStyleList) { |
|
|
|
|
return getCellStyle(cellStyleList, Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); |
|
|
|
|
return getCellStyle(cellStyleList.getUse4MainText()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Style getHighLightStyle(ThemedCellStyleList cellStyleList) { |
|
|
|
|
return getCellStyle(cellStyleList, Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Highlight_Text")); |
|
|
|
|
return getCellStyle(cellStyleList.getUse4HighlightText()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Style getSmallTitleStyle(ThemedCellStyleList cellStyleList) { |
|
|
|
|
return getCellStyle(cellStyleList, Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Small_Title")); |
|
|
|
|
return getCellStyle(cellStyleList.getUse4SmallTitle()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Style getCellStyle(ThemedCellStyleList cellStyleList, String styleName) { |
|
|
|
|
ThemedCellStyle cellStyle = cellStyleList.find(styleName); |
|
|
|
|
if (cellStyle == null) { |
|
|
|
|
private Style getCellStyle(ThemedCellStyle themedCellStyle) { |
|
|
|
|
if (themedCellStyle == null) { |
|
|
|
|
return Style.DEFAULT_STYLE; |
|
|
|
|
} |
|
|
|
|
return cellStyle.getStyle(); |
|
|
|
|
Style style = themedCellStyle.getStyle(); |
|
|
|
|
return style != null ? style : Style.DEFAULT_STYLE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void refresh(List<AbstractPreviewCell> list, Style style) { |
|
|
|
|