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