fem.component
クラス FEMViewCanvas

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

public class FEMViewCanvas
extends BasicViewCanvas

FEM モデル表示キャンバス

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

入れ子のクラスの概要
 
クラス 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 static java.text.DecimalFormat DFORM
          数値書式
protected  double dispCoef
          変位表示倍率
protected  java.awt.Color elemColor
          要素表示色
protected  java.awt.Color fgColor
          前景色
protected  java.awt.Font font
          フォント
protected  java.awt.Color loadColor
          荷重条件表示色
protected  java.lang.String message
          エラーメッセージ
static double MIN_VALUE
          分母の最小値
protected  FEMDataModel model
          FEM データモデル
protected  java.awt.Color pressColor
          面圧条件表示色
protected  java.awt.Color restColor
          拘束条件表示色
protected  double rotateCoef
          モデル回転速度係数
protected  double transCoef
          モデル平行移動係数
protected  Transform transform
          変換行列
protected  int viewSize
          モデル表示領域サイズ
protected  double[][] zbuffer
          Z バッファ
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
 
コンストラクタの概要
FEMViewCanvas(FEMDataModel model, java.lang.String message, java.awt.Font font, java.awt.Color bgColor, java.awt.Color fgColor)
          FEM モデル表示キャンバスを構築する
 
メソッドの概要
 void clear()
          計算結果表示を消去する
protected  void drawElement(java.awt.Graphics2D g, ViewPoint3D[] vp)
          要素を描画する
protected  void drawElement(java.awt.Graphics2D g, ViewPoint3D[] vp, ContourData contour, ColorBar colorbar)
          要素を描画する
protected  void drawLoad(java.awt.Graphics2D g, double vCoef, Point3D center)
          荷重条件を描画する
protected  void drawPolygon(java.awt.Graphics2D g, int n, int[] gx, int[] gy, double[] gz)
          多角形を描画する
protected  void drawPress(java.awt.Graphics2D g, double vCoef, Point3D center)
          面圧条件を描画する
protected  void drawRestraint(java.awt.Graphics2D g, ViewPoint3D[] 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[] gz)
          多角形を描画する
protected  void fillPolygon(java.awt.Graphics2D g, int n, int[] gx, int[] gy, double[] gz, double[] value, ColorBar colorbar)
          コンター多角形を描画する
protected  void fillPolygon(java.awt.Graphics2D g, int x, int y, double[] gz, double[] value, PolygonCoordinates s)
          多角形を描画する
protected  void fillPolygon(java.awt.Graphics2D g, int x, int y, double[] gz, PolygonCoordinates s)
          多角形を描画する
 double getDisplacementViewCoef(double coef)
          画面に対する比率から変位表示倍率を計算する
 FEMDataModel getModel()
          FEM データモデルを返す
protected  ViewPoint3D getViewPoint(int index, double vCoef, Point3D center)
          画面上の点を返す
protected  ViewPoint3D[] getViewPoint(int index, double vCoef, Point3D center, double coef2, Vector3D vector)
          画面上の点を返す
protected  ViewPoint3D[] getViewPoint(Point3D p, double vCoef, Point3D center, double coef2, Vector3D vector)
          画面上の点を返す
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)
          表示色を設定する
 void setContour(int param, int component)
          コンター表示を設定する
 void setDisplacementCoef(double dispCoef)
          変位表示倍率を設定する
protected  void setPaint()
          画面設定
 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
分母の最小値

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

DFORM

protected static final java.text.DecimalFormat DFORM
数値書式


model

protected FEMDataModel model
FEM データモデル


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
要素表示色


restColor

protected java.awt.Color restColor
拘束条件表示色


loadColor

protected java.awt.Color loadColor
荷重条件表示色


pressColor

protected java.awt.Color pressColor
面圧条件表示色


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
コンター図データ


dispCoef

protected double dispCoef
変位表示倍率


zbuffer

protected double[][] zbuffer
Z バッファ

コンストラクタの詳細

FEMViewCanvas

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

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

setColors

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

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

getModel

public FEMDataModel getModel()
FEM データモデルを返す

戻り値:
FEM データモデル

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 方向移動量

setContour

public void setContour(int param,
                       int component)
コンター表示を設定する

パラメータ:
param - データの種類を表す int 型
component - データの成分を表す int 型

clear

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


setColorBar

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

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

getDisplacementViewCoef

public double getDisplacementViewCoef(double coef)
画面に対する比率から変位表示倍率を計算する

パラメータ:
coef - 画面に対する比率
戻り値:
変位表示倍率

setDisplacementCoef

public void setDisplacementCoef(double dispCoef)
変位表示倍率を設定する

パラメータ:
dispCoef - 変位表示倍率

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,
                           ViewPoint3D[] vp,
                           ContourData contour,
                           ColorBar colorbar)
要素を描画する

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

drawElement

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

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

drawRestraint

protected void drawRestraint(java.awt.Graphics2D g,
                             ViewPoint3D[] vp)
拘束条件を描画する

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

drawLoad

protected void drawLoad(java.awt.Graphics2D g,
                        double vCoef,
                        Point3D center)
荷重条件を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vCoef - モデルの表示倍率
center - モデルの中心を表す Point3D

drawPress

protected void drawPress(java.awt.Graphics2D g,
                         double vCoef,
                         Point3D center)
面圧条件を描画する

パラメータ:
g - 描画するグラフィックスコンテキスト
vCoef - モデルの表示倍率
center - モデルの中心を表す Point3D

drawVector

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

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

drawPolygon

protected void drawPolygon(java.awt.Graphics2D g,
                           int n,
                           int[] gx,
                           int[] gy,
                           double[] gz)
多角形を描画する

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

fillPolygon

protected void fillPolygon(java.awt.Graphics2D g,
                           int n,
                           int[] gx,
                           int[] gy,
                           double[] gz)
多角形を描画する

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

fillPolygon

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

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

fillPolygon

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

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

fillPolygon

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

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

getViewPoint

protected ViewPoint3D getViewPoint(int index,
                                   double vCoef,
                                   Point3D center)
画面上の点を返す

パラメータ:
index - 節点のインデックス
vCoef - モデルの表示倍率
center - モデルの中心を表す Point3D
戻り値:
画面上の点

getViewPoint

protected ViewPoint3D[] getViewPoint(int index,
                                     double vCoef,
                                     Point3D center,
                                     double coef2,
                                     Vector3D vector)
画面上の点を返す

パラメータ:
index - 節点のインデックス
vCoef - モデルの表示倍率
center - モデルの中心を表す Point3D
coef2 - ベクトルの表示倍率
vector - 節点のベクトル
戻り値:
画面上の点を格納した配列

getViewPoint

protected ViewPoint3D[] getViewPoint(Point3D p,
                                     double vCoef,
                                     Point3D center,
                                     double coef2,
                                     Vector3D vector)
画面上の点を返す

パラメータ:
p - 節点
vCoef - モデルの表示倍率
center - モデルの中心を表す Point3D
coef2 - ベクトルの表示倍率
vector - 節点のベクトル
戻り値:
画面上の点を格納した配列