Repository from CVS
https://osdn.net/cvs/view/gokigen/MeMoMa/
Revisión | a2c85ae9b546e24d5ddc85d863dd5fde7b7cf830 (tree) |
---|---|
Tiempo | 2018-07-21 12:16:50 |
Autor | MRSa <mrsa@myad...> |
Commiter | MRSa |
一部のワーニングを修正。
@@ -5,11 +5,8 @@ import android.view.MotionEvent; | ||
5 | 5 | |
6 | 6 | public interface ICanvasDrawer |
7 | 7 | { |
8 | - public abstract void prepareToStart(int width, int height); | |
9 | - public abstract void changedScreenProperty(int format, int width, int height); | |
10 | - | |
11 | - public abstract void drawOnCanvas(Canvas canvas); | |
12 | - | |
13 | - public abstract boolean onTouchEvent(MotionEvent event); | |
14 | - | |
8 | + void prepareToStart(int width, int height); | |
9 | + void changedScreenProperty(int format, int width, int height); | |
10 | + void drawOnCanvas(Canvas canvas); | |
11 | + boolean onTouchEvent(MotionEvent event); | |
15 | 12 | } |
@@ -6,8 +6,6 @@ import android.graphics.Matrix; | ||
6 | 6 | import android.graphics.Paint; |
7 | 7 | import android.graphics.Path; |
8 | 8 | import android.graphics.RectF; |
9 | - | |
10 | -import jp.sourceforge.gokigen.memoma.drawers.MeMoMaCanvasDrawer; | |
11 | 9 | import jp.sourceforge.gokigen.memoma.holders.MeMoMaObjectHolder; |
12 | 10 | |
13 | 11 | /** |
@@ -248,19 +246,13 @@ public class ObjectShapeDrawer | ||
248 | 246 | } |
249 | 247 | /** |
250 | 248 | * 矢印を描画する処理 (ツリー表示時) |
251 | - * | |
252 | - * @param canvas | |
253 | - * @param paint | |
254 | - * @param x1 | |
255 | - * @param y1 | |
256 | - * @param checkValue | |
257 | - * @param isXaxis | |
249 | + * | |
258 | 250 | */ |
259 | 251 | static public void drawArrowTree(Canvas canvas, Paint paint, float x1, float y1, float checkValue, boolean isXaxis) |
260 | 252 | { |
261 | 253 | float margin = 8.0f; |
262 | - float direction = 1.0f; | |
263 | - if (isXaxis == true) | |
254 | + float direction; | |
255 | + if (isXaxis) | |
264 | 256 | { |
265 | 257 | direction = (checkValue < x1) ? -1.0f : 1.0f; |
266 | 258 | canvas.drawLine(x1, y1, (x1 + direction * margin), (y1 - margin), paint); |
@@ -275,13 +267,7 @@ public class ObjectShapeDrawer | ||
275 | 267 | } |
276 | 268 | /** |
277 | 269 | * 矢印を描画する処理 |
278 | - * | |
279 | - * @param canvas | |
280 | - * @param paint | |
281 | - * @param x1 | |
282 | - * @param y1 | |
283 | - * @param x2 | |
284 | - * @param y2 | |
270 | + * | |
285 | 271 | */ |
286 | 272 | static public void drawArrow(Canvas canvas, Paint paint, float x1, float y1, float x2, float y2) |
287 | 273 | { |
@@ -316,10 +302,7 @@ public class ObjectShapeDrawer | ||
316 | 302 | |
317 | 303 | /** |
318 | 304 | * オブジェクトのラベルを表示する |
319 | - * | |
320 | - * @param canvas | |
321 | - * @param paint | |
322 | - * @param pos | |
305 | + * | |
323 | 306 | */ |
324 | 307 | public static void drawTextLabel(Canvas canvas, Paint paint, MeMoMaObjectHolder.PositionObject pos, RectF region, int displayObjectInformation, float offsetX, float offsetY) |
325 | 308 | { |
@@ -330,7 +313,7 @@ public class ObjectShapeDrawer | ||
330 | 313 | float width = region.width() - MeMoMaCanvasDrawer.OBJECTLABEL_MARGIN_WIDTH; |
331 | 314 | int textLen = paint.breakText(pos.label, true, width, null); // 省略文字を追加するから、そのぶん減らす |
332 | 315 | labelToShow = labelToShow.substring(0, textLen); |
333 | - if (labelToShow != pos.label) | |
316 | + if (!labelToShow.equals(pos.label)) | |
334 | 317 | { |
335 | 318 | // truncate した場合には、省略文字を出す。 |
336 | 319 | labelToShow = labelToShow + "..."; |
@@ -345,10 +328,10 @@ public class ObjectShapeDrawer | ||
345 | 328 | |
346 | 329 | // 文字をちょっと影付きにする |
347 | 330 | paint.setStyle(Paint.Style.FILL_AND_STROKE); |
348 | - paint.setShadowLayer(0.5f, 0.5f, 0.5f, Color.DKGRAY); | |
331 | + paint.setShadowLayer(0.7f, 0.7f, 0.7f, Color.DKGRAY); | |
349 | 332 | |
350 | 333 | // ユーザチェックの描画 |
351 | - if (pos.userChecked == true) | |
334 | + if (pos.userChecked) | |
352 | 335 | { |
353 | 336 | canvas.drawText("*", region.centerX(), region.top + (MeMoMaCanvasDrawer.OBJECTLABEL_MARGIN * 2.0f), paint); |
354 | 337 | } |
@@ -1,6 +1,5 @@ | ||
1 | 1 | package jp.sourceforge.gokigen.memoma.extension; |
2 | 2 | |
3 | -import android.app.ActionBar; | |
4 | 3 | import android.app.Activity; |
5 | 4 | import android.app.Dialog; |
6 | 5 | import android.content.Intent; |
@@ -2,11 +2,11 @@ package jp.sourceforge.gokigen.memoma.listitem; | ||
2 | 2 | |
3 | 3 | public class SymbolListArrayItem |
4 | 4 | { |
5 | - private int iconResource = 0; | |
6 | - private int subIconResource = 0; | |
7 | - private String textResource1st = ""; | |
8 | - private String textResource2nd = ""; | |
9 | - private String textResource3rd = ""; | |
5 | + private int iconResource; | |
6 | + private int subIconResource; | |
7 | + private String textResource1st; | |
8 | + private String textResource2nd; | |
9 | + private String textResource3rd; | |
10 | 10 | |
11 | 11 | /** |
12 | 12 | * コンストラクタ |