001 package com.osbcp.css.constants; 002 003 import java.io.Serializable; 004 005 /** 006 * Values for the <i>display</i> property. 007 * 008 * @see <a href="http://www.w3schools.com/cssref/pr_class_display.asp">CSS display Property</a> 009 * @author <a href="mailto:christoffer@christoffer.me">Christoffer Pettersson</a> 010 */ 011 012 public enum Display implements Serializable { 013 014 /** 015 * The element will generate no box at all. 016 */ 017 NONE, 018 019 /** 020 * The element will generate a block box (a line break before and after the element). 021 */ 022 BLOCK, 023 024 /** 025 * The element will generate an inline box (no line break before or after the element). This is default. 026 */ 027 INLINE, 028 029 /** 030 * The element will generate a block box, laid out as an inline box. 031 */ 032 INLINE_BLOCK, 033 034 /** 035 * The element will generate an inline box (like <table>, with no line break before or after). 036 */ 037 INLINE_TABLE, 038 039 /** 040 * The element will generate a block box, and an inline box for the list marker. 041 */ 042 LIST_ITEM, 043 044 /** 045 * The element will generate a block or inline box, depending on context. 046 */ 047 RUN_IN, 048 049 /** 050 * The element will behave like a table (like <table>, with a line break before and after). 051 */ 052 TABLE, 053 054 /** 055 * The element will behave like a table caption (like <caption>). 056 */ 057 TABLE_CAPTION, 058 059 /** 060 * The element will behave like a table cell. 061 */ 062 TABLE_CELL, 063 064 /** 065 * The element will behave like a table column. 066 */ 067 TABLE_COLUMN, 068 069 /** 070 * The element will behave like a table column group (like <colgroup>). 071 */ 072 TABLE_COLUMN_GROUP, 073 074 /** 075 * The element will behave like a table footer row group. 076 */ 077 TABLE_FOOTER_GROUP, 078 079 /** 080 * The element will behave like a table header row group. 081 */ 082 TABLE_HEADER_GROUP, 083 084 /** 085 * The element will behave like a table row. 086 */ 087 TABLE_ROW, 088 089 /** 090 * The element will behave like a table row group. 091 */ 092 TABLE_ROW_GROUP, 093 094 /** 095 * Specifies that the value of the display property should be inherited from the parent element. 096 */ 097 INHERIT; 098 099 @Override 100 public String toString() { 101 return name().toLowerCase().replace("_", "-"); 102 } 103 104 }