onbon.bx06.area.unit
Class BxUnit

java.lang.Object
  extended by onbon.bx06.area.unit.BxUnit
Direct Known Subclasses:
AnalogClockBxUnit, CommonBxUnit, CounterBxUnit, TimerBxUnit

public abstract class BxUnit
extends Object

时间区域中的时间单元。

Author:
ONBON

Constructor Summary
BxUnit(int x, int y, Bx6GScreenProfile profile)
          建构子。
 
Method Summary
 int calculateUnitWidth(Graphics2D g2d)
          计算宽度。
 void darw(Graphics2D g2d)
          绘图。
abstract  byte[] generate(ProgramDataBxFile dataFile)
          产生单元位元组资讯。
 Font getFont()
          取得单元显示内容字型。
 Bx6GScreenProfile getScreenProfile()
          取得显示屏类型。
 Color getUnitColor()
          取得单位颜色。
 int getUnitX()
          取得相对于时间区域 X 座标的 X 座标。
 int getUnitY()
          取得相对于时间区域 Y 座标的 Y 座标。
abstract  void preview(Graphics2D g2d, int areaX, int areaY)
          绘图。
 void setFont(Font font)
          设定单元显示内容字型。
 void setUnitColor(Color unitColor)
          设定单位颜色。
 void setUnitX(int unitX)
          设定相对于时间区域 X 座标的 X 座标。
 void setUnitY(int unitY)
          设定相对于时间区域 Y 座标的 Y 座标。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BxUnit

public BxUnit(int x,
              int y,
              Bx6GScreenProfile profile)
建构子。

Parameters:
x - 相对于时间区域 X 座标的 X 座标。
y - 相对于时间区域 Y 座标的 Y 座标。
profile - 屏幕规格。
Method Detail

getScreenProfile

public Bx6GScreenProfile getScreenProfile()
取得显示屏类型。

Returns:
显示屏类型。

getUnitX

public int getUnitX()
取得相对于时间区域 X 座标的 X 座标。

Returns:
X 座标。

setUnitX

public void setUnitX(int unitX)
设定相对于时间区域 X 座标的 X 座标。

Parameters:
unitX - X 座标。

getUnitY

public int getUnitY()
取得相对于时间区域 Y 座标的 Y 座标。

Returns:
Y 座标。

setUnitY

public void setUnitY(int unitY)
设定相对于时间区域 Y 座标的 Y 座标。

Parameters:
unitY - 单元 Y 座标。

getFont

public Font getFont()
取得单元显示内容字型。

Returns:
字型。

setFont

public void setFont(Font font)
设定单元显示内容字型。

Parameters:
font - 字型。

getUnitColor

public Color getUnitColor()
取得单位颜色。

Returns:
单位颜色。

setUnitColor

public void setUnitColor(Color unitColor)
设定单位颜色。

Parameters:
unitColor - 单位颜色。

calculateUnitWidth

public int calculateUnitWidth(Graphics2D g2d)
计算宽度。

Parameters:
g2d - 图布。
Returns:
宽度。

darw

public void darw(Graphics2D g2d)
绘图。

Parameters:
g2d - 图布。

preview

public abstract void preview(Graphics2D g2d,
                             int areaX,
                             int areaY)
绘图。

Parameters:
g2d - 图布。
areaX - 区域 X 座标。
areaY - 区域 Y 座标。

generate

public abstract byte[] generate(ProgramDataBxFile dataFile)
产生单元位元组资讯。

Parameters:
dataFile - 節目资讯。
Returns:
位元组资讯。


Copyright © 2020 onbon. All rights reserved.