• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

OmegaT の背景に画像を表示します。


Commit MetaInfo

Revision44 (tree)
Time2014-05-22 16:37:57
Authoryu-tang

Log Message

delegator: 上余白の設定に対応

Change Summary

Incremental Difference

--- trunk/src/jp/sourceforge/users/yutang/omegat/plugin/moenizer/MoeUIDelegator.java (revision 43)
+++ trunk/src/jp/sourceforge/users/yutang/omegat/plugin/moenizer/MoeUIDelegator.java (revision 44)
@@ -37,6 +37,7 @@
3737 private final float DEFAULT_ALPHA = 0.5f;
3838 private float alpha = DEFAULT_ALPHA;
3939 private AlphaComposite alphaComposite = null;
40+ private int marginTop = 0;
4041
4142 public void setOpacity(float opacity) {
4243 this.alpha = opacity;
@@ -66,6 +67,10 @@
6667 this.component = c;
6768 }
6869
70+ public void setMarginTop(int marginTop) {
71+ this.marginTop = marginTop;
72+ }
73+
6974 public void paintBackground(Graphics g) {
7075 if (image != null) {
7176 Graphics2D g2 = (Graphics2D) g.create();
@@ -89,7 +94,7 @@
8994 if (width > tiledImage.getWidth() || height > tiledImage.getHeight()) {
9095 tiledImage = createTiledImage(image, width, height);
9196 }
92- g2.drawImage(tiledImage, 0, 0, component);
97+ g2.drawImage(tiledImage, 0, marginTop, component);
9398 g2.dispose();
9499 }
95100 }