4 * Copyright(c) 2009 olyutorskii
\r
5 * $Id: DialogPref.java 977 2010-01-02 15:54:12Z olyutorskii $
\r
8 package jp.sourceforge.jindolf;
\r
13 public class DialogPref{
\r
15 private boolean useBodyImage = false;
\r
16 private boolean useMonoImage = false;
\r
17 private boolean isSimpleMode = false;
\r
18 private boolean alignBaloonWidth = false;
\r
23 public DialogPref(){
\r
29 * デカキャラモードを使うか否か状態を返す。
\r
30 * @return デカキャラモードを使うならtrue
\r
32 public boolean useBodyImage(){
\r
33 return this.useBodyImage;
\r
38 * @return 遺影モードを使うならtrue
\r
40 public boolean useMonoImage(){
\r
41 return this.useMonoImage;
\r
45 * シンプル表示モードを使うか否か状態を返す。
\r
46 * @return シンプルモードならtrue
\r
48 public boolean isSimpleMode(){
\r
49 return this.isSimpleMode;
\r
53 * バルーン幅揃えモードを使うか否か状態を返す。
\r
54 * @return バルーン幅揃えモードならtrue
\r
56 public boolean alignBaloonWidth(){
\r
57 return this.alignBaloonWidth;
\r
62 * @param setting 有効にするならtrue
\r
64 public void setBodyImageSetting(boolean setting){
\r
65 this.useBodyImage = setting;
\r
71 * @param setting 有効にするならtrue
\r
73 public void setMonoImageSetting(boolean setting){
\r
74 this.useMonoImage = setting;
\r
80 * @param setting 有効にするならtrue
\r
82 public void setSimpleMode(boolean setting){
\r
83 this.isSimpleMode = setting;
\r
89 * @param setting バルーン幅を揃えたいならtrue
\r
91 public void setAlignBalooonWidthSetting(boolean setting){
\r
92 this.alignBaloonWidth = setting;
\r
98 * @param obj {@inheritDoc}
\r
99 * @return {@inheritDoc}
\r
102 public boolean equals(Object obj){
\r
103 if(obj instanceof DialogPref) return false;
\r
104 DialogPref target = (DialogPref) obj;
\r
106 if(this.useBodyImage != target.useBodyImage) return false;
\r
107 if(this.useMonoImage != target.useMonoImage) return false;
\r
108 if(this.isSimpleMode != target.isSimpleMode) return false;
\r
109 if(this.alignBaloonWidth != target.alignBaloonWidth) return false;
\r
116 * @return {@inheritDoc}
\r
119 public int hashCode(){
\r
121 hash = Boolean.valueOf(this.useBodyImage) .hashCode() << 0;
\r
122 hash ^= Boolean.valueOf(this.useMonoImage) .hashCode() << 4;
\r
123 hash ^= Boolean.valueOf(this.isSimpleMode) .hashCode() << 8;
\r
124 hash ^= Boolean.valueOf(this.alignBaloonWidth).hashCode() << 12;
\r