View Javadoc

1   /***
2    * Jetrix TetriNET Server
3    * Copyright (C) 2004  Emmanuel Bourg
4    *
5    * This program is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU General Public License
7    * as published by the Free Software Foundation; either version 2
8    * of the License, or (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, write to the Free Software
17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18   */
19  
20  package net.jetrix.config;
21  
22  import net.jetrix.Language;
23  
24  import java.util.Locale;
25  
26  /***
27   * Block enumeration.
28   *
29   * @since 0.2
30   * 
31   * @author Emmanuel Bourg
32   * @version $Revision: 833 $, $Date: 2010-03-08 10:04:45 +0100 (lun., 08 mars 2010) $
33   */
34  public enum Block
35  {
36      LINE,
37      SQUARE,
38      LEFTL,
39      RIGHTL,
40      LEFTZ,
41      RIGHTZ,
42      HALFCROSS;
43  
44      public String getCode()
45      {
46          return name().toLowerCase();
47      }
48  
49      public String getName(Locale locale)
50      {
51          return Language.getText("command.config.blocks." + getCode(), locale);
52      }
53  }