onbon.bx06.area
Class AbstractTextCaptionBxArea

java.lang.Object
  extended by onbon.bx06.area.BxArea
      extended by onbon.bx06.area.AbstractTextCaptionBxArea
Direct Known Subclasses:
BackgroundBxArea, DynamicBxArea, GradientBackgroundBxArea, TextCaptionBxArea

public abstract class AbstractTextCaptionBxArea
extends BxArea

图文区域,由多个页面堆叠而成。

Author:
ONBON
See Also:
图片页面, 文字档页面

Field Summary
protected  ArrayList<BxPage> pages
           
 
Constructor Summary
AbstractTextCaptionBxArea(int x, int y, int width, int height, Bx6GScreenProfile screenProfile)
          建构子。
 
Method Summary
 BxPage addImageFile(String filePath)
          增加图片。
 void addPage(BxPage page)
          加入页面。
 BxPage addText(String text, Font font, Color foreground, Color background, DisplayStyleFactory.DisplayStyle style)
          增加文字內容。
 BxPage addTextFile(String filePath, Font font, Color foreground, Color background, DisplayStyleFactory.DisplayStyle style)
          增加文本。
 void clearPages()
          清除所有页面。
 void preview(Graphics2D g2d)
          檢視配置。
 
Methods inherited from class onbon.bx06.area.BxArea
generate, getFont, getFrameMoveStep, getFrameSetting, getFrameSpeed, getFrameStyle, getHeight, getScreenProfile, getWidth, getX, getY, isFrameShow, loadFrameImage, loadFrameImage, preview, previewScreen, setAreaFrame, setFont, setFrameMoveStep, setFrameShow, setFrameSpeed, setFrameStyle, setHeight, setWidth, setX, setY, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pages

protected final ArrayList<BxPage> pages
Constructor Detail

AbstractTextCaptionBxArea

public AbstractTextCaptionBxArea(int x,
                                 int y,
                                 int width,
                                 int height,
                                 Bx6GScreenProfile screenProfile)
建构子。

Parameters:
x - X 座标。
y - Y 座标。
width - 区域宽度。
height - 区域高度。
screenProfile - 屏幕规格。
Method Detail

addPage

public void addPage(BxPage page)
加入页面。

Parameters:
page - 页面。
See Also:
文字內容, 本文, 图片

addTextFile

public BxPage addTextFile(String filePath,
                          Font font,
                          Color foreground,
                          Color background,
                          DisplayStyleFactory.DisplayStyle style)
增加文本。

Parameters:
filePath - 纯文字档案。
font - 字型。
foreground - 文字颜色。
background - 背景颜色。
style - 图文区页面播放样式。
Returns:
增加的页面,可作額外设定。
See Also:
TextFileBxPage

addText

public BxPage addText(String text,
                      Font font,
                      Color foreground,
                      Color background,
                      DisplayStyleFactory.DisplayStyle style)
增加文字內容。

Parameters:
text - 文字內容。
font - 字型。
foreground - 文字颜色。
background - 背景颜色。
style - 图文区页面播放样式。
Returns:
增加的页面,可作額外设定。
See Also:
TextBxPage

addImageFile

public BxPage addImageFile(String filePath)
增加图片。

Parameters:
filePath - 图片档案。
Returns:
增加的页面,可作額外设定。
See Also:
ImageFileBxPage

clearPages

public void clearPages()
清除所有页面。


preview

public void preview(Graphics2D g2d)
Description copied from class: BxArea
檢視配置。

Overrides:
preview in class BxArea
Parameters:
g2d - 圖。


Copyright © 2020 onbon. All rights reserved.