1 28 29 30 package com.caucho.portal.alpharenderer; 31 32 import com.caucho.util.L10N; 33 34 public enum Location 35 { 36 HIDDEN, FRAME, HEADER, FOOTER; 37 38 private static L10N L = new L10N( Location.class ); 39 40 public static Location getLocation( String name ) 41 { 42 String compare = name.toLowerCase(); 43 44 if ( name.equals("hidden") ) 45 return HIDDEN; 46 else if ( name.equals("frame") ) 47 return FRAME; 48 else if ( name.equals("header") ) 49 return HEADER; 50 else if ( name.equals("footer") ) 51 return FOOTER; 52 else 53 throw new IllegalArgumentException ( 54 L.l( "`{0}' must be one of ", 55 "location", "hidden, frame, header, footer" ) ); 56 } 57 } 58 | Popular Tags |