タイニー番組ナビゲータ本体
Revisión | c409a527d82549ab568299872e8a95216d1782c1 (tree) |
---|---|
Tiempo | 2018-08-22 21:29:43 |
Autor | Masahiko Kimura <mkimura@u01....> |
Commiter | Masahiko Kimura |
1.7 (2018/8/22):
1. DIGA DMR-BZT710などで録画結果が取得できない問題の対応
2. [新聞形式]予約バーの色や幅をカスタマイズできるようにする
@@ -40,14 +40,14 @@ import tainavi.TVProgram.ProgGenre; | ||
40 | 40 | abstract class AbsPaperColorsDialog extends JEscCancelDialog { |
41 | 41 | |
42 | 42 | private static final long serialVersionUID = 1L; |
43 | - | |
43 | + | |
44 | 44 | private static boolean debug = false; |
45 | 45 | |
46 | - | |
46 | + | |
47 | 47 | /******************************************************************************* |
48 | 48 | * 抽象メソッド |
49 | 49 | ******************************************************************************/ |
50 | - | |
50 | + | |
51 | 51 | protected abstract Env getEnv(); |
52 | 52 | protected abstract Bounds getBoundsEnv(); |
53 | 53 | protected abstract PaperColorsMap getPaperColorMap(); |
@@ -59,66 +59,66 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
59 | 59 | protected abstract void updatePaperBounds(Env ec, Bounds bc); |
60 | 60 | protected abstract void updatePaperRepaint(); |
61 | 61 | |
62 | - | |
62 | + | |
63 | 63 | /******************************************************************************* |
64 | 64 | * 呼び出し元から引き継いだもの |
65 | 65 | ******************************************************************************/ |
66 | - | |
66 | + | |
67 | 67 | private final Env origenv = getEnv(); |
68 | 68 | private final Bounds origbnd = getBoundsEnv(); |
69 | 69 | private final PaperColorsMap origpc = getPaperColorMap(); |
70 | - | |
70 | + | |
71 | 71 | private final VWColorChooserDialog ccwin = getCCWin(); |
72 | - | |
72 | + | |
73 | 73 | private final Env tmpenv = new Env(); |
74 | 74 | private final Bounds tmpbnd = new Bounds(); |
75 | 75 | private final PaperColorsMap tmppc = new PaperColorsMap(); |
76 | - | |
77 | - | |
76 | + | |
77 | + | |
78 | 78 | /******************************************************************************* |
79 | 79 | * 定数 |
80 | 80 | ******************************************************************************/ |
81 | 81 | |
82 | 82 | private static final int STEPBY = 10; |
83 | - | |
83 | + | |
84 | 84 | private static final int SEP_WIDTH = 10; |
85 | 85 | private static final int SEP_WIDTH_NARROW = 2; |
86 | 86 | private static final int SEP_HEIGHT = 5; |
87 | 87 | private static final int SEP_HEIGHT_NARROW = 2; |
88 | - | |
88 | + | |
89 | 89 | //private static final int PARTS_WIDTH = 900; |
90 | 90 | private static final int PARTS_HEIGHT = 30; |
91 | - | |
91 | + | |
92 | 92 | private static final int LABEL_WIDTH = 125; |
93 | 93 | private static final int ITEM_WIDTH = 250; |
94 | 94 | private static final int TITLE_WIDTH = LABEL_WIDTH+ITEM_WIDTH; |
95 | - | |
95 | + | |
96 | 96 | private static final int BUTTON_WIDTH = 100; |
97 | - | |
97 | + | |
98 | 98 | private static final int PANEL_WIDTH = LABEL_WIDTH+ITEM_WIDTH+SEP_WIDTH*2; |
99 | 99 | private static int PANEL_HEIGHT = 0; |
100 | - | |
100 | + | |
101 | 101 | private static final int TABLE_WIDTH = PANEL_WIDTH-SEP_WIDTH*2; |
102 | 102 | private static final int TABLE_HEIGHT = 260; |
103 | - | |
103 | + | |
104 | 104 | private static final int STYLETABLE_HEIGHT = 80; |
105 | - | |
105 | + | |
106 | 106 | private static final int TIMEBAR_WIDTH = TABLE_WIDTH/4; |
107 | - | |
108 | - | |
107 | + | |
108 | + | |
109 | 109 | /******************************************************************************* |
110 | 110 | * 部品 |
111 | 111 | ******************************************************************************/ |
112 | - | |
112 | + | |
113 | 113 | private JPanel jPanel = null; |
114 | - | |
114 | + | |
115 | 115 | private JTabbedPane jTabbedPane = null; |
116 | - | |
116 | + | |
117 | 117 | private JPanel jPanel_buttons = null; |
118 | 118 | private JButton jButton_preview = null; |
119 | 119 | private JButton jButton_update = null; |
120 | 120 | private JButton jButton_cancel = null; |
121 | - | |
121 | + | |
122 | 122 | // ジャンル別背景色のタブ |
123 | 123 | private JPanel jPanel_pColors = null; |
124 | 124 | private JScrollPane jScrollPane_list = null; |
@@ -128,9 +128,13 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
128 | 128 | private JCCLabel jLabel_timebar2 = null; |
129 | 129 | private JCCLabel jLabel_timebar3 = null; |
130 | 130 | private JCCLabel jLabel_timebar4 = null; |
131 | + private JCCLabel jLabel_restimebar1 = null; | |
132 | + private JCCLabel jLabel_restimebar2 = null; | |
133 | + private JCCLabel jLabel_restimebar3 = null; | |
134 | + private JCCLabel jLabel_restimebar4 = null; | |
131 | 135 | private JCheckBoxPanel jCBP_highlight = null; |
132 | 136 | private JCCLabel jLabel_highlight = null; |
133 | - | |
137 | + | |
134 | 138 | // フォント設定のタブ |
135 | 139 | private JPanel jPanel_fonts = null; |
136 | 140 | private JCheckBoxPanel jCBP_showStart = null; |
@@ -145,12 +149,13 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
145 | 149 | private JScrollPane jScrollPane_detailFontStyle = null; |
146 | 150 | private JSliderPanel jSP_detailTab = null; |
147 | 151 | private JComboBoxPanel jCBX_aaMode = null; |
148 | - | |
152 | + | |
149 | 153 | // サイズのタブ |
150 | 154 | private JPanel jPanel_bounds = null; |
151 | 155 | private JSliderPanel jSP_width = null; |
152 | 156 | private JSliderPanel jSP_height = null; |
153 | 157 | private JSliderPanel jSP_timebarPosition = null; |
158 | + private JSliderPanel jSP_restimebar = null; | |
154 | 159 | private JCCLabel jLabel_execon = null; |
155 | 160 | private JCCLabel jLabel_execoff = null; |
156 | 161 | private JCCLabel jLabel_pickup = null; |
@@ -159,12 +164,12 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
159 | 164 | private JCCLabel jLabel_matchedKeywordBorderColor = null; |
160 | 165 | private JSliderPanel jSP_matchedBorderThickness = null; |
161 | 166 | //private JCheckBoxPanel jCBP_lightProgramView = null; |
162 | - | |
163 | - | |
167 | + | |
168 | + | |
164 | 169 | /******************************************************************************* |
165 | 170 | * コンストラクタ |
166 | 171 | ******************************************************************************/ |
167 | - | |
172 | + | |
168 | 173 | public AbsPaperColorsDialog() { |
169 | 174 | // |
170 | 175 | super(); |
@@ -180,56 +185,56 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
180 | 185 | |
181 | 186 | this.setContentPane(getJPanel()); |
182 | 187 | this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); // 閉じるときはキャンセルボタンを使ってクレ |
183 | - | |
188 | + | |
184 | 189 | this.pack(); |
185 | 190 | this.setResizable(false); |
186 | - | |
191 | + | |
187 | 192 | this.setTitle("新聞形式の表示設定"); |
188 | 193 | } |
189 | 194 | |
190 | - | |
195 | + | |
191 | 196 | /******************************************************************************* |
192 | 197 | * アクション |
193 | 198 | ******************************************************************************/ |
194 | - | |
199 | + | |
195 | 200 | private void doPreview() { |
196 | 201 | getColors(tmpenv,tmppc); |
197 | 202 | getFonts(tmpenv); |
198 | 203 | getBounds(tmpenv,tmpbnd); |
199 | - | |
204 | + | |
200 | 205 | updatePaperColors(tmpenv,tmppc); |
201 | 206 | updatePaperFonts(tmpenv); |
202 | 207 | updatePaperBounds(tmpenv,tmpbnd); |
203 | - | |
208 | + | |
204 | 209 | updatePaperRepaint(); |
205 | 210 | } |
206 | - | |
211 | + | |
207 | 212 | private void doUpdate() { |
208 | 213 | getColors(origenv,origpc); |
209 | 214 | getFonts(origenv); |
210 | 215 | getBounds(origenv,origbnd); |
211 | - | |
216 | + | |
212 | 217 | updatePaperFonts(origenv); |
213 | 218 | updatePaperColors(origenv,origpc); |
214 | 219 | updatePaperBounds(origenv,origbnd); |
215 | - | |
220 | + | |
216 | 221 | updatePaperRepaint(); |
217 | - | |
222 | + | |
218 | 223 | origpc.save(); |
219 | 224 | origenv.save(); |
220 | 225 | origbnd.save(); |
221 | 226 | |
222 | 227 | setVisible(false); |
223 | 228 | } |
224 | - | |
229 | + | |
225 | 230 | @Override |
226 | 231 | protected void doCancel() { |
227 | 232 | updatePaperColors(origenv,origpc); |
228 | 233 | updatePaperFonts(origenv); |
229 | 234 | updatePaperBounds(origenv,origbnd); |
230 | - | |
235 | + | |
231 | 236 | updatePaperRepaint(); |
232 | - | |
237 | + | |
233 | 238 | setVisible(false); |
234 | 239 | } |
235 | 240 |
@@ -262,7 +267,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
262 | 267 | } |
263 | 268 | super.setVisible(b); |
264 | 269 | } |
265 | - | |
270 | + | |
266 | 271 | // |
267 | 272 | private void getColors(Env toe, PaperColorsMap top) { |
268 | 273 | for ( int row=0; row<jTable_list.getRowCount(); row++ ) { |
@@ -274,10 +279,16 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
274 | 279 | toe.setTimebarColor2(jLabel_timebar2.getChoosed()); |
275 | 280 | toe.setTimebarColor3(jLabel_timebar3.getChoosed()); |
276 | 281 | toe.setTimebarColor4(jLabel_timebar4.getChoosed()); |
282 | + | |
283 | + toe.setResTimebarColor1(jLabel_restimebar1.getChoosed()); | |
284 | + toe.setResTimebarColor2(jLabel_restimebar2.getChoosed()); | |
285 | + toe.setResTimebarColor3(jLabel_restimebar3.getChoosed()); | |
286 | + toe.setResTimebarColor4(jLabel_restimebar4.getChoosed()); | |
287 | + | |
277 | 288 | toe.setEnableHighlight(jCBP_highlight.isSelected()); |
278 | 289 | toe.setHighlightColor(jLabel_highlight.getChoosed()); |
279 | 290 | } |
280 | - | |
291 | + | |
281 | 292 | // |
282 | 293 | private void getFonts(Env to) { |
283 | 294 | to.setShowStart(jCBP_showStart.isSelected()); |
@@ -302,12 +313,13 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
302 | 313 | } |
303 | 314 | return fsa; |
304 | 315 | } |
305 | - | |
316 | + | |
306 | 317 | // |
307 | 318 | private void getBounds(Env toe, Bounds tob) { |
308 | 319 | tob.setBangumiColumnWidth(jSP_width.getValue()); |
309 | 320 | tob.setPaperHeightMultiplier(jSP_height.getValue()*(float)STEPBY/(float)60); |
310 | 321 | tob.setTimelinePosition(jSP_timebarPosition.getValue()); |
322 | + toe.setResTimebarWidth(jSP_restimebar.getValue()); | |
311 | 323 | toe.setExecOnFontColor(jLabel_execon.getChoosed()); |
312 | 324 | toe.setExecOffFontColor(jLabel_execoff.getChoosed()); |
313 | 325 | toe.setPickedColor(jLabel_pickup.getChoosed()); |
@@ -318,9 +330,9 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
318 | 330 | // |
319 | 331 | tob.setShowMatchedBorder(origbnd.getShowMatchedBorder()); |
320 | 332 | } |
321 | - | |
322 | - | |
323 | - | |
333 | + | |
334 | + | |
335 | + | |
324 | 336 | /******************************************************************************* |
325 | 337 | * コンポーネント |
326 | 338 | ******************************************************************************/ |
@@ -334,7 +346,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
334 | 346 | } |
335 | 347 | return jPanel; |
336 | 348 | } |
337 | - | |
349 | + | |
338 | 350 | // |
339 | 351 | private JTabbedPane getJTabbedPane() { |
340 | 352 | if (jTabbedPane == null) { |
@@ -345,22 +357,22 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
345 | 357 | } |
346 | 358 | return jTabbedPane; |
347 | 359 | } |
348 | - | |
360 | + | |
349 | 361 | // |
350 | 362 | private JPanel getJPanel_buttons() { |
351 | 363 | if (jPanel_buttons == null) { |
352 | 364 | jPanel_buttons = new JPanel(); |
353 | 365 | |
354 | 366 | jPanel_buttons.setLayout(new SpringLayout()); |
355 | - | |
367 | + | |
356 | 368 | int y = SEP_HEIGHT; |
357 | 369 | int x = (PANEL_WIDTH - (BUTTON_WIDTH*3+SEP_WIDTH*2))/2; |
358 | 370 | CommonSwingUtils.putComponentOn(jPanel_buttons, getJButton_preview("プレビュー"), BUTTON_WIDTH, PARTS_HEIGHT, x, y); |
359 | 371 | CommonSwingUtils.putComponentOn(jPanel_buttons, getJButton_update("登録"), BUTTON_WIDTH, PARTS_HEIGHT, x+=BUTTON_WIDTH+SEP_WIDTH, y); |
360 | 372 | CommonSwingUtils.putComponentOn(jPanel_buttons, getJButton_cancel("キャンセル"), BUTTON_WIDTH, PARTS_HEIGHT, x+=BUTTON_WIDTH+SEP_WIDTH, y); |
361 | - | |
373 | + | |
362 | 374 | y += PARTS_HEIGHT+SEP_HEIGHT; |
363 | - | |
375 | + | |
364 | 376 | jPanel_buttons.setPreferredSize(new Dimension(PANEL_WIDTH, y)); |
365 | 377 | } |
366 | 378 | return jPanel_buttons; |
@@ -369,7 +381,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
369 | 381 | if (jButton_preview == null) { |
370 | 382 | jButton_preview = new JButton(); |
371 | 383 | jButton_preview.setText(s); |
372 | - | |
384 | + | |
373 | 385 | jButton_preview.addActionListener(new ActionListener() { |
374 | 386 | @Override |
375 | 387 | public void actionPerformed(ActionEvent e) { |
@@ -383,7 +395,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
383 | 395 | if (jButton_update == null) { |
384 | 396 | jButton_update = new JButton(); |
385 | 397 | jButton_update.setText(s); |
386 | - | |
398 | + | |
387 | 399 | jButton_update.addActionListener(new ActionListener() { |
388 | 400 | @Override |
389 | 401 | public void actionPerformed(ActionEvent e) { |
@@ -397,7 +409,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
397 | 409 | if (jButton_cancel == null) { |
398 | 410 | jButton_cancel = new JButton(); |
399 | 411 | jButton_cancel.setText(s); |
400 | - | |
412 | + | |
401 | 413 | jButton_cancel.addActionListener(new ActionListener() { |
402 | 414 | @Override |
403 | 415 | public void actionPerformed(ActionEvent e) { |
@@ -407,25 +419,25 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
407 | 419 | } |
408 | 420 | return jButton_cancel; |
409 | 421 | } |
410 | - | |
411 | - | |
422 | + | |
423 | + | |
412 | 424 | /* |
413 | - * ジャンル別背景色のタブ | |
425 | + * ジャンル別背景色のタブ | |
414 | 426 | */ |
415 | - | |
427 | + | |
416 | 428 | private JPanel getJPanel_pColors() { |
417 | 429 | if (jPanel_pColors == null) { |
418 | 430 | jPanel_pColors = new JPanel(); |
419 | 431 | |
420 | 432 | jPanel_pColors.setLayout(new SpringLayout()); |
421 | - | |
433 | + | |
422 | 434 | int y = SEP_HEIGHT_NARROW; |
423 | 435 | int x = SEP_WIDTH; |
424 | - | |
436 | + | |
425 | 437 | CommonSwingUtils.putComponentOn(jPanel_pColors, new JTitleLabel("ジャンル別背景色"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
426 | 438 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
427 | 439 | CommonSwingUtils.putComponentOn(jPanel_pColors, getJScrollPane_list(), TABLE_WIDTH, TABLE_HEIGHT, SEP_WIDTH, y); |
428 | - | |
440 | + | |
429 | 441 | y += (TABLE_HEIGHT+SEP_HEIGHT); |
430 | 442 | CommonSwingUtils.putComponentOn(jPanel_pColors, new JTitleLabel("タイムバーの色"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
431 | 443 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
@@ -433,17 +445,26 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
433 | 445 | CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_timebar2 = new JCCLabel("12~17", origenv.getTimebarColor2(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); |
434 | 446 | CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_timebar3 = new JCCLabel("18~23", origenv.getTimebarColor3(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); |
435 | 447 | CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_timebar4 = new JCCLabel("24~5", origenv.getTimebarColor4(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); |
436 | - | |
448 | + | |
449 | + y += (PARTS_HEIGHT+SEP_HEIGHT); | |
450 | + CommonSwingUtils.putComponentOn(jPanel_pColors, new JTitleLabel("予約バーの色"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); | |
451 | + y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); | |
452 | + x = SEP_WIDTH; | |
453 | + CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_restimebar1 = new JCCLabel("1", origenv.getResTimebarColor1(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x, y); | |
454 | + CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_restimebar2 = new JCCLabel("2", origenv.getResTimebarColor2(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); | |
455 | + CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_restimebar3 = new JCCLabel("最大", origenv.getResTimebarColor3(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); | |
456 | + CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_restimebar4 = new JCCLabel(">最大", origenv.getResTimebarColor4(),true,this,ccwin), TIMEBAR_WIDTH, PARTS_HEIGHT, x+=TIMEBAR_WIDTH, y); | |
457 | + | |
437 | 458 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
438 | 459 | CommonSwingUtils.putComponentOn(jPanel_pColors, new JTitleLabel("マウスオーバー時のハイライト色"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
439 | 460 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
440 | 461 | CommonSwingUtils.putComponentOn(jPanel_pColors, jCBP_highlight = new JCheckBoxPanel("有効",LABEL_WIDTH/2), LABEL_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
441 | 462 | CommonSwingUtils.putComponentOn(jPanel_pColors, jLabel_highlight = new JCCLabel("ハイライト",origenv.getHighlightColor(),true,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, LABEL_WIDTH+SEP_WIDTH, y); |
442 | - | |
463 | + | |
443 | 464 | y += (PARTS_HEIGHT+SEP_HEIGHT*2); |
444 | - | |
465 | + | |
445 | 466 | if (PANEL_HEIGHT < y) PANEL_HEIGHT = y; |
446 | - | |
467 | + | |
447 | 468 | jPanel_pColors.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT)); |
448 | 469 | } |
449 | 470 | return jPanel_pColors; |
@@ -466,10 +487,16 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
466 | 487 | jLabel_timebar2.setChoosed(origenv.getTimebarColor2()); |
467 | 488 | jLabel_timebar3.setChoosed(origenv.getTimebarColor3()); |
468 | 489 | jLabel_timebar4.setChoosed(origenv.getTimebarColor4()); |
490 | + | |
491 | + jLabel_restimebar1.setChoosed(origenv.getResTimebarColor1()); | |
492 | + jLabel_restimebar2.setChoosed(origenv.getResTimebarColor2()); | |
493 | + jLabel_restimebar3.setChoosed(origenv.getResTimebarColor3()); | |
494 | + jLabel_restimebar4.setChoosed(origenv.getResTimebarColor4()); | |
495 | + | |
469 | 496 | jCBP_highlight.setSelected(origenv.getEnableHighlight()); |
470 | 497 | jLabel_highlight.setChoosed(origenv.getHighlightColor()); |
471 | 498 | } |
472 | - | |
499 | + | |
473 | 500 | private JScrollPane getJScrollPane_list() { |
474 | 501 | if (jScrollPane_list == null) { |
475 | 502 | jScrollPane_list = new JScrollPane(); |
@@ -506,15 +533,15 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
506 | 533 | // |
507 | 534 | JTable t = (JTable) e.getSource(); |
508 | 535 | Point p = e.getPoint(); |
509 | - | |
536 | + | |
510 | 537 | int col = t.convertColumnIndexToModel(t.columnAtPoint(p)); |
511 | 538 | if (col == 1) { |
512 | 539 | int row = t.convertRowIndexToModel(t.rowAtPoint(p)); |
513 | - | |
540 | + | |
514 | 541 | ccwin.setColor(CommonUtils.str2color((String) t.getValueAt(row,1))); |
515 | 542 | CommonSwingUtils.setLocationCenter(jd,ccwin); |
516 | 543 | ccwin.setVisible(true); |
517 | - | |
544 | + | |
518 | 545 | if (ccwin.getSelectedColor() != null ) { |
519 | 546 | // |
520 | 547 | tmppc.put((TVProgram.ProgGenre) t.getValueAt(row,0), ccwin.getSelectedColor()); |
@@ -528,13 +555,13 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
528 | 555 | } |
529 | 556 | return(jTable_list); |
530 | 557 | } |
531 | - | |
532 | - | |
533 | - | |
558 | + | |
559 | + | |
560 | + | |
534 | 561 | /* |
535 | - * フォントのタブ | |
562 | + * フォントのタブ | |
536 | 563 | */ |
537 | - | |
564 | + | |
538 | 565 | /** |
539 | 566 | * フォントの選択肢を設定 |
540 | 567 | */ |
@@ -544,7 +571,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
544 | 571 | for ( String fn : vwfont.getNames() ) { |
545 | 572 | jCBX_titleFont.addItem(fn); |
546 | 573 | jCBX_detailFont.addItem(fn); |
547 | - | |
574 | + | |
548 | 575 | //if (debug) System.err.println("[DEBUG] font name="+fn); |
549 | 576 | } |
550 | 577 | } |
@@ -553,59 +580,59 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
553 | 580 | jPanel_fonts = new JPanel(); |
554 | 581 | |
555 | 582 | jPanel_fonts.setLayout(new SpringLayout()); |
556 | - | |
583 | + | |
557 | 584 | int y = SEP_HEIGHT_NARROW; |
558 | - | |
585 | + | |
559 | 586 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JTitleLabel("開始時刻欄の設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_HEIGHT_NARROW, y); |
560 | - | |
587 | + | |
561 | 588 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
562 | 589 | CommonSwingUtils.putComponentOn(jPanel_fonts, jCBP_showStart = new JCheckBoxPanel("表示する",LABEL_WIDTH), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
563 | 590 | //jCBP_showStart.addActionListener(fal); |
564 | - | |
591 | + | |
565 | 592 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
566 | 593 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JTitleLabel("番組名のフォント設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
567 | - | |
594 | + | |
568 | 595 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
569 | 596 | CommonSwingUtils.putComponentOn(jPanel_fonts, jCBX_titleFont = new JComboBoxPanel("フォント",LABEL_WIDTH,ITEM_WIDTH,true), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
570 | - | |
597 | + | |
571 | 598 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
572 | 599 | CommonSwingUtils.putComponentOn(jPanel_fonts, jSP_titleFontSize = new JSliderPanel("サイズ",LABEL_WIDTH,6,24,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
573 | - | |
600 | + | |
574 | 601 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
575 | 602 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JLabel("文字色"), LABEL_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
576 | 603 | CommonSwingUtils.putComponentOn(jPanel_fonts, jLabel_titleFontColor = new JCCLabel("番組名", origenv.getTitleFontColor(),false,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
577 | - | |
604 | + | |
578 | 605 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
579 | 606 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JLabel("スタイル"), LABEL_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
580 | 607 | CommonSwingUtils.putComponentOn(jPanel_fonts, jScrollPane_titleFontStyle = getJScrollPane_fontstyle(), ITEM_WIDTH, STYLETABLE_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
581 | - | |
608 | + | |
582 | 609 | y += (STYLETABLE_HEIGHT+10); |
583 | 610 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JTitleLabel("番組詳細のフォント設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
584 | - | |
611 | + | |
585 | 612 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
586 | 613 | CommonSwingUtils.putComponentOn(jPanel_fonts, jCBP_showDetail = new JCheckBoxPanel("表示する",LABEL_WIDTH), TITLE_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
587 | - | |
614 | + | |
588 | 615 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
589 | 616 | CommonSwingUtils.putComponentOn(jPanel_fonts, jCBX_detailFont = new JComboBoxPanel("フォント",LABEL_WIDTH,ITEM_WIDTH,true), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
590 | - | |
617 | + | |
591 | 618 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
592 | 619 | CommonSwingUtils.putComponentOn(jPanel_fonts, jSP_detailFontSize = new JSliderPanel("サイズ",LABEL_WIDTH,6,24,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
593 | - | |
620 | + | |
594 | 621 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
595 | 622 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JLabel("文字色"), LABEL_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
596 | 623 | CommonSwingUtils.putComponentOn(jPanel_fonts, jLabel_detailFontColor = new JCCLabel("番組詳細", origenv.getDetailFontColor(),false,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
597 | - | |
624 | + | |
598 | 625 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
599 | 626 | CommonSwingUtils.putComponentOn(jPanel_fonts, new JLabel("スタイル"), LABEL_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
600 | 627 | CommonSwingUtils.putComponentOn(jPanel_fonts, jScrollPane_detailFontStyle = getJScrollPane_fontstyle(), ITEM_WIDTH, STYLETABLE_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
601 | - | |
628 | + | |
602 | 629 | y += (STYLETABLE_HEIGHT+SEP_HEIGHT_NARROW); |
603 | 630 | CommonSwingUtils.putComponentOn(jPanel_fonts, jSP_detailTab = new JSliderPanel("左余白",LABEL_WIDTH,0,24,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
604 | - | |
631 | + | |
605 | 632 | y += (PARTS_HEIGHT+SEP_HEIGHT*3); |
606 | - | |
633 | + | |
607 | 634 | if (PANEL_HEIGHT < y) PANEL_HEIGHT = y; |
608 | - | |
635 | + | |
609 | 636 | jPanel_fonts.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT)); |
610 | 637 | } |
611 | 638 | return jPanel_fonts; |
@@ -648,7 +675,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
648 | 675 | } |
649 | 676 | } |
650 | 677 | } |
651 | - | |
678 | + | |
652 | 679 | private JScrollPane getJScrollPane_fontstyle() { |
653 | 680 | JScrollPane jScrollPane = new JScrollPane(); |
654 | 681 | jScrollPane.setViewportView(getJTable_fontstyle()); |
@@ -657,11 +684,11 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
657 | 684 | return jScrollPane; |
658 | 685 | } |
659 | 686 | private JNETable getJTable_fontstyle() { |
660 | - | |
687 | + | |
661 | 688 | // ヘッダの設定 |
662 | 689 | String[] colname = {"チェック", "スタイル"}; |
663 | 690 | int[] colwidth = {50,ITEM_WIDTH-50}; |
664 | - | |
691 | + | |
665 | 692 | // |
666 | 693 | DefaultTableModel model = new DefaultTableModel(colname, 0); |
667 | 694 | JNETable jTable = new JNETable(model, false) { |
@@ -680,10 +707,10 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
680 | 707 | column = columnModel.getColumn(i); |
681 | 708 | column.setPreferredWidth(colwidth[i]); |
682 | 709 | } |
683 | - | |
710 | + | |
684 | 711 | // にゃーん |
685 | 712 | jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
686 | - | |
713 | + | |
687 | 714 | // エディタに手を入れる |
688 | 715 | DefaultCellEditor editor = new DefaultCellEditor(new JCheckBox() { |
689 | 716 |
@@ -720,7 +747,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
720 | 747 | } |
721 | 748 | }; |
722 | 749 | jTable.getColumn("チェック").setCellRenderer(renderer); |
723 | - | |
750 | + | |
724 | 751 | // |
725 | 752 | for ( JTXTButton.FontStyle fs : JTXTButton.FontStyle.values() ) { |
726 | 753 | Object[] data = { false,fs }; |
@@ -728,54 +755,57 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
728 | 755 | } |
729 | 756 | return jTable; |
730 | 757 | } |
731 | - | |
758 | + | |
732 | 759 | /* |
733 | - * サイズのタブ | |
760 | + * サイズのタブ | |
734 | 761 | */ |
735 | - | |
762 | + | |
736 | 763 | private JPanel getJPanel_bounds() { |
737 | 764 | if (jPanel_bounds == null) { |
738 | 765 | jPanel_bounds = new JPanel(); |
739 | 766 | |
740 | 767 | jPanel_bounds.setLayout(new SpringLayout()); |
741 | - | |
768 | + | |
742 | 769 | int y = SEP_HEIGHT_NARROW; |
743 | - | |
770 | + | |
744 | 771 | CommonSwingUtils.putComponentOn(jPanel_bounds, new JTitleLabel("サイズの設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
745 | - | |
772 | + | |
746 | 773 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
747 | 774 | CommonSwingUtils.putComponentOn(jPanel_bounds, jSP_width = new JSliderPanel("幅",LABEL_WIDTH,50,300,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
748 | - | |
775 | + | |
749 | 776 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
750 | 777 | CommonSwingUtils.putComponentOn(jPanel_bounds, jSP_height = new JSliderPanel("高さ(pt/H)",LABEL_WIDTH,30,600,STEPBY,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
751 | - | |
778 | + | |
752 | 779 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
753 | 780 | CommonSwingUtils.putComponentOn(jPanel_bounds, jSP_timebarPosition = new JSliderPanel("現在時刻線(分)",LABEL_WIDTH,1,180,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
754 | 781 | |
782 | + y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); | |
783 | + CommonSwingUtils.putComponentOn(jPanel_bounds, jSP_restimebar= new JSliderPanel("予約バー幅",LABEL_WIDTH,0,12,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); | |
784 | + | |
755 | 785 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
756 | 786 | CommonSwingUtils.putComponentOn(jPanel_bounds, new JTitleLabel("予約枠の設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
757 | - | |
787 | + | |
758 | 788 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
759 | 789 | CommonSwingUtils.putComponentOn(jPanel_bounds, jLabel_execon = new JCCLabel("実行ONの文字色",origenv.getExecOnFontColor(),false,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
760 | - | |
790 | + | |
761 | 791 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
762 | 792 | CommonSwingUtils.putComponentOn(jPanel_bounds, jLabel_execoff = new JCCLabel("実行OFFの文字色",origenv.getExecOffFontColor(),false,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
763 | 793 | |
764 | 794 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
765 | 795 | CommonSwingUtils.putComponentOn(jPanel_bounds, new JTitleLabel("ピックアップ枠の設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
766 | - | |
796 | + | |
767 | 797 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
768 | 798 | CommonSwingUtils.putComponentOn(jPanel_bounds, jLabel_pickup = new JCCLabel("ピックアップの枠色",origenv.getPickedColor(),true,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
769 | - | |
799 | + | |
770 | 800 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
771 | 801 | CommonSwingUtils.putComponentOn(jPanel_bounds, jLabel_pickupFont = new JCCLabel("ピックアップの文字色",origenv.getPickedFontColor(),false,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
772 | - | |
802 | + | |
773 | 803 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
774 | 804 | CommonSwingUtils.putComponentOn(jPanel_bounds, new JTitleLabel("予約待機枠の設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
775 | - | |
805 | + | |
776 | 806 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
777 | 807 | CommonSwingUtils.putComponentOn(jPanel_bounds, jSP_matchedBorderThickness = new JSliderPanel("太さ",LABEL_WIDTH,1,16,ITEM_WIDTH), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
778 | - | |
808 | + | |
779 | 809 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
780 | 810 | CommonSwingUtils.putComponentOn(jPanel_bounds, jLabel_matchedBorderColor = new JCCLabel("予約待機枠(番組追跡)",origenv.getMatchedBorderColor(),true,this,ccwin), ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH+LABEL_WIDTH, y); |
781 | 811 |
@@ -784,17 +814,17 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
784 | 814 | |
785 | 815 | y += (PARTS_HEIGHT+SEP_HEIGHT); |
786 | 816 | CommonSwingUtils.putComponentOn(jPanel_bounds, new JTitleLabel("フォントのアンチエイリアス設定"), TITLE_WIDTH, PARTS_HEIGHT, SEP_WIDTH_NARROW, y); |
787 | - | |
817 | + | |
788 | 818 | y += (PARTS_HEIGHT+SEP_HEIGHT_NARROW); |
789 | 819 | CommonSwingUtils.putComponentOn(jPanel_bounds, jCBX_aaMode = new JComboBoxPanel("アンチエイリアス",LABEL_WIDTH,ITEM_WIDTH,true), LABEL_WIDTH+ITEM_WIDTH, PARTS_HEIGHT, SEP_WIDTH, y); |
790 | 820 | for ( AAMode aam : AAMode.values() ) { |
791 | 821 | jCBX_aaMode.addItem(aam); |
792 | 822 | } |
793 | - | |
823 | + | |
794 | 824 | y += (PARTS_HEIGHT+SEP_HEIGHT*2); |
795 | - | |
825 | + | |
796 | 826 | if (PANEL_HEIGHT < y) PANEL_HEIGHT = y; |
797 | - | |
827 | + | |
798 | 828 | jPanel_bounds.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT)); |
799 | 829 | } |
800 | 830 | return jPanel_bounds; |
@@ -804,6 +834,7 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
804 | 834 | jSP_width.setValue(origbnd.getBangumiColumnWidth()); |
805 | 835 | jSP_height.setValue(Math.round(origbnd.getPaperHeightMultiplier()*(float)60/(float)STEPBY)); |
806 | 836 | jSP_timebarPosition.setValue(origbnd.getTimelinePosition()); |
837 | + jSP_restimebar.setValue(origenv.getResTimebarWidth()); | |
807 | 838 | jLabel_execon.setChoosed(origenv.getExecOnFontColor()); |
808 | 839 | jLabel_execon.setBackground(Color.RED); |
809 | 840 | jLabel_execoff.setChoosed(origenv.getExecOffFontColor()); |
@@ -823,13 +854,13 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
823 | 854 | } |
824 | 855 | */ |
825 | 856 | } |
826 | - | |
857 | + | |
827 | 858 | /******************************************************************************* |
828 | 859 | * 独自部品 |
829 | 860 | ******************************************************************************/ |
830 | - | |
861 | + | |
831 | 862 | private class JTitleLabel extends JLabel { |
832 | - | |
863 | + | |
833 | 864 | private static final long serialVersionUID = 1L; |
834 | 865 | |
835 | 866 | public JTitleLabel(String s) { |
@@ -838,5 +869,5 @@ abstract class AbsPaperColorsDialog extends JEscCancelDialog { | ||
838 | 869 | //this.setFont(this.getFont().deriveFont(this.getFont().getStyle()|Font.BOLD)); |
839 | 870 | } |
840 | 871 | } |
841 | - | |
872 | + | |
842 | 873 | } |
@@ -190,7 +190,6 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
190 | 190 | |
191 | 191 | // |
192 | 192 | private static final String TUNERLABEL_PICKUP = "PICKUP"; |
193 | - private static final int RESTIME_WIDTH = 4; // 予約枠バーの幅 | |
194 | 193 | |
195 | 194 | // 定数ではないが |
196 | 195 |
@@ -378,7 +377,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
378 | 377 | Rectangle r = this.getBounds(); |
379 | 378 | r.x = 0; |
380 | 379 | r.y = timeline+3-height; |
381 | - r.width = bounds.getTimebarColumnWidth()+RESTIME_WIDTH; | |
380 | + r.width = bounds.getTimebarColumnWidth()+env.getResTimebarWidth(); | |
382 | 381 | r.height = height; |
383 | 382 | this.setBounds(r); |
384 | 383 |
@@ -1290,7 +1289,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
1290 | 1289 | } |
1291 | 1290 | |
1292 | 1291 | Dimension d = jLayeredPane_space_side_view2.getMaximumSize(); |
1293 | - d.width = bounds.getTimebarColumnWidth()+RESTIME_WIDTH; | |
1292 | + d.width = bounds.getTimebarColumnWidth()+env.getResTimebarWidth(); | |
1294 | 1293 | d.height = (int) Math.ceil(24*phm60); |
1295 | 1294 | jLayeredPane_space_side_view2.setPreferredSize(d); |
1296 | 1295 | jLayeredPane_space_side_view2.updateUI(); |
@@ -2089,6 +2088,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
2089 | 2088 | } |
2090 | 2089 | |
2091 | 2090 | // 座標系 |
2091 | + JRTLabel.setColumnWidth(env.getResTimebarWidth()); | |
2092 | 2092 | JRTLabel.setHeightMultiplier(bounds.getPaperHeightMultiplier() * paperHeightZoom); |
2093 | 2093 | |
2094 | 2094 | // 表示範囲 |
@@ -2153,8 +2153,14 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
2153 | 2153 | String start = item.getStart(); |
2154 | 2154 | String end = item.getEnd(); |
2155 | 2155 | int count = item.getCount(); |
2156 | - rb.setBorder(new LineBorder( count > tnum ? Color.MAGENTA : count == tnum ? Color.RED : | |
2157 | - count > 1 ? Color.GREEN : Color.BLUE, RESTIME_WIDTH/2)); | |
2156 | + int cno = count > tnum ? 4 : count == tnum ? 3 : count > 1 ? 2 : 1; | |
2157 | + rb.setColorNo(cno); | |
2158 | + Color c = | |
2159 | + cno == 4 ? env.getResTimebarColor4() : | |
2160 | + cno == 3 ? env.getResTimebarColor3() : | |
2161 | + cno == 2 ? env.getResTimebarColor2() : env.getResTimebarColor1(); | |
2162 | + rb.setBackground(c); | |
2163 | + rb.setBorder(new LineBorder(c, env.getResTimebarWidth()/2+1)); | |
2158 | 2164 | |
2159 | 2165 | int row = 0; |
2160 | 2166 | int length = 0; |
@@ -2182,7 +2188,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
2182 | 2188 | continue; |
2183 | 2189 | } |
2184 | 2190 | |
2185 | - rb.setVBounds(bounds.getTimebarColumnWidth(), row, RESTIME_WIDTH, length); | |
2191 | + rb.setVBounds(bounds.getTimebarColumnWidth(), row, length); | |
2186 | 2192 | rb.setVisible(true); |
2187 | 2193 | |
2188 | 2194 | jLayeredPane_space_side_view.add(rb); |
@@ -3047,6 +3053,17 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
3047 | 3053 | } |
3048 | 3054 | } |
3049 | 3055 | } |
3056 | + | |
3057 | + // 予約タイムバーの色 | |
3058 | + for ( JRTLabel lb : resTimeBorders ) { | |
3059 | + int cno = lb.getColorNo(); | |
3060 | + Color c = | |
3061 | + cno == 4 ? ec.getResTimebarColor4() : | |
3062 | + cno == 3 ? ec.getResTimebarColor3() : | |
3063 | + cno == 2 ? ec.getResTimebarColor2() : ec.getResTimebarColor1(); | |
3064 | + lb.setBackground(c); | |
3065 | + lb.setBorder(new LineBorder(c, ec.getResTimebarWidth()/2+1)); | |
3066 | + } | |
3050 | 3067 | } |
3051 | 3068 | |
3052 | 3069 | // サイズの変更 |
@@ -3076,6 +3093,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
3076 | 3093 | } |
3077 | 3094 | |
3078 | 3095 | Dimension d = jLayeredPane_space_side_view.getPreferredSize(); |
3096 | + d.width = bc.getTimebarColumnWidth() + ec.getResTimebarWidth(); | |
3079 | 3097 | d.height = viewh; |
3080 | 3098 | jLayeredPane_space_side_view.setPreferredSize(d); |
3081 | 3099 | } |
@@ -3146,6 +3164,7 @@ public abstract class AbsPaperView extends JPanel implements TickTimerListener,H | ||
3146 | 3164 | |
3147 | 3165 | // 予約時間枠の位置変更 |
3148 | 3166 | { |
3167 | + JRTLabel.setColumnWidth(ec.getResTimebarWidth()); | |
3149 | 3168 | JRTLabel.setHeightMultiplier(phm); |
3150 | 3169 | |
3151 | 3170 | for (JRTLabel tb : resTimeBorders){ |
@@ -18,27 +18,27 @@ public class Env { | ||
18 | 18 | /******************************************************************************* |
19 | 19 | * 定数とか |
20 | 20 | ******************************************************************************/ |
21 | - | |
21 | + | |
22 | 22 | // 変更できないフォルダ |
23 | 23 | public static final String binDir = "bin"; |
24 | 24 | private static final String metainfDir = binDir+File.separator+"META-INF"; |
25 | 25 | private static final String services = metainfDir+File.separator+"services"; |
26 | - | |
26 | + | |
27 | 27 | public static final String envDir = "env"; |
28 | 28 | private static final String envFile = envDir+File.separator+"envs.xml"; |
29 | 29 | private static final String envText = envDir+File.separator+"envs.txt"; |
30 | 30 | private static final String lafFile = envDir+File.separator+"laf.txt"; |
31 | 31 | private static final String GTKRC = envDir+File.separator+"_gtkrc-2.0"; |
32 | - | |
32 | + | |
33 | 33 | public static final String skinDir = "skin"; |
34 | - | |
34 | + | |
35 | 35 | private static final int PAGER_DEFAULT = 7; |
36 | - | |
36 | + | |
37 | 37 | private static final Color RSVDLINE_COLOR = new Color(204,153,255); |
38 | 38 | private static final Color PICKEDLINE_COLOR = new Color(51,255,0); |
39 | 39 | private static final Color CURRENTLINE_COLOR = new Color(240,120,120); |
40 | 40 | private static final Color MATCHEDKEYWORD_COLOR = new Color(51,102,255); |
41 | - | |
41 | + | |
42 | 42 | private static final Color TIMEBAR_COLOR_06_12 = new Color(180,180,180); |
43 | 43 | private static final Color TIMEBAR_COLOR_12_18 = new Color(160,160,160); |
44 | 44 | private static final Color TIMEBAR_COLOR_18_24 = new Color(140,140,140); |
@@ -52,45 +52,51 @@ public class Env { | ||
52 | 52 | private static final Color DETAIL_COLOR = Color.DARK_GRAY; |
53 | 53 | private static final Color MATCHBORDER_COLOR = Color.RED; |
54 | 54 | private static final Color ITERATIONITEM_COLOR = Color.GRAY; |
55 | - | |
55 | + | |
56 | 56 | private static final Color TUNERSHORT_COLOR = new Color(255,255,0); |
57 | 57 | private static final Color RECORDED_COLOR = new Color(204,153,255); |
58 | - | |
58 | + | |
59 | 59 | private static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"; |
60 | - | |
60 | + | |
61 | + private static final Color RESTIMEBAR_COLOR_1 = new Color(0,0,255); // BLUE | |
62 | + private static final Color RESTIMEBAR_COLOR_2 = new Color(0,255,0); // GREEN; | |
63 | + private static final Color RESTIMEBAR_COLOR_3 = new Color(255,0,0); // RED; | |
64 | + private static final Color RESTIMEBAR_COLOR_4 = new Color(255,0,255); // MAGENTA; | |
65 | + private static final int RESTIMEBAR_WIDTH = 4; | |
66 | + | |
61 | 67 | // この記述は…どうなの? |
62 | 68 | private static final String TV_SITE = "Dimora"; |
63 | 69 | private static final String CS_SITE = "スカパー!"; |
64 | 70 | private static final String CS2_SITE = "webザテレビジョン(CSデジ)"; |
65 | 71 | private static final String RADIO_SITE = ""; |
66 | - | |
72 | + | |
67 | 73 | private static final String MSGID = "[環境] "; |
68 | 74 | private static final String ERRID = "[ERROR]"+MSGID; |
69 | - | |
75 | + | |
70 | 76 | public static String[] SHUTDOWN_COMMANDS = { "shutdown /s /t 0", "sudo shutdown -h now" }; |
71 | - | |
77 | + | |
72 | 78 | // ダブルクリック時の動作 |
73 | 79 | public static enum DblClkCmd { |
74 | - | |
80 | + | |
75 | 81 | SHOWRSVDIALOG ("予約ダイアログを開く"), |
76 | 82 | JUMPTOPAPER ("番組欄へジャンプする"), |
77 | 83 | JUMPTOWEB ("ブラウザで番組詳細のページを開く"); |
78 | - | |
84 | + | |
79 | 85 | private String name; |
80 | - | |
86 | + | |
81 | 87 | private DblClkCmd(String name) { |
82 | 88 | this.name = name; |
83 | 89 | } |
84 | - | |
90 | + | |
85 | 91 | @Override |
86 | 92 | public String toString() { |
87 | 93 | return(name); |
88 | 94 | } |
89 | - | |
95 | + | |
90 | 96 | public String getId() { |
91 | 97 | return(super.toString()); |
92 | 98 | } |
93 | - | |
99 | + | |
94 | 100 | public static DblClkCmd get(String id) { |
95 | 101 | for ( DblClkCmd dcc : DblClkCmd.values() ) { |
96 | 102 | if ( dcc.getId().equals(id) ) { |
@@ -106,15 +112,15 @@ public class Env { | ||
106 | 112 | JPG ("JPEG","jpg"), |
107 | 113 | PNG ("PNG","png"), |
108 | 114 | BMP ("BMP","bmp"); |
109 | - | |
115 | + | |
110 | 116 | private String name; |
111 | 117 | private String ext; |
112 | - | |
118 | + | |
113 | 119 | private SnapshotFmt(String name, String ext) { |
114 | 120 | this.name = name; |
115 | 121 | this.ext = ext; |
116 | 122 | } |
117 | - | |
123 | + | |
118 | 124 | @Override |
119 | 125 | public String toString() { |
120 | 126 | return(name); |
@@ -123,8 +129,8 @@ public class Env { | ||
123 | 129 | public String getExtension() { |
124 | 130 | return(ext); |
125 | 131 | } |
126 | - | |
127 | - | |
132 | + | |
133 | + | |
128 | 134 | public String getId() { |
129 | 135 | return(super.toString()); |
130 | 136 | } |
@@ -138,7 +144,7 @@ public class Env { | ||
138 | 144 | return null; |
139 | 145 | } |
140 | 146 | } |
141 | - | |
147 | + | |
142 | 148 | public static enum AAMode { |
143 | 149 | OFF ("無効","off",RenderingHints.VALUE_TEXT_ANTIALIAS_OFF), |
144 | 150 | ON ("有効","on",RenderingHints.VALUE_TEXT_ANTIALIAS_ON), |
@@ -148,26 +154,26 @@ public class Env { | ||
148 | 154 | HBGR ("サブピク横方向BGR", "lcd_hbgr",RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR), |
149 | 155 | VRGB ("サブピク縦方向RGB", "lcd_vrgb",RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB), |
150 | 156 | VBGR ("サブピク縦方向BGR", "lcd_vbgr",RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR); |
151 | - | |
157 | + | |
152 | 158 | private String name; |
153 | 159 | private String mode; |
154 | 160 | private Object hint; |
155 | - | |
161 | + | |
156 | 162 | private AAMode(String name, String mode, Object hint) { |
157 | 163 | this.name = name; |
158 | 164 | this.mode = mode; |
159 | 165 | this.hint = hint; |
160 | 166 | } |
161 | - | |
167 | + | |
162 | 168 | @Override |
163 | 169 | public String toString() { |
164 | 170 | return name; |
165 | 171 | } |
166 | - | |
172 | + | |
167 | 173 | public String getId() { |
168 | 174 | return(super.toString()); |
169 | 175 | } |
170 | - | |
176 | + | |
171 | 177 | public String getMode() { |
172 | 178 | return mode; |
173 | 179 | } |
@@ -175,7 +181,7 @@ public class Env { | ||
175 | 181 | public Object getHint() { |
176 | 182 | return hint; |
177 | 183 | } |
178 | - | |
184 | + | |
179 | 185 | public static AAMode get(String id) { |
180 | 186 | for ( AAMode aam : AAMode.values() ) { |
181 | 187 | if ( aam.getId().equals(id) ) { |
@@ -185,7 +191,7 @@ public class Env { | ||
185 | 191 | return null; |
186 | 192 | } |
187 | 193 | } |
188 | - | |
194 | + | |
189 | 195 | // 自動アップデートの間隔 |
190 | 196 | public static enum UpdateOn { |
191 | 197 | DISABLE ("無効にする", -1), |
@@ -196,15 +202,15 @@ public class Env { | ||
196 | 202 | EVERY4DAY ("4日おきに実行する", 4), |
197 | 203 | EVERY5DAY ("5日おきに実行する", 5), |
198 | 204 | EVERY6DAY ("6日おきに実行する", 6); |
199 | - | |
205 | + | |
200 | 206 | private String name; |
201 | 207 | private int interval; |
202 | - | |
208 | + | |
203 | 209 | private UpdateOn(String name, int interval) { |
204 | 210 | this.name = name; |
205 | 211 | this.interval = interval; |
206 | 212 | } |
207 | - | |
213 | + | |
208 | 214 | @Override |
209 | 215 | public String toString() { |
210 | 216 | return this.name; |
@@ -217,7 +223,7 @@ public class Env { | ||
217 | 223 | public int getInterval() { |
218 | 224 | return this.interval; |
219 | 225 | } |
220 | - | |
226 | + | |
221 | 227 | public static UpdateOn get(String id) { |
222 | 228 | for ( UpdateOn uo : UpdateOn.values() ) { |
223 | 229 | if ( uo.getId().equals(id) ) { |
@@ -227,23 +233,23 @@ public class Env { | ||
227 | 233 | return null; |
228 | 234 | } |
229 | 235 | } |
230 | - | |
236 | + | |
231 | 237 | /******************************************************************************* |
232 | 238 | * 隠し |
233 | 239 | ******************************************************************************/ |
234 | - | |
240 | + | |
235 | 241 | private static boolean firstinstance = true; // 起動後最初の呼び出しか(2インスタンス目以降は実行しない) |
236 | - | |
242 | + | |
237 | 243 | // CHソートを有効にするかどうか |
238 | 244 | public boolean getChSortEnabled() { return chSortEnabled; } |
239 | 245 | public void setChSortEnabled(boolean b) { chSortEnabled = b; } |
240 | 246 | private boolean chSortEnabled = true; |
241 | - | |
242 | - | |
247 | + | |
248 | + | |
243 | 249 | /******************************************************************************* |
244 | 250 | * メンバ |
245 | 251 | ******************************************************************************/ |
246 | - | |
252 | + | |
247 | 253 | /* |
248 | 254 | * リスト形式関連の設定 |
249 | 255 | */ |
@@ -350,7 +356,7 @@ public class Env { | ||
350 | 356 | /* |
351 | 357 | * 新聞形式関連の設定 |
352 | 358 | */ |
353 | - | |
359 | + | |
354 | 360 | // 描画速度優先 |
355 | 361 | public boolean getDrawcacheEnable() { return drawcacheEnable; } |
356 | 362 | public void setDrawcacheEnable(boolean b) { drawcacheEnable = b; } |
@@ -406,6 +412,29 @@ public class Env { | ||
406 | 412 | public Color getTimebarColor4() { return timebarColor4; } |
407 | 413 | public void setTimebarColor4(Color c) { timebarColor4 = c; } |
408 | 414 | private Color timebarColor4 = TIMEBAR_COLOR_24_06; |
415 | + | |
416 | + // 予約タイムバーの色設定 | |
417 | + public Color getResTimebarColor1() { return restimebarColor1; } | |
418 | + public void setResTimebarColor1(Color c) { restimebarColor1 = c; } | |
419 | + private Color restimebarColor1 = RESTIMEBAR_COLOR_1; | |
420 | + | |
421 | + public Color getResTimebarColor2() { return restimebarColor2; } | |
422 | + public void setResTimebarColor2(Color c) { restimebarColor2 = c; } | |
423 | + private Color restimebarColor2 = RESTIMEBAR_COLOR_2; | |
424 | + | |
425 | + public Color getResTimebarColor3() { return restimebarColor3; } | |
426 | + public void setResTimebarColor3(Color c) { restimebarColor3 = c; } | |
427 | + private Color restimebarColor3 = RESTIMEBAR_COLOR_3; | |
428 | + | |
429 | + public Color getResTimebarColor4() { return restimebarColor4; } | |
430 | + public void setResTimebarColor4(Color c) { restimebarColor4 = c; } | |
431 | + private Color restimebarColor4 = RESTIMEBAR_COLOR_4; | |
432 | + | |
433 | + // 予約タイムバーの幅設定 | |
434 | + public int getResTimebarWidth() { return restimebarWidth; } | |
435 | + public void setResTimebarWidth(int n) { restimebarWidth = n; } | |
436 | + private int restimebarWidth = RESTIMEBAR_WIDTH; | |
437 | + | |
409 | 438 | // 予約枠の色設定 |
410 | 439 | public Color getExecOnFontColor() { return execOnFontColor; } |
411 | 440 | public void setExecOnFontColor(Color c) { execOnFontColor = c; } |
@@ -497,11 +526,11 @@ public class Env { | ||
497 | 526 | public boolean getPrintSnapshot() { return printSnapshot; } |
498 | 527 | public void setPrintSnapshot(boolean b) { printSnapshot = b; } |
499 | 528 | private boolean printSnapshot = false; |
500 | - | |
529 | + | |
501 | 530 | /* |
502 | 531 | * リスト・新聞形式共通 |
503 | 532 | */ |
504 | - | |
533 | + | |
505 | 534 | // 実行ONのエントリのみ予約マークを表示する |
506 | 535 | public boolean getDisplayOnlyExecOnEntry() { return displayOnlyExecOnEntry; } |
507 | 536 | public void setDisplayOnlyExecOnEntry(boolean b) { displayOnlyExecOnEntry = b; } |
@@ -539,11 +568,11 @@ public class Env { | ||
539 | 568 | public ArrayList<TextValueSet> getTvCommand() { return tvCommand; } |
540 | 569 | public void setTvCommand(ArrayList<TextValueSet> al) { tvCommand = al; } |
541 | 570 | private ArrayList<TextValueSet> tvCommand = new ArrayList<TextValueSet>(); |
542 | - | |
571 | + | |
543 | 572 | /* |
544 | 573 | * Web番組表対応 |
545 | 574 | */ |
546 | - | |
575 | + | |
547 | 576 | // 29時をまたいで同タイトルが続いている場合は同一番組とみなす |
548 | 577 | public boolean getContinueTomorrow() { return continueTomorrow; } |
549 | 578 | public void setContinueTomorrow(boolean b) { continueTomorrow = b; } |
@@ -630,13 +659,13 @@ public class Env { | ||
630 | 659 | public int getPrepPassedProgramCount() { return prepPassedProgramCount; } |
631 | 660 | public void setPrepPassedProgramCount(int w) { prepPassedProgramCount = w; } |
632 | 661 | private int prepPassedProgramCount = 4; |
633 | - | |
634 | - | |
635 | - | |
662 | + | |
663 | + | |
664 | + | |
636 | 665 | /* |
637 | 666 | * レコーダ対応 |
638 | 667 | */ |
639 | - | |
668 | + | |
640 | 669 | // 常に予約詳細情報を取得する |
641 | 670 | @Deprecated |
642 | 671 | public boolean getForceGetRdReserveDetails() { return forceGetRdReserveDetails; } |
@@ -676,8 +705,8 @@ public class Env { | ||
676 | 705 | public void setRecordedSaveScope(int n) { recordedSaveScope = n; } |
677 | 706 | public int getRecordedSaveScope() { return recordedSaveScope; } |
678 | 707 | private int recordedSaveScope = 90; |
679 | - | |
680 | - | |
708 | + | |
709 | + | |
681 | 710 | // |
682 | 711 | @Deprecated |
683 | 712 | public boolean getDontCalendarWorkWithNull() { return dontCalendarWorkWithNull; } |
@@ -685,12 +714,12 @@ public class Env { | ||
685 | 714 | public void setDontCalendarWorkWithNull(boolean b) { dontCalendarWorkWithNull = b; } |
686 | 715 | @Deprecated |
687 | 716 | boolean dontCalendarWorkWithNull = true; |
688 | - | |
717 | + | |
689 | 718 | /* |
690 | 719 | * 予約 |
691 | 720 | */ |
692 | - | |
693 | - // スポーツ延長の長さ(分) | |
721 | + | |
722 | + // スポーツ延長の長さ(分) | |
694 | 723 | public String getSpoexLength() { return spoexLength; } |
695 | 724 | public void setSpoexLength(String l) { spoexLength = l; } |
696 | 725 | private String spoexLength = "90"; |
@@ -754,11 +783,11 @@ public class Env { | ||
754 | 783 | public boolean getUseAutocomplete() { return useAutocomplete; } |
755 | 784 | public void setUseAutocomplete(boolean b) { useAutocomplete = b; } |
756 | 785 | private boolean useAutocomplete = false; |
757 | - | |
786 | + | |
758 | 787 | /* |
759 | 788 | * その他の設定 |
760 | 789 | */ |
761 | - | |
790 | + | |
762 | 791 | // 起動時にアップデートを確認する |
763 | 792 | public boolean getCheckUpdate() { return checkUpdate; } |
764 | 793 | public void setCheckUpdate(boolean b) { checkUpdate= b; } |
@@ -786,20 +815,20 @@ public class Env { | ||
786 | 815 | public String getLookAndFeel() { return lookAndFeel; } |
787 | 816 | public void setLookAndFeel(String n) { lookAndFeel = n; } |
788 | 817 | private String lookAndFeel = ""; |
789 | - // 表示フォント | |
818 | + // 表示フォント | |
790 | 819 | public String getFontName() { return fontName; } |
791 | 820 | public void setFontName(String f) { fontName = f; } |
792 | 821 | private String fontName = ""; |
793 | 822 | public int getFontSize() { return fontSize; } |
794 | 823 | public void setFontSize(int f) { fontSize = f; } |
795 | 824 | private int fontSize = 12; |
796 | - | |
825 | + | |
797 | 826 | public boolean getUseGTKRC() { return useGTKRC; } |
798 | 827 | public void setUseGTKRC(boolean b) { useGTKRC = b; } |
799 | 828 | private boolean useGTKRC = true; |
800 | - | |
829 | + | |
801 | 830 | private int fontSizeAdjustGTK = 3; |
802 | - | |
831 | + | |
803 | 832 | // 【Win】ファイルオープンにrundll32を使用する |
804 | 833 | public boolean getUseRundll32() { return useRundll32; } |
805 | 834 | public void setUseRundll32(boolean b) { useRundll32 = b; } |
@@ -808,16 +837,16 @@ public class Env { | ||
808 | 837 | public boolean getDebug() { return debug; } |
809 | 838 | public void setDebug(boolean b) { debug = b; } |
810 | 839 | private boolean debug = false; |
811 | - | |
812 | - | |
840 | + | |
841 | + | |
813 | 842 | /******************************************************************************* |
814 | 843 | * 作ったけど使ってないもの |
815 | 844 | ******************************************************************************/ |
816 | - | |
845 | + | |
817 | 846 | /* |
818 | 847 | * フォルダの設定 |
819 | 848 | */ |
820 | - | |
849 | + | |
821 | 850 | // キャッシュ格納場所 |
822 | 851 | public String getProgDir() { return progDir; } |
823 | 852 | public void setProgDir(String s) { progDir = s; } |
@@ -827,15 +856,15 @@ public class Env { | ||
827 | 856 | public void setPassedDir(String s) { passedDir = s; } |
828 | 857 | private String passedDir = "passed"; |
829 | 858 | |
830 | - | |
859 | + | |
831 | 860 | /******************************************************************************* |
832 | 861 | * 設定項目ではないもの |
833 | 862 | ******************************************************************************/ |
834 | - | |
863 | + | |
835 | 864 | /* |
836 | - * Web番組表関連の設定 | |
865 | + * Web番組表関連の設定 | |
837 | 866 | */ |
838 | - | |
867 | + | |
839 | 868 | // Web番組表サイト(TV) |
840 | 869 | public String getTVProgramSite() { return tvProgramSite; } |
841 | 870 | public void setTVProgramSite(String s) { tvProgramSite = s; } |
@@ -859,7 +888,7 @@ public class Env { | ||
859 | 888 | /******************************************************************************* |
860 | 889 | * もう使われていないアイテム |
861 | 890 | ******************************************************************************/ |
862 | - | |
891 | + | |
863 | 892 | // 番組表の表示を簡素化する(現在は使用していない) |
864 | 893 | @Deprecated |
865 | 894 | public boolean getLightProgramView() { return lightProgramView; } |
@@ -867,7 +896,7 @@ public class Env { | ||
867 | 896 | public void setLightProgramView(boolean b) { lightProgramView = b; } |
868 | 897 | @Deprecated |
869 | 898 | private boolean lightProgramView = false; |
870 | - | |
899 | + | |
871 | 900 | // スポーツ延長の検索範囲 |
872 | 901 | @Deprecated |
873 | 902 | public String getSpoexSearchStart() { return spoexSearchStart; } |
@@ -875,14 +904,14 @@ public class Env { | ||
875 | 904 | public void setSpoexSearchStart(String s) { spoexSearchStart = s; } |
876 | 905 | @Deprecated |
877 | 906 | public String getSpoexSearchEnd() { return spoexSearchEnd; } |
878 | - | |
907 | + | |
879 | 908 | @Deprecated |
880 | 909 | public void setSpoexSearchEnd(String s) { spoexSearchEnd = s; } |
881 | 910 | @Deprecated |
882 | 911 | private String spoexSearchStart = "00:00"; |
883 | 912 | @Deprecated |
884 | 913 | private String spoexSearchEnd = "00:00"; |
885 | - | |
914 | + | |
886 | 915 | // 「最大延長」の記載のあるもののみスポーツ延長のトリガーにする |
887 | 916 | @Deprecated |
888 | 917 | public boolean getSpoexLimitation() { return spoexLimitation; } |
@@ -890,8 +919,8 @@ public class Env { | ||
890 | 919 | public void setSpoexLimitation(boolean b) { spoexLimitation = b; } |
891 | 920 | @Deprecated |
892 | 921 | private boolean spoexLimitation = false; |
893 | - | |
894 | - | |
922 | + | |
923 | + | |
895 | 924 | /******************************************************************************* |
896 | 925 | * 雑多なメソッド |
897 | 926 | ******************************************************************************/ |
@@ -901,7 +930,7 @@ public class Env { | ||
901 | 930 | String cause = ""; |
902 | 931 | try { |
903 | 932 | File d = null; |
904 | - | |
933 | + | |
905 | 934 | // 設定ファイルを格納するディレクトリの作成 |
906 | 935 | d = new File(cause = envDir); |
907 | 936 | if (d.exists() == false) { |
@@ -923,7 +952,7 @@ public class Env { | ||
923 | 952 | // 何か致命的なエラー |
924 | 953 | } |
925 | 954 | } |
926 | - | |
955 | + | |
927 | 956 | // 番組表をキャッシュするディレクトリの作成 |
928 | 957 | d = new File(cause = progDir); |
929 | 958 | if (d.exists() == false) { |
@@ -931,7 +960,7 @@ public class Env { | ||
931 | 960 | // 何か致命的なエラー |
932 | 961 | } |
933 | 962 | } |
934 | - | |
963 | + | |
935 | 964 | // 過去ログ |
936 | 965 | d = new File(cause = passedDir); |
937 | 966 | if (d.exists() == false) { |
@@ -939,7 +968,7 @@ public class Env { | ||
939 | 968 | // 何か致命的なエラー |
940 | 969 | } |
941 | 970 | } |
942 | - | |
971 | + | |
943 | 972 | // skin |
944 | 973 | d = new File(cause = skinDir); |
945 | 974 | if (d.exists() == false) { |
@@ -947,7 +976,7 @@ public class Env { | ||
947 | 976 | // 何か致命的なエラー |
948 | 977 | } |
949 | 978 | } |
950 | - | |
979 | + | |
951 | 980 | /* |
952 | 981 | // debug |
953 | 982 | d = new File(cause = debugDir); |
@@ -962,13 +991,13 @@ public class Env { | ||
962 | 991 | System.err.println(ERRID+"フォルダの作成に失敗 "+cause); |
963 | 992 | } |
964 | 993 | } |
965 | - | |
994 | + | |
966 | 995 | // 保存する・読みだす |
967 | 996 | public boolean save() { |
968 | - | |
997 | + | |
969 | 998 | if ( FieldUtils.save(envText,this) ) { |
970 | 999 | // テキスト形式へ移行済み |
971 | - | |
1000 | + | |
972 | 1001 | if ( useGTKRC ) { |
973 | 1002 | saveGTKRC(); |
974 | 1003 | } |
@@ -978,10 +1007,10 @@ public class Env { | ||
978 | 1007 | f.delete(); |
979 | 1008 | } |
980 | 1009 | } |
981 | - | |
1010 | + | |
982 | 1011 | return true; |
983 | 1012 | } |
984 | - | |
1013 | + | |
985 | 1014 | System.out.println(MSGID+"保存します: "+envFile); |
986 | 1015 | if ( ! CommonUtils.writeXML(envFile, this) ) { |
987 | 1016 | System.err.println(ERRID+"保存に失敗しました"); |
@@ -989,7 +1018,7 @@ public class Env { | ||
989 | 1018 | } |
990 | 1019 | return true; |
991 | 1020 | } |
992 | - | |
1021 | + | |
993 | 1022 | private boolean saveGTKRC() { |
994 | 1023 | StringBuilder sb = new StringBuilder(); |
995 | 1024 | sb.append("style \"tainavistyle\" {\n"); |
@@ -1003,37 +1032,37 @@ public class Env { | ||
1003 | 1032 | sb.append("class \"GtkWidget\" style \"tainavistyle\"\n"); |
1004 | 1033 | return CommonUtils.write2file(GTKRC, sb.toString()); |
1005 | 1034 | } |
1006 | - | |
1035 | + | |
1007 | 1036 | public boolean load() { |
1008 | - | |
1037 | + | |
1009 | 1038 | File ft = new File(envText); |
1010 | 1039 | if ( ft.exists() ) { |
1011 | 1040 | // テキスト形式へ移行済み |
1012 | 1041 | System.out.println("@Deprecated: "+envFile); |
1013 | 1042 | return true; |
1014 | 1043 | } |
1015 | - | |
1044 | + | |
1016 | 1045 | System.out.println(MSGID+"読み込みます: "+envFile); |
1017 | 1046 | File fx = new File(envFile); |
1018 | 1047 | if ( fx.exists() ) { |
1019 | 1048 | Env b = (Env) CommonUtils.readXML(envFile); |
1020 | 1049 | if ( b != null ) { |
1021 | 1050 | FieldUtils.deepCopy(this, b); |
1022 | - | |
1051 | + | |
1023 | 1052 | // テキスト形式がなければ作るよ |
1024 | 1053 | if ( FieldUtils.save(envText,this) ) { |
1025 | 1054 | fx.renameTo(new File(envFile+".bak")); |
1026 | 1055 | } |
1027 | - | |
1056 | + | |
1028 | 1057 | return true; |
1029 | 1058 | } |
1030 | 1059 | } |
1031 | - | |
1060 | + | |
1032 | 1061 | System.err.println(ERRID+"環境設定が読み込めなかったのでデフォルトの設定値を利用します"); |
1033 | 1062 | return false; |
1034 | 1063 | } |
1035 | - | |
1036 | - | |
1064 | + | |
1065 | + | |
1037 | 1066 | /** |
1038 | 1067 | * {@link Env#save()}から呼び出されるだけで公開はしない |
1039 | 1068 | */ |
@@ -1046,17 +1075,17 @@ public class Env { | ||
1046 | 1075 | } |
1047 | 1076 | return true; |
1048 | 1077 | } |
1049 | - | |
1078 | + | |
1050 | 1079 | /** |
1051 | 1080 | * 移行用 |
1052 | 1081 | * @return |
1053 | 1082 | */ |
1054 | 1083 | public boolean loadText() { |
1055 | - | |
1084 | + | |
1056 | 1085 | boolean b = FieldUtils.load(envText,this); |
1057 | - | |
1086 | + | |
1058 | 1087 | // 廃止するよ |
1059 | - File f = new File(lafFile); | |
1088 | + File f = new File(lafFile); | |
1060 | 1089 | if ( f.exists() ) { |
1061 | 1090 | System.out.println(MSGID+"ルックアンドフィール設定ファイルは廃止されます: "+lafFile); |
1062 | 1091 | String s = CommonUtils.read4file(lafFile, true); |
@@ -1071,11 +1100,11 @@ public class Env { | ||
1071 | 1100 | } |
1072 | 1101 | f.delete(); |
1073 | 1102 | } |
1074 | - | |
1103 | + | |
1075 | 1104 | return b; |
1076 | - | |
1105 | + | |
1077 | 1106 | } |
1078 | - | |
1107 | + | |
1079 | 1108 | /** |
1080 | 1109 | * <P>XMLDecoderに失敗すると起動できなくなる場合があるので、どうしても起動時に欲しい設定だけベタテキストで保存しおく |
1081 | 1110 | * <P>{@link #saveLAF()}は公開しない |
@@ -1084,15 +1113,15 @@ public class Env { | ||
1084 | 1113 | public boolean loadLAF() { |
1085 | 1114 | return true; |
1086 | 1115 | } |
1087 | - | |
1116 | + | |
1088 | 1117 | /******************************************************************************* |
1089 | 1118 | * コンストラクタ |
1090 | 1119 | ******************************************************************************/ |
1091 | - | |
1120 | + | |
1092 | 1121 | public Env() { |
1093 | 1122 | |
1094 | 1123 | // ↑の宣言時に設定できないもの |
1095 | - | |
1124 | + | |
1096 | 1125 | { |
1097 | 1126 | ArrayList<JTXTButton.FontStyle> fsa = new ArrayList<JTXTButton.FontStyle>(); |
1098 | 1127 | fsa.add(JTXTButton.FontStyle.BOLD); |
@@ -1112,27 +1141,27 @@ public class Env { | ||
1112 | 1141 | } |
1113 | 1142 | { |
1114 | 1143 | ArrayList<TextValueSet> al = new ArrayList<TextValueSet>(); |
1115 | - | |
1144 | + | |
1116 | 1145 | TextValueSet tv = new TextValueSet(); |
1117 | 1146 | tv.setText("Googleでタイトルを検索"); |
1118 | 1147 | tv.setValue("http://www.google.co.jp/search?q=%ENCTITLE%"); |
1119 | 1148 | al.add(tv); |
1120 | - | |
1149 | + | |
1121 | 1150 | tv = new TextValueSet(); |
1122 | 1151 | tv.setText("Bingでタイトルを検索"); |
1123 | 1152 | tv.setValue("http://www.bing.com/search?q=%ENCTITLE%"); |
1124 | 1153 | al.add(tv); |
1125 | - | |
1154 | + | |
1126 | 1155 | tv = new TextValueSet(); |
1127 | 1156 | tv.setText("ブラウザで番組詳細のページを開く"); |
1128 | 1157 | tv.setValue("%DETAILURL%"); |
1129 | 1158 | al.add(tv); |
1130 | - | |
1159 | + | |
1131 | 1160 | tv = new TextValueSet(); |
1132 | 1161 | tv.setText("ブラウザで放送局のページを探す"); |
1133 | 1162 | tv.setValue("http://www.google.co.jp/search?hl=ja&btnI=1&q=%ENCCHNAME%"); |
1134 | 1163 | al.add(tv); |
1135 | - | |
1164 | + | |
1136 | 1165 | tv = new TextValueSet(); |
1137 | 1166 | tv.setText("ブラウザで番組情報のページを探す"); |
1138 | 1167 | tv.setValue("http://www.google.co.jp/search?hl=ja&btnI=1&q=%ENCCHNAME%+%ENCTITLE%"); |
@@ -1142,15 +1171,15 @@ public class Env { | ||
1142 | 1171 | tv.setText("ブラウザでTweetする"); |
1143 | 1172 | tv.setValue("https://twitter.com/share?text=%DATE%+%START%-%END%+%ENCCHNAME%+%ENCTITLE%"); |
1144 | 1173 | al.add(tv); |
1145 | - | |
1174 | + | |
1146 | 1175 | tv = new TextValueSet(); |
1147 | 1176 | tv.setText("CHAN-TORUの予約ページを開く"); |
1148 | 1177 | tv.setValue("https://tv.so-net.ne.jp/chan-toru/detail?type=bytime&cat=%TVKCAT%&area=%TVKAREACODE%&pid=%TVKPID%"); |
1149 | 1178 | al.add(tv); |
1150 | - | |
1179 | + | |
1151 | 1180 | this.setTvCommand(al); |
1152 | 1181 | } |
1153 | - | |
1182 | + | |
1154 | 1183 | // おまけ |
1155 | 1184 | if ( firstinstance ) { |
1156 | 1185 | firstinstance = false; |
@@ -11,20 +11,24 @@ public class JRTLabel extends JLabel { | ||
11 | 11 | private int vheight; |
12 | 12 | |
13 | 13 | private int vcol; |
14 | - private int vwidth; | |
14 | + | |
15 | + private int cno; | |
15 | 16 | |
16 | 17 | private static float heightMultiplier = 0; |
18 | + private static int vwidth; | |
17 | 19 | |
18 | 20 | // データ操作メソッド |
19 | 21 | public int getVRow() { return vrow; } |
20 | 22 | public int getVHeight() { return vheight; } |
23 | + public int getColorNo(){ return cno; } | |
24 | + public void setColorNo(int n){ cno = n; } | |
21 | 25 | |
22 | 26 | public static void setHeightMultiplier(float f) { heightMultiplier = f; } |
27 | + public static void setColumnWidth(int n){ vwidth = n; } | |
23 | 28 | |
24 | - public void setVBounds(int x, int y, int width, int height) { | |
29 | + public void setVBounds(int x, int y, int height) { | |
25 | 30 | vcol = x; |
26 | 31 | vrow = y; |
27 | - vwidth = width; | |
28 | 32 | vheight = height; |
29 | 33 | super.setBounds( |
30 | 34 | vcol, |
@@ -40,4 +44,5 @@ public class JRTLabel extends JLabel { | ||
40 | 44 | vwidth, |
41 | 45 | (int) Math.ceil(((float)vheight)*heightMultiplier)); |
42 | 46 | } |
47 | + | |
43 | 48 | } |
@@ -5,7 +5,7 @@ import java.util.regex.Pattern; | ||
5 | 5 | |
6 | 6 | |
7 | 7 | public class VersionInfo { |
8 | - private static final String Version = "タイニー番組ナビゲータ for DBR-T2007 3.22.18β+1.6.7"; | |
8 | + private static final String Version = "タイニー番組ナビゲータ for DBR-T2007 3.22.18β+1.7"; | |
9 | 9 | |
10 | 10 | private static final String OSname = System.getProperty("os.name"); |
11 | 11 | private static final String OSvers = System.getProperty("os.version"); |
@@ -204,8 +204,7 @@ public class Viewer extends JFrame implements ChangeListener,TickTimerListener,H | ||
204 | 204 | * レコーダ情報のどれとどれを読めばいいのか |
205 | 205 | */ |
206 | 206 | public static enum LoadRsvedFor { |
207 | - ALL ( "すべて取得"), | |
208 | - SETTING ( "設定情報のみ取得" ), | |
207 | +// SETTING ( "設定情報のみ取得(future use.)" ), | |
209 | 208 | DETAILS ( "予約一覧+録画詳細のみ取得" ), |
210 | 209 | RECORDED ( "録画結果一覧のみ取得" ), |
211 | 210 | AUTORESERVE ( "自動予約一覧のみ取得" ), |
@@ -3033,15 +3032,10 @@ public class Viewer extends JFrame implements ChangeListener,TickTimerListener,H | ||
3033 | 3032 | private boolean doLoadRdRecorder(LoadRsvedFor lrf) { |
3034 | 3033 | |
3035 | 3034 | if ( lrf == null ) { |
3036 | -// return doLoadRdRecorderAll(); | |
3037 | - return doLoadRdReserveDetails(); | |
3035 | + return doLoadRdRecorderAll(); | |
3038 | 3036 | } |
3039 | 3037 | else { |
3040 | 3038 | switch (lrf) { |
3041 | - case ALL: | |
3042 | - return doLoadRdRecorderAll(); | |
3043 | - case SETTING: | |
3044 | - return doLoadRdSettings(); | |
3045 | 3039 | case DETAILS: |
3046 | 3040 | return doLoadRdReserveDetails(); |
3047 | 3041 | case RECORDED: |
@@ -3196,7 +3190,7 @@ public class Viewer extends JFrame implements ChangeListener,TickTimerListener,H | ||
3196 | 3190 | } |
3197 | 3191 | |
3198 | 3192 | // 各種設定の取得 |
3199 | - if ( ! recorder.GetRdSettings(false) ) { | |
3193 | + if ( ! recorder.GetRdSettings(true) ) { | |
3200 | 3194 | succeeded = false; |
3201 | 3195 | continue; |
3202 | 3196 | } |