- Timestamp:
- 02/28/09 15:21:48 (4 years ago)
- Location:
- lang/java/lt_timer
- Files:
-
- 2 modified
-
pom.xml (modified) (1 diff)
-
src/main/java/java_ja/LTStopWatch.java (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/java/lt_timer/pom.xml
r30563 r30615 1 1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <groupId>lt_timer</groupId> 5 <artifactId>lt_timer</artifactId> 6 <packaging>jar</packaging> 7 <version>1.0-SNAPSHOT</version> 8 <name>lt_timer</name> 9 <url>http://maven.apache.org</url> 10 <build> 11 <defaultGoal>validate</defaultGoal> 12 <plugins> 13 <plugin> 14 <groupId>org.apache.maven.plugins</groupId> 15 <artifactId>maven-jar-plugin</artifactId> 16 <configuration> 17 <archive> 18 <manifest> 19 <mainClass>java_ja.LTStopWatch</mainClass> 20 <addClasspath>true</addClasspath> 21 </manifest> 22 </archive> 23 </configuration> 24 </plugin> 25 </plugins> 26 </build> 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <groupId>lt_timer</groupId> 5 <artifactId>lt_timer</artifactId> 6 <packaging>jar</packaging> 7 <version>1.0-SNAPSHOT</version> 8 <name>lt_timer</name> 9 <url>http://maven.apache.org</url> 10 <build> 11 <defaultGoal>validate</defaultGoal> 12 <plugins> 13 <plugin> 14 <groupId>org.apache.maven.plugins</groupId> 15 <artifactId>maven-compiler-plugin</artifactId> 16 <configuration> 17 <source>1.5</source> 18 <target>1.5</target> 19 <encoding>UTF-8</encoding> 20 </configuration> 21 </plugin> 22 <plugin> 23 <groupId>org.apache.maven.plugins</groupId> 24 <artifactId>maven-resources-plugin</artifactId> 25 <configuration> 26 <encoding>UTF-8</encoding> 27 </configuration> 28 </plugin> 29 <plugin> 30 <groupId>org.apache.maven.plugins</groupId> 31 <artifactId>maven-jar-plugin</artifactId> 32 <configuration> 33 <archive> 34 <manifest> 35 <mainClass>java_ja.LTStopWatch</mainClass> 36 <addClasspath>true</addClasspath> 37 </manifest> 38 </archive> 39 </configuration> 40 </plugin> 41 </plugins> 42 </build> 27 43 </project> -
lang/java/lt_timer/src/main/java/java_ja/LTStopWatch.java
r30563 r30615 25 25 26 26 /** 27 * for Lightning Talks 28 * 27 * for Lightning Talks 28 * 29 29 * @author imai78 30 * 30 * 31 31 */ 32 32 @SuppressWarnings("serial") … … 78 78 this.button = new JButton("START"); 79 79 this.button.addActionListener(new ActionListener() { 80 @Override81 80 public void actionPerformed(ActionEvent e) { 82 81 if (button.getText().equals("START")) { … … 91 90 this.resetButton = new JButton("RESET"); 92 91 this.resetButton.addActionListener(new ActionListener() { 93 @Override94 92 public void actionPerformed(ActionEvent e) { 95 93 restTime = time; … … 100 98 // タイマー。 101 99 Timer t = new Timer(10, new ActionListener() { 102 @Override103 100 public void actionPerformed(ActionEvent e) { 104 101 if (button.getText().equals("STOP")) { … … 121 118 /** 122 119 * 表示領域。 123 * 120 * 124 121 * @author imai78 125 * 122 * 126 123 */ 127 124 class Canvas extends JPanel { … … 179 176 /** 180 177 * オマケの描画。 181 * 178 * 182 179 * @param g2 183 180 */ … … 212 209 /** 213 210 * デジタル時計の描画。 214 * 211 * 215 212 * @param g2 216 213 */ … … 256 253 /** 257 254 * アナログ時計の文字盤(って言うの?)を描画。 258 * 255 * 259 256 * @param g2 260 257 */ … … 272 269 /** 273 270 * 指定された秒を描画する。 274 * 271 * 275 272 * @param g2 276 273 * @param sec … … 285 282 /** 286 283 * 指定された秒の座標に画像を描画する。 287 * 284 * 288 285 * @param g2 289 286 * @param sec … … 298 295 /** 299 296 * 座標計算。 300 * 297 * 301 298 * @param sec 302 299 * @return … … 312 309 /** 313 310 * デジタル風番号。 314 * 311 * 315 312 * @author imai78 316 * 313 * 317 314 */ 318 315 class DigitalNumber { … … 324 321 /** 325 322 * コンストラクタ。 326 * 323 * 327 324 * @param number 328 325 * @param x … … 385 382 /** 386 383 * 描画する。 387 * 384 * 388 385 * @param g 389 386 */ … … 396 393 /** 397 394 * 六角形のクラス。 398 * 395 * 399 396 * @author imai78 400 * 397 * 401 398 */ 402 399 class Hexagon extends Polygon { 403 400 /** 404 401 * コンストラクタ。 405 * 402 * 406 403 * @param x 407 404 * @param y … … 447 444 /** 448 445 * 現在時刻を取得する。 449 * 446 * 450 447 * @return 451 448 */ … … 456 453 /** 457 454 * 秒のみ取得する。 458 * 455 * 459 456 * @param time 460 457 * @return … … 466 463 /** 467 464 * 規定時間を超過したかどうかを判定する。 468 * 465 * 469 466 * @return 470 467 */ … … 475 472 /** 476 473 * いい加減にしてないかどうかを判定する。 477 * 474 * 478 475 * @return 479 476 */ … … 541 538 /** 542 539 * エントリ・ポイント。 543 * 540 * 544 541 * @param args 545 542 */
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)