Changeset c2d9fc8


Ignore:
Timestamp:
Mar 14, 2010, 4:34:42 PM (11 years ago)
Author:
Michael Seifert <mseifert@…>
Branches:
master
Children:
4b5fe84
Parents:
eab1f15
Message:

Added license headers;
Added javadoc comments

Location:
src/main/java/de/erichseifert/warp
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/erichseifert/warp/ChatMessage.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp;
    223
    324
    425public interface ChatMessage {
     26        /**
     27         * Message sent to all players in the game.
     28         */
    529        public static final int ALL = 0;
     30        /**
     31         * Message sent to all players in the team of the player who sent the message.
     32         */
    633        public static final int TEAM = 1;
     34        /**
     35         * Message sent to all observers in the game.
     36         */
    737        public static final int OBSERVERS = 2;
    838
  • src/main/java/de/erichseifert/warp/Player.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp;
    223
  • src/main/java/de/erichseifert/warp/Replay.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp;
    223
     
    425import java.util.List;
    526
     27/**
     28 * Interface that represents a unified interface for any type of replay.
     29 */
    630public interface Replay {
    731        /**
     
    3155        /**
    3256         * Returns the player with the specified player index.
    33          * @param playerIndex
    34          * @return
     57         * @param playerIndex Index of the player.
     58         * @return Player.
    3559         */
    3660        Player getPlayer(int playerIndex);
  • src/main/java/de/erichseifert/warp/WARP.java

    reab1f15 rc2d9fc8  
    3333
    3434        /**
     35         * Creates a <code>WARP</code> object.
     36         * This constructor does nothing.
     37         */
     38        private WARP() {
     39        }
     40
     41        /**
    3542         * @param args No arguments are processed.
    3643         */
  • src/main/java/de/erichseifert/warp/gui/AboutWindow.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp.gui;
    223
  • src/main/java/de/erichseifert/warp/gui/PlayerRenderer.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp.gui;
    223
  • src/main/java/de/erichseifert/warp/gui/RendererComponent.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp.gui;
    223
  • src/main/java/de/erichseifert/warp/gui/ReplayParserGUI.java

    reab1f15 rc2d9fc8  
    6969/**
    7070 * Class that represents the main window of a replay parser.
    71  * It contains a <code>JTable</code> to organize the replays and a {@link ReplayRenderer}
     71 * It contains a <code>JTable</code> to organize the replays and a renderer
    7272 * to display important information. Both components are organized in a <code>JSplitPane</code>.
    7373 */
  • src/main/java/de/erichseifert/warp/gui/ReplayRowFilter.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp.gui;
    223
     
    1031import de.erichseifert.warp.Replay;
    1132
     33/**
     34 * Class that represents a filter for tables containing {@link Replay} objects.
     35 * @param <M> Type of the underlying table model.
     36 */
    1237public class ReplayRowFilter<M extends TableModel> extends RowFilter<M, Integer> {
     38        /**
     39         * Enum that represents the available filtering modes.
     40         */
    1341        public enum FilterMode {
    14                 PLAYER_NAME, PLAYER_RACE, FILE_NAME, FILE_AND_PLAYER_NAME;
     42                /**
     43                 * Filter only applies to the player names.
     44                 */
     45                PLAYER_NAME,
     46                /**
     47                 * Filter only applies to the player races.
     48                 */
     49                PLAYER_RACE,
     50                /**
     51                 * Filter only applies to the file names.
     52                 */
     53                FILE_NAME,
     54                /**
     55                 * Filter only applies to the player names and file names.
     56                 */
     57                FILE_AND_PLAYER_NAME;
    1558
    1659                @Override
     
    3780        private FilterMode filterMode;
    3881
     82        /**
     83         * Creates a <code>ReplayRowFilter</code> object filtering the specified columns.
     84         * @param columnIndices Column indices to be filtered.
     85         */
    3986        public ReplayRowFilter(int... columnIndices) {
    4087                this.columnIndices = new HashSet<Integer>(columnIndices.length);
     
    91138        }
    92139
     140        /**
     141         * Returns the indices of the filtered columns.
     142         * @return Column indices.
     143         */
    93144        public Collection<Integer> getColumnIndices() {
    94145                return columnIndices;
    95146        }
    96147
     148        /**
     149         * Returns the text used for filtering.
     150         * @return Filter text.
     151         */
    97152        public String getFilterText() {
    98153                return filterText;
    99154        }
    100155
     156        /**
     157         * Sets the text used for filtering.
     158         * @param filterText Filter text.
     159         */
    101160        public void setFilterText(String filterText) {
    102161                this.filterText = filterText;
    103162        }
    104163
     164        /**
     165         * Returns the applied filtering mode.
     166         * @return Filtering mode.
     167         */
    105168        public FilterMode getFilterMode() {
    106169                return filterMode;
    107170        }
    108171
     172        /**
     173         * Sets the filtering mode to the specified value.
     174         * @param filterMode Filtering mode.
     175         */
    109176        public void setFilterMode(FilterMode filterMode) {
    110177                this.filterMode = filterMode;
  • src/main/java/de/erichseifert/warp/gui/renderers/sc2replay/SC2ReplayRenderer.java

    reab1f15 rc2d9fc8  
    4242
    4343/**
    44  * Class that represents a renderer for {@link Starcraft2Replay} object.
     44 * Class that represents a renderer for {@link SC2Replay} object.
    4545 * It displays a preview of the map the replay was played on, as well as
    4646 * the players' names, their race, and color.
  • src/main/java/de/erichseifert/warp/io/Settings.java

    reab1f15 rc2d9fc8  
     1/**
     2 * WARP: WARP is a Replay Manager for Java(R)
     3 *
     4 * (C) Copyright 2010-2010 Michael Seifert <michael.seifert[at]gmx.net>
     5 *
     6 * This file is part of WARP.
     7 *
     8 * WARP is free software: you can redistribute it and/or modify
     9 * it under the terms of the GNU General Public License as published by
     10 * the Free Software Foundation, either version 3 of the License, or
     11 * (at your option) any later version.
     12 *
     13 * WARP is distributed in the hope that it will be useful,
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 * GNU General Public License for more details.
     17 *
     18 * You should have received a copy of the GNU General Public License
     19 * along with WARP.  If not, see <http://www.gnu.org/licenses/>.
     20 */
     21
    122package de.erichseifert.warp.io;
    223
     
    526import de.erichseifert.warp.WARP;
    627
     28/**
     29 * Class that represents a storage for user settings.
     30 */
    731public class Settings {
    832        private static final String KEY_REPLAY_DIR = "replayDir";
     
    1236        private final Preferences prefs;
    1337
     38        /**
     39         * Creates a <code>Settings</code> object with the default values.
     40         */
    1441        private Settings() {
    1542                prefs = Preferences.userNodeForPackage(WARP.class);
    1643        }
    1744
     45        /**
     46         * Returns an instance of the <code>Settings</code> class.
     47         * @return <code>Settings</code> instance.
     48         */
    1849        public static Settings getInstance() {
    1950                if (instance == null) {
     
    2354        }
    2455
     56        /**
     57         * Retrieves the user's preference for the replay directory.
     58         * @return Replay path.
     59         */
    2560        public String getReplayDir() {
    2661                return prefs.get(KEY_REPLAY_DIR, null);
    2762        }
    2863
     64        /**
     65         * Sets the user's preference for the replay directory to the specified path.
     66         * @param path Directory path.
     67         */
    2968        public void setReplayDir(String path) {
    3069                prefs.put(KEY_REPLAY_DIR, path);
  • src/main/java/de/erichseifert/warp/util/ReplayUtil.java

    reab1f15 rc2d9fc8  
    4242         * thus incrementing its position.
    4343         * @param src
    44          * @return
     44         * @return String.
    4545         */
    4646        public static String getReplayString(ByteBuffer src) {
Note: See TracChangeset for help on using the changeset viewer.