|
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.ogane.xi.Chart
ChartクラスはX-Tチャートです。
X-Tチャートは時間的に変化する値をグラフ表示する部品です。
X-Tチャートの形状には縦型(VERTICAL)と横型(HORIZONTAL)があり、
グラフを表示する紙とペン、値を読むための目盛りで構成されています。
横型の場合は右から左へ、縦型の場合上から下へ指定した速度で紙が送られ、
指定した値に応じてペンが移動することによって紙の上にグラフを描きます。
X-Tチャートには標準で1本のペンがついていますがペンを増やす事も、
増やしたペンを取り去る事もできます。ただし、標準のペンだけは取り外せません。
値はそれを表示したいペンに設定します。X-Tチャートに値を設定すると
標準のペンに値を設定した事になります。色も同様です。
目盛りには、主目盛りと副目盛りがありその数を設定できます。
主目盛りには数字が表示され、X-Tチャートの大きさに応じて文字の大きさと頻度が自動的に
調整されます。副目盛りは主目盛りと主目盛りの間に表示される少し小さめの目盛りで
数字は表示されません。
紙には一定時間間隔で桝目の線が描かれます。紙送りの速度は、秒/桝目で指定し、
桝目の間隔は、ピクセル/桝目で指定します。
デフォルトで紙送りの速度は10秒/桝目、桝目の間隔は20ピクセル/桝目です。
紙送りはstart()で開始し、stop()で停止します。作成直後は紙送りは停止しています。
このクラスは JIM(Java Industrial Monitoring Framework)V1.0の仕様に適合しています。
クラス java.awt.Canvas から継承した内部クラス |
Canvas.AccessibleAWTCanvas |
クラス java.awt.Component から継承した内部クラス |
Component.AccessibleAWTComponent |
フィールドの概要 | |
static int |
HORIZONTAL
横型 |
static int |
VERTICAL
縦型 |
クラス java.awt.Component から継承したフィールド |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
インタフェース java.awt.image.ImageObserver から継承したフィールド |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
コンストラクタの概要 | |
Chart()
横型のX-Tチャートを作成します。 |
|
Chart(int theOrientation)
X-Tチャートを作成します。 |
|
Chart(int theOrientation,
double theValue,
double theMinimum,
double theMaximum,
int theNumMajorTicks,
int theNumMinorTicks)
X-Tチャートを作成します。 |
メソッドの概要 | |
void |
addNotify()
ネイティブスクリーンリソースに接続して、 このコンポーネントを表示可能にします。 |
Pen |
addPen()
ペンを追加します。 |
Pen |
addPen(Color theColor)
ペンを追加します。 |
Pen |
addPen(Color theColor,
double theValue)
ペンを追加します。 |
void |
dataValueChanged(DataValueChangeEvent event)
|
void |
destroy()
紙送りを強制停止します。 |
int |
getDivisionSize()
桝目の大きさを返します。 |
Font |
getFont()
字体を返します。 |
Color |
getGridColor()
桝目の色を返します。 |
double |
getMaximum()
最大値を返します。 |
double |
getMinimum()
最小値を返します。 |
Dimension |
getMinimumSize()
X-Tチャートの最小サイズを返します。 |
int |
getNumMajorTicks()
主目盛りの数を返します。 |
int |
getNumMinorTicks()
副目盛りの数を返します。 |
int |
getOrientation()
形状を返します。 |
Color |
getPaperColor()
紙の色を返します。 |
Color |
getPenColor()
標準ペンの色を返します。 |
Color |
getPenColor(Pen thePen)
ペンの色を返します。 |
Dimension |
getPreferredSize()
X-Tチャートの推奨サイズを返します。 |
Class[][] |
getReferableDataHolderTypeInfo(DataReferencer dataRef)
|
DataReferencer |
getReferencer()
データリファレンサーを返します。 |
double |
getSpeed()
紙送り速度を返します。 |
Color |
getStampColor()
時刻の色を返します。 |
int |
getStampInterval()
時刻の頻度を返します。 |
Color |
getTickColor()
目盛の色を返します。 |
String |
getTickLabelFormat()
目盛りの書式を返します。 |
double |
getValue()
標準ペンの現在値を返します。 |
double |
getValue(Pen thePen)
ペンの現在値を返します。 |
boolean |
isStarted()
紙送りを返します。 |
int |
numberOfPen()
ペンの本数を返します。 |
void |
paint(Graphics g)
X-Tチャートを描画します。 |
void |
removeNotify()
ネイティブスクリーンリソースを破棄して、 このコンポーネントを非表示にします。 |
void |
removePen(Pen thePen)
ペンを削除します。 |
void |
run()
紙を送りグラフを描画します。 |
void |
setBackground(Color theColor)
背景色を指定します。 |
void |
setBounds(int x,
int y,
int w,
int h)
指定された境界の矩形領域にX-Tチャートを再形成します。 |
void |
setDivisionSize(int theSize)
桝目の大きさを設定します。 |
void |
setFont(Font theFont)
字体を指定します。 |
void |
setForeground(Color theColor)
前景色を指定します。 |
void |
setGridColor(Color theColor)
網目の色を設定します。 |
void |
setMaximum(double theMaximum)
最大値を設定します。 |
void |
setMinimum(double theMinimum)
最小値を設定します。 |
void |
setNumMajorTicks(int theNumMajorTicks)
主目盛りの数を設定します。 |
void |
setNumMinorTicks(int theNumMinorTicks)
副目盛りの数を設定します。 |
void |
setNumTicks(int theNumMajorTicks,
int theNumMinorTicks)
目盛りの数を設定します。 |
void |
setOrientation(int theOrientation)
形状を設定します。 |
void |
setPaperColor(Color theColor)
紙の色を設定します。 |
void |
setPenColor(Color theColor)
ペンの色を設定します。 |
void |
setReferencer(DataReferencer newDHR)
データリファレンサーを設定します。 |
void |
setSize(int w,
int h)
指定された幅と高さにX-Tチャートを変更します。 |
void |
setSpeed(double theSpeed)
紙送り速度を設定します。 |
void |
setStampColor(Color theColor)
時刻の色を設定します。 |
void |
setStampInterval(int theInterval)
時刻の頻度を設定します。 |
void |
setStarted(boolean started)
紙送りを設定します。 |
void |
setTickColor(Color theColor)
目盛の色を設定します。 |
void |
setTickLabelFormat(String theTickLabelFormat)
目盛りの書式を設定します。 |
void |
setValue(double theValue)
現在値を設定します。 |
Pen |
standerdPen()
標準ペンを返します。 |
void |
start()
紙送りを開始します。 |
void |
stop()
紙送りを停止します。 |
void |
update(Graphics g)
X-Tチャートを更新します。 |
クラス java.awt.Canvas から継承したメソッド |
getAccessibleContext |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
フィールドの詳細 |
public static final int VERTICAL
public static final int HORIZONTAL
コンストラクタの詳細 |
public Chart(int theOrientation, double theValue, double theMinimum, double theMaximum, int theNumMajorTicks, int theNumMinorTicks)
theOrientation
- 形状、縦型(VERTICAL)または横型(HORIZONTAL)theValue
- 初期値theMinimum
- 最小値theMaximum
- 最大値theNumMajorTicks
- 主目盛りの数theNumMinorTicks
- 副目盛りの数public Chart(int theOrientation)
theOrientation
- 形状、縦型(VERTICAL)または横型(HORIZONTAL)public Chart()
メソッドの詳細 |
public void start()
public void stop()
public void setStarted(boolean started)
started
- 真:開始/偽:停止public boolean isStarted()
public void destroy()
public void setBackground(Color theColor)
Component
内の setBackground
theColor
- 背景色public void setForeground(Color theColor)
Component
内の setForeground
theColor
- 前景色public void setFont(Font theFont)
Component
内の setFont
theFont
- 字体public Font getFont()
Component
内の getFont
public void setOrientation(int theOrientation)
theOrientation
- 形状、縦型(VERTICAL)または横型(HORIZONTAL)public void setValue(double theValue)
Indicator
内の setValue
theValue
- 現在値public void setMaximum(double theMaximum)
theMaximum
- 最大値public void setMinimum(double theMinimum)
theMinimum
- 最小値public void setNumTicks(int theNumMajorTicks, int theNumMinorTicks)
theNumMajorTicks
- 主目盛りの数theNumMinorTicks
- 副目盛りの数public void setNumMajorTicks(int theNumMajorTicks)
theNumMajorTicks
- 主目盛りの数public void setNumMinorTicks(int theNumMinorTicks)
theNumMinorTicks
- 副目盛りの数public void setTickLabelFormat(String theTickLabelFormat)
theTickLabelFormat
- 目盛りの書式public void setPenColor(Color theColor)
theColor
- ペンの色public void setPaperColor(Color theColor)
theColor
- 紙の色public void setGridColor(Color theColor)
theColor
- 桝目の色public void setTickColor(Color theColor)
theColor
- 目盛の色public void setStampColor(Color theColor)
theColor
- 時刻の色public void setSpeed(double theSpeed)
theSpeed
- 紙送り速度(秒/桝目)public void setDivisionSize(int theSize)
theSize
- 桝目の大きさ(ピクセル)public void setStampInterval(int theInterval)
theInterval
- 頻度(桝目)public Pen standerdPen()
public double getValue()
public int getOrientation()
public double getValue(Pen thePen)
public double getMaximum()
public double getMinimum()
public int getNumMajorTicks()
public int getNumMinorTicks()
public String getTickLabelFormat()
public Color getPenColor()
public Color getPenColor(Pen thePen)
thePen
- ペンpublic Pen addPen(Color theColor, double theValue)
theValue
- 初期値theColor
- ペンの色public Pen addPen(Color theColor)
theColor
- ペンの色public Pen addPen()
public void removePen(Pen thePen)
thePen
- ペンpublic int numberOfPen()
public Color getPaperColor()
public Color getGridColor()
public Color getTickColor()
public Color getStampColor()
public double getSpeed()
public int getDivisionSize()
public int getStampInterval()
public void setSize(int w, int h)
Component
内の setSize
w
- X-Tチャートの幅h
- X-Tチャートの高さ public void setBounds(int x, int y, int w, int h)
Component
内の setBounds
x
- x座標y
- y座標w
- X-Tチャートの幅h
- X-Tチャートの高さ public Dimension getPreferredSize()
Component
内の getPreferredSize
public Dimension getMinimumSize()
Component
内の getMinimumSize
public void update(Graphics g)
Component
内の update
g
- Graphicsコンテキストpublic void paint(Graphics g)
Canvas
内の paint
g
- Graphicsコンテキストpublic void run()
Runnable
内の run
public void setReferencer(DataReferencer newDHR)
newDHR
- データリファレンサーpublic DataReferencer getReferencer()
public void addNotify()
Canvas
内の addNotify
public void removeNotify()
Component
内の removeNotify
public void dataValueChanged(DataValueChangeEvent event)
DataValueChangeListener
内の dataValueChanged
public Class[][] getReferableDataHolderTypeInfo(DataReferencer dataRef)
DataReferencerOwner
内の getReferableDataHolderTypeInfo
|
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2000-2010, 大金システム設計事務所. All Rights Reserved.
2660-73 Mawatari, Hitachinaka, Ibaraki, 312-0012 JAPAN.
info@ogane.com