dche.component
クラス DcheViewCanvas

java.lang.Object
  上位を拡張 java.awt.Component
      上位を拡張 java.awt.Canvas
          上位を拡張 gui.BasicViewCanvas
              上位を拡張 dche.component.DcheViewCanvas
すべての実装されたインタフェース:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class DcheViewCanvas
extends BasicViewCanvas

DCHE モデル表示キャンバス

関連項目:
直列化された形式

入れ子のクラスの概要
 
クラス java.awt.Canvas から継承された入れ子のクラス/インタフェース
java.awt.Canvas.AccessibleAWTCanvas
 
クラス java.awt.Component から継承された入れ子のクラス/インタフェース
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
フィールドの概要
protected  java.awt.Color bgColor
          背景色
protected  java.awt.Point centerPoint
          画面中央点
protected  ColorBar colorbar
          カラーバー
protected  java.awt.Rectangle colorbarBound
          カラーバー表示領域を表す Rectangle
protected  ContourData contour
          コンター図データ
protected  java.awt.Color elemColor
          要素表示色
protected  java.awt.Color fgColor
          前景色
protected  java.awt.Font font
          フォント
protected  java.awt.Color htcColor
          熱伝達境界条件表示色
protected  java.lang.String message
          エラーメッセージ
static double MIN_VALUE
          分母の最小値
protected  DcheDataModel model
          DCHE データモデル
protected  double rotateCoef
          モデル回転速度係数
protected  java.awt.Color tempColor
          節点温度条件表示色
protected  double transCoef
          モデル平行移動係数
protected  Transform transform
          変換行列
protected  int viewSize
          モデル表示領域サイズ
protected  double zoomCoef
          モデル拡大・縮小係数
 
クラス gui.BasicViewCanvas から継承されたフィールド
bg, bgImage, panelSize
 
クラス 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
 
コンストラクタの概要
DcheViewCanvas(DcheDataModel model, java.lang.String message, java.awt.Font font, java.awt.Color bgColor, java.awt.Color fgColor)
          DCHE モデル表示キャンバスを構築する
 
メソッドの概要
 void clear()
          計算結果表示を消去する
protected  void drawDche(java.awt.Graphics2D g, ViewPoint2D[] vp, ContourData contour, ColorBar colorbar)
          DCHE を描画する
protected  void drawElement(java.awt.Graphics2D g, ViewPoint2D[] vp)
          要素を描画する
protected  void drawElement(java.awt.Graphics2D g, ViewPoint2D[] vp, ContourData contour, ColorBar colorbar)
          要素を描画する
protected  void drawHTBound(java.awt.Graphics2D g, ViewPoint2D[] vp)
          熱伝達境界条件を描画する
protected  void drawTemperature(java.awt.Graphics2D g, ViewPoint2D[] vp)
          節点温度条件を描画する
protected  void drawVector(java.awt.Graphics2D g, java.awt.Point p1, java.awt.Point p2, double vsize)
          ベクトルを描画する
protected  void fillPolygon(java.awt.Graphics2D g, int n, int[] gx, int[] gy, double[] value, ColorBar colorbar)
          コンター多角形を描画する
protected  void fillPolygon(java.awt.Graphics2D g, int x, int y, double[] value, PolygonCoordinates s)
          多角形を描画する
 DcheDataModel getModel()
          DCHE データモデルを返す
protected  ViewPoint2D getViewPoint(int index, double vCoef, double cx, double cy)
          画面上の点を返す
protected  boolean innerFrame(int x, int y)
          点が画面内にあるかどうか判別する
 void paint(java.awt.Graphics g)
          描画する
protected  void paintModel(java.awt.Graphics2D g)
          描画内容
 void rotate(int dx, int dy)
          モデルを回転させる
 void setColorBar(ColorBar colorbar)
          カラーバーを設定する
protected  void setColors(java.awt.Color bgColor, java.awt.Color fgColor)
          表示色を設定する
protected  void setPaint()
          画面設定
 void showResult()
          コンター表示を設定する
 void translate(int dx, int dy)
          モデルを平行移動させる
 void update(java.awt.Graphics g)
          再描画する
 void zoom(int dx, int dy)
          モデルを拡大・縮小させる
 
クラス gui.BasicViewCanvas から継承されたメソッド
drawErrorMessage
 
クラス java.awt.Canvas から継承されたメソッド
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
クラス java.awt.Component から継承されたメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

MIN_VALUE

public static final double MIN_VALUE
分母の最小値

関連項目:
定数フィールド値

model

protected DcheDataModel model
DCHE データモデル


viewSize

protected int viewSize
モデル表示領域サイズ


centerPoint

protected java.awt.Point centerPoint
画面中央点


message

protected java.lang.String message
エラーメッセージ


font

protected java.awt.Font font
フォント


bgColor

protected java.awt.Color bgColor
背景色


fgColor

protected java.awt.Color fgColor
前景色


elemColor

protected java.awt.Color elemColor
要素表示色


tempColor

protected java.awt.Color tempColor
節点温度条件表示色


htcColor

protected java.awt.Color htcColor
熱伝達境界条件表示色


