001: /*
002: * @(#) $Header: /cvs/jai-operators/src/main/ca/forklabs/media/jai/FormatDataType.java,v 1.1 2007/07/04 23:57:53 forklabs Exp $
003: *
004: * Copyright (C) 2007 Forklabs Daniel Léonard
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: */
020:
021: package ca.forklabs.media.jai;
022:
023: import java.awt.image.DataBuffer;
024:
025: /**
026: * Enum {@code FormatDataType} represents the possible values for the
027: * <em>format</em> operation.
028: *
029: * @author <a href="mailto:forklabs at dev.java.net?subject=ca.forklabs.media.jai.FormatDataType">Daniel Léonard</a>
030: * @version $Revision: 1.1 $
031: */
032: public enum FormatDataType {
033:
034: /**
035: * Represents the {@code byte} data type.
036: */
037: BYTE {
038: /**
039: * Gets the equivalent value from class {@link DataBuffer}.
040: * @return always {@link DataBuffer#TYPE_BYTE}.
041: */
042: @Override
043: public int getDataBufferType() {
044: int type = DataBuffer.TYPE_BYTE;
045: return type;
046: }
047: },
048:
049: /**
050: * Represents the {@code short} data type.
051: */
052: SHORT {
053: /**
054: * Gets the equivalent value from class {@link DataBuffer}.
055: * @return always {@link DataBuffer#TYPE_SHORT}.
056: */
057: @Override
058: public int getDataBufferType() {
059: int type = DataBuffer.TYPE_SHORT;
060: return type;
061: }
062: },
063:
064: /**
065: * Represents the {@code unsigned short} data type.
066: */
067: UNSIGNED_SHORT {
068: /**
069: * Gets the equivalent value from class {@link DataBuffer}.
070: * @return always {@link DataBuffer#TYPE_USHORT}.
071: */
072: @Override
073: public int getDataBufferType() {
074: int type = DataBuffer.TYPE_USHORT;
075: return type;
076: }
077: },
078:
079: /**
080: * Represents the {@code int} data type.
081: */
082: INTEGER {
083: /**
084: * Gets the equivalent value from class {@link DataBuffer}.
085: * @return always {@link DataBuffer#TYPE_INT}.
086: */
087: @Override
088: public int getDataBufferType() {
089: int type = DataBuffer.TYPE_INT;
090: return type;
091: }
092: },
093:
094: /**
095: * Represents the {@code float} data type.
096: */
097: FLOAT {
098: /**
099: * Gets the equivalent value from class {@link DataBuffer}.
100: * @return always {@link DataBuffer#TYPE_FLOAT}.
101: */
102: @Override
103: public int getDataBufferType() {
104: int type = DataBuffer.TYPE_FLOAT;
105: return type;
106: }
107: },
108:
109: /**
110: * Represents the {@code double} data type.
111: */
112: DOUBLE {
113: /**
114: * Gets the equivalent value from class {@link DataBuffer}.
115: * @return always {@link DataBuffer#TYPE_DOUBLE}.
116: */
117: @Override
118: public int getDataBufferType() {
119: int type = DataBuffer.TYPE_DOUBLE;
120: return type;
121: }
122: };
123:
124: /**
125: * Gets the equivalent value from class {@link DataBuffer}.
126: * @return the data type value.
127: */
128: public abstract int getDataBufferType();
129:
130: }
131:
132: /*
133: * $Log: FormatDataType.java,v $
134: * Revision 1.1 2007/07/04 23:57:53 forklabs
135: * Enum FormatDataType.
136: *
137: */
|