transCoef

protected double transCoef
モデル平行移動係数


rotateCoef

protected double rotateCoef
モデル回転速度係数


zoomCoef

protected double zoomCoef
モデル拡大・縮小係数


transform

protected Transform transform
変換行列


colorbar

protected ColorBar colorbar
カラーバー


colorbarBound

protected java.awt.Rectangle colorbarBound
カラーバー表示領域を表す Rectangle


contour

protected ContourData contour
コンター図データ

コンストラクタの詳細

DcheViewCanvas

public DcheViewCanvas(DcheDataModel model,
                      java.lang.String message,
                      java.awt.Font font,
                      java.awt.Color bgColor,
                      java.awt.Color fgColor)
DCHE モデル表示キャンバスを構築する

パラメータ:
model - FEM データモデル
メソッドの詳細

setColors

protected void setColors(java.awt.Color bgColor,
                         java.awt.Color fgColor)
表示色を設定する

パラメータ:
bgColor - 背景色
fgColor - 前景色

getModel

public DcheDataModel getModel()
DCHE データモデルを返す

戻り値:
DCHE データモデル

translate

public void translate(int dx,
                      int dy)
モデルを平行移動させる

パラメータ:
dx - 画面上の x 方向移動量
dy - 画面上の y 方向移動量

rotate

public void rotate(int dx,
                   int dy)
モデルを回転させる

パラメータ:
dx - 画面上の x 方向移動量
dy - 画面上の y 方向移動量

zoom

public void zoom(int dx,
                 int dy)
モデルを拡大・縮小させる

パラメータ:
dx - 画面上の x 方向移動量
dy - 画面上の y 方向移動量

showResult

public void showResult()
コンター表示を設定する


clear

public void clear()
計算結果表示を消去する


setColorBar

public void setColorBar(ColorBar colorbar)
カラーバーを設定する

パラメータ:
colorbar - カラーバー

innerFrame

protected boolean innerFrame(int x,
                             int y)
点が画面内にあるかどうか判別する

パラメータ:
x - x 座標
y - y 座標
戻り値:
点が画面内にある場合は true

update

public void update(java.awt.Graphics g)
再描画する

オーバーライド:
クラス java.awt.Canvas 内の update
パラメータ:
g - 描画するグラフィックスコンテキスト

paint

public void paint(java.awt.Graphics g)
描画する

オーバーライド:
クラス java.awt.Canvas 内の paint
パラメータ:
g - 描画するグラフィックスコンテキスト

setPaint

protected void setPaint()
画面設定

オーバーライド:
クラス BasicViewCanvas 内の setPaint

paintModel

protected void paintModel(java.awt.Graphics2D g)
描画内容

パラメータ:
g - 描画するグラフィックスコンテキスト

drawElement

protected void drawElement(java.awt.Graphics2D g,
                           ViewPoint2D[] vp,
                           ContourData contour,
                           ColorBar colorbar)
要素を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vp - 節点の画面上の点を格納した配列
contour - コンター図データ
colorbar - カラーバー

drawDche

protected void drawDche(java.awt.Graphics2D g,
                        ViewPoint2D[] vp,
                        ContourData contour,
                        ColorBar colorbar)
DCHE を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vp - 節点の画面上の点を格納した配列
contour - コンター図データ
colorbar - カラーバー

drawElement

protected void drawElement(java.awt.Graphics2D g,
                           ViewPoint2D[] vp)
要素を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vp - 節点の画面上の点を格納した配列

drawTemperature

protected void drawTemperature(java.awt.Graphics2D g,
                               ViewPoint2D[] vp)
節点温度条件を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vp - 節点の画面上の点を格納した配列

drawHTBound

protected void drawHTBound(java.awt.Graphics2D g,
                           ViewPoint2D[] vp)
熱伝達境界条件を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vp - 節点の画面上の点を格納した配列

drawVector

protected void drawVector(java.awt.Graphics2D g,
                          java.awt.Point p1,
                          java.awt.Point p2,
                          double vsize)
ベクトルを描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
p1 - ベクトルの始点
p2 - ベクトルの終点
vsize - 先端部表示サイズ

fillPolygon

protected void fillPolygon(java.awt.Graphics2D g,
                           int n,
                           int[] gx,
                           int[] gy,
                           double[] value,
                           ColorBar colorbar)
コンター多角形を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
n - 頂点の数
gx - 頂点の x 座標を格納した配列
gy - 頂点の y 座標を格納した配列
value - 頂点の値を格納した配列
colorbar - カラーバー

fillPolygon

protected void fillPolygon(java.awt.Graphics2D g,
                           int x,
                           int y,
                           double[] value,
                           PolygonCoordinates s)
多角形を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
x - x 座標
y - y 座標
value - 頂点の値を格納した配列
s - 多角形内部座標

getViewPoint

protected ViewPoint2D getViewPoint(int index,
                                   double vCoef,
                                   double cx,
                                   double cy)
画面上の点を返す

パラメータ:
index - 節点のインデックス
vCoef - モデルの表示倍率
cx - モデル中心の x 座標
cy - モデル中心の y 座標
戻り値:
画面上の点