railo.runtime.img
Class Image

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.img.Image
All Implemented Interfaces:
Serializable, Cloneable, Map, Dumpable, Castable, Collection, ForEachIteratorable, Iteratorable, Objects, Sizeable, Struct

public class Image
extends StructSupport
implements Cloneable, Struct

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static int BORDER_TYPE_CONSTANT
           
static int INTERPOLATION_BICUBIC
           
static int INTERPOLATION_BILINEAR
           
static int INTERPOLATION_NEAREST
           
static int INTERPOLATION_NONE
           
static int IP_BESSEL
           
static int IP_BLACKMAN
           
static int IP_HAMMING
           
static int IP_HANNING
           
static int IP_HERMITE
           
static int IP_HIGHESTPERFORMANCE
           
static int IP_HIGHESTQUALITY
           
static int IP_HIGHPERFORMANCE
           
static int IP_HIGHQUALITY
           
static int IP_LANCZOS
           
static int IP_MEDIUMPERFORMANCE
           
static int IP_MEDIUMQUALITY
           
static int IP_MITCHELL
           
static int IP_NONE
           
static int IP_QUADRATIC
           
static int IP_TRIANGLE
           
static int IPC_BICUBIC
           
static int IPC_BILINEAR
           
static int IPC_MAX
           
static int IPC_NEAREST
           
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
 
Constructor Summary
Image()
           
Image(BufferedImage image)
           
Image(byte[] binary)
           
Image(byte[] binary, String format)
           
Image(int width, int height, int imageType, Color canvasColor)
           
Image(Resource res)
           
Image(Resource res, String format)
           
Image(String b64str)
           
Image(String b64str, String format)
           
 
Method Summary
 void _rotate(float x, float y, float angle, String interpolation)
           
 void addBorder(int thickness, Color color, int borderType)
          add a border to image
 void blur(int blurFactor)
           
 Boolean castToBoolean(Boolean defaultValue)
          cast the castable value to a boolean value
 boolean castToBooleanValue()
          cast the castable value to a boolean value
 DateTime castToDateTime()
          cast the castable value to a date time object
 DateTime castToDateTime(DateTime defaultValue)
          cast the castable value to a date time object
 double castToDoubleValue()
          cast the castable value to a double value
 double castToDoubleValue(double defaultValue)
          cast the castable value to a double value
 String castToString()
          cast the castable value to a string, other than the Method toString, this Method can throw a Exception
 String castToString(String defaultValue)
          cast the castable value to a string, return the default value, when the method is not castable
 void clear()
          clears the collection
 void clearRect(int x, int y, int width, int height)
           
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 boolean containsKey(Collection.Key key)
          contains this key
 boolean containsValue(Object value)
           
 void convert(String format)
           
 Image copy(float x, float y, float width, float height)
           
 Image copy(float x, float y, float width, float height, float dx, float dy)
           
static Image createImage(PageContext pc, Object obj, boolean check4Var, boolean clone, boolean checkAccess, String format)
           
 void crop(float x, float y, float width, float height)
           
 void draw3DRect(int x, int y, int width, int height, boolean raised, boolean filled)
           
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle, boolean filled)
           
 void drawCubicCurve(double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x1, double y1, double x2, double y2)
           
 void drawImage(Image img, int x, int y)
           
 void drawImage(Image img, int x, int y, int width, int height)
           
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawLines(int[] xcoords, int[] ycoords, boolean isPolygon, boolean filled)
           
 void drawOval(int x, int y, int width, int height, boolean filled)
           
 void drawPoint(int x, int y)
           
 void drawQuadraticCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
           
 void drawRect(int x, int y, int width, int height, boolean filled)
           
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, boolean filled)
           
 void drawString(String text, int x, int y, Struct attr)
           
 Collection duplicate(boolean deepCopy)
           
 Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
           
 void flip(javax.media.jai.operator.TransposeType transpose)
           
 Object get(Collection.Key key)
          return a value from the collection
 Object get(Collection.Key key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 String getBase64String(String format)
           
 BufferedImage getBufferedImage()
           
 ColorModel getColorModel()
           
 String getFormat()
           
 int getHeight()
           
 byte[] getImageBytes(String format)
           
 byte[] getImageBytes(String format, boolean noMeta)
           
 IIOMetadata getMetaData(Struct parent)
           
 Resource getSource()
           
 int getWidth()
           
 void grayscale()
           
static boolean hasAlpha(Image image)
          This method returns true if the specified image has transparent pixels
 BufferedImage image()
           
 void image(BufferedImage image)
           
 Struct info()
           
 void invert()
           
static boolean isImage(Object obj)
           
 Iterator<Collection.Key> keyIterator()
           
 Collection.Key[] keys()
           
 Iterator<String> keysAsStringIterator()
           
 void overlay(Image topImage)
           
 void paste(Image topImage, int x, int y)
           
 Object remove(Collection.Key key)
          removes value from collection and return it when it exists, otherwise throws a exception
 Object removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 void resize(int width, int height, int interpolation, double blurFactor)
           
 void resize(int scale, String interpolation, double blurFactor)
           
 void resize(String strWidth, String strHeight, String interpolation, double blurFactor)
           
 void resizeImage(int width, int height, int interpolation)
           
 void resizeImage2(int width, int height)
           
 void rgb()
           
 void rotate(float x, float y, float angle, int interpolation)
           
 void rotateAxis(double angle)
           
 void rotateAxis(double angle, double x, double y)
           
 void scaleToFit(String fitWidth, String fitHeight, String interpolation, double blurFactor)
           
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 void setAlpha(float alpha)
           
 void setAntiAliasing(boolean antiAlias)
           
 void setBackground(Color color)
           
 void setColor(Color color)
           
 void setDrawingStroke(float width, int endcaps, int linejoins, float miterlimit, float[] dash, float dash_phase)
           
 void setDrawingStroke(Stroke stroke)
           
 void setDrawingStroke(Struct attr)
           
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 void setTranparency(float percent)
           
 void setXorMode(Color color)
           
 void sharpen(float gain)
           
 void shear(float shear, javax.media.jai.operator.ShearDir direction, Object interpolation)
           
 void shearAxis(double shx, double shy)
           
 int size()
           
 void threeBBger()
           
static BufferedImage toBufferedImage(Image image)
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
static Image toImage(Object obj)
           
static int toInterpolation(String strInterpolation)
           
 void translate(int xtrans, int ytrans, Object interpolation)
           
 void translateAxis(int x, int y)
           
 Iterator<Object> valueIterator()
           
 Collection values()
           
 String writeBase64(Resource destination, String format, boolean inHTMLFormat)
           
 void writeOut(OutputStream os, String format, float quality, boolean closeStream)
           
 void writeOut(Resource destination, boolean overwrite, float quality)
           
 void writeOut(Resource destination, String format, boolean overwrite, float quality)
           
static void writeOutGif(BufferedImage src, OutputStream os)
           
 
Methods inherited from class railo.runtime.type.util.StructSupport
call, callWithNamedValues, clone, containsKey, containsKey, entrySet, equals, get, get, get, get, get, getIterator, hashCode, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, sizeOf, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface railo.runtime.type.Collection
clone, containsKey, get, get, set, setEL
 
Methods inherited from interface railo.runtime.type.ForEachIteratorable
getIterator
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove
 
Methods inherited from interface railo.runtime.type.Sizeable
sizeOf
 
Methods inherited from interface railo.runtime.type.Objects
call, callWithNamedValues, get, get, set, setEL
 

Field Detail

BORDER_TYPE_CONSTANT

public static final int BORDER_TYPE_CONSTANT
See Also:
Constant Field Values

INTERPOLATION_NONE

public static final int INTERPOLATION_NONE
See Also:
Constant Field Values

INTERPOLATION_NEAREST

public static final int INTERPOLATION_NEAREST
See Also:
Constant Field Values

INTERPOLATION_BILINEAR

public static final int INTERPOLATION_BILINEAR
See Also:
Constant Field Values

INTERPOLATION_BICUBIC

public static final int INTERPOLATION_BICUBIC
See Also:
Constant Field Values

IP_NONE

public static final int IP_NONE
See Also:
Constant Field Values

IPC_NEAREST

public static final int IPC_NEAREST
See Also:
Constant Field Values

IPC_BILINEAR

public static final int IPC_BILINEAR
See Also:
Constant Field Values

IPC_BICUBIC

public static final int IPC_BICUBIC
See Also:
Constant Field Values

IPC_MAX

public static final int IPC_MAX
See Also:
Constant Field Values

IP_HIGHESTQUALITY

public static final int IP_HIGHESTQUALITY
See Also:
Constant Field Values

IP_HIGHQUALITY

public static final int IP_HIGHQUALITY
See Also:
Constant Field Values

IP_MEDIUMQUALITY

public static final int IP_MEDIUMQUALITY
See Also:
Constant Field Values

IP_HIGHESTPERFORMANCE

public static final int IP_HIGHESTPERFORMANCE
See Also:
Constant Field Values

IP_HIGHPERFORMANCE

public static final int IP_HIGHPERFORMANCE
See Also:
Constant Field Values

IP_MEDIUMPERFORMANCE

public static final int IP_MEDIUMPERFORMANCE
See Also:
Constant Field Values

IP_BESSEL

public static final int IP_BESSEL
See Also:
Constant Field Values

IP_BLACKMAN

public static final int IP_BLACKMAN
See Also:
Constant Field Values

IP_HAMMING

public static final int IP_HAMMING
See Also:
Constant Field Values

IP_HANNING

public static final int IP_HANNING
See Also:
Constant Field Values

IP_HERMITE

public static final int IP_HERMITE
See Also:
Constant Field Values

IP_LANCZOS

public static final int IP_LANCZOS
See Also:
Constant Field Values

IP_MITCHELL

public static final int IP_MITCHELL
See Also:
Constant Field Values

IP_QUADRATIC

public static final int IP_QUADRATIC
See Also:
Constant Field Values

IP_TRIANGLE

public static final int IP_TRIANGLE
See Also:
Constant Field Values
Constructor Detail

Image

public Image(byte[] binary)
      throws IOException
Throws:
IOException

Image

public Image(byte[] binary,
             String format)
      throws IOException
Throws:
IOException

Image

public Image(Resource res)
      throws IOException
Throws:
IOException

Image

public Image(Resource res,
             String format)
      throws IOException
Throws:
IOException

Image

public Image(BufferedImage image)

Image

public Image(String b64str)
      throws IOException,
             ExpressionException
Throws:
IOException
ExpressionException

Image

public Image(String b64str,
             String format)
      throws IOException,
             ExpressionException
Throws:
IOException
ExpressionException

Image

public Image(int width,
             int height,
             int imageType,
             Color canvasColor)
      throws ExpressionException
Throws:
ExpressionException

Image

public Image()
Method Detail

addBorder

public void addBorder(int thickness,
                      Color color,
                      int borderType)
               throws ExpressionException
add a border to image

Parameters:
thickness -
color -
borderType -
Throws:
ExpressionException

blur

public void blur(int blurFactor)
          throws ExpressionException
Throws:
ExpressionException

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
               throws ExpressionException
Throws:
ExpressionException

info

public Struct info()
            throws ExpressionException
Throws:
ExpressionException

getMetaData

public IIOMetadata getMetaData(Struct parent)

sharpen

public void sharpen(float gain)
             throws ExpressionException
Throws:
ExpressionException

setTranparency

public void setTranparency(float percent)
                    throws ExpressionException
Throws:
ExpressionException

invert

public void invert()
            throws ExpressionException
Throws:
ExpressionException

copy

public Image copy(float x,
                  float y,
                  float width,
                  float height)
           throws ExpressionException
Throws:
ExpressionException

copy

public Image copy(float x,
                  float y,
                  float width,
                  float height,
                  float dx,
                  float dy)
           throws ExpressionException
Throws:
ExpressionException

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle,
                    boolean filled)
             throws ExpressionException
Throws:
ExpressionException

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised,
                       boolean filled)
                throws ExpressionException
Throws:
ExpressionException

drawCubicCurve

public void drawCubicCurve(double ctrlx1,
                           double ctrly1,
                           double ctrlx2,
                           double ctrly2,
                           double x1,
                           double y1,
                           double x2,
                           double y2)
                    throws ExpressionException
Throws:
ExpressionException

drawPoint

public void drawPoint(int x,
                      int y)
               throws ExpressionException
Throws:
ExpressionException

drawQuadraticCurve

public void drawQuadraticCurve(double x1,
                               double y1,
                               double ctrlx,
                               double ctrly,
                               double x2,
                               double y2)
                        throws ExpressionException
Throws:
ExpressionException

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height,
                     boolean filled)
              throws ExpressionException
Throws:
ExpressionException

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight,
                          boolean filled)
                   throws ExpressionException
Throws:
ExpressionException

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
              throws ExpressionException
Throws:
ExpressionException

drawImage

public void drawImage(Image img,
                      int x,
                      int y)
               throws ExpressionException
Throws:
ExpressionException

drawImage

public void drawImage(Image img,
                      int x,
                      int y,
                      int width,
                      int height)
               throws ExpressionException
Throws:
ExpressionException

drawLines

public void drawLines(int[] xcoords,
                      int[] ycoords,
                      boolean isPolygon,
                      boolean filled)
               throws ExpressionException
Throws:
ExpressionException

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height,
                     boolean filled)
              throws ExpressionException
Throws:
ExpressionException

drawString

public void drawString(String text,
                       int x,
                       int y,
                       Struct attr)
                throws PageException
Throws:
PageException

setDrawingStroke

public void setDrawingStroke(Struct attr)
                      throws PageException
Throws:
PageException

setDrawingStroke

public void setDrawingStroke(float width,
                             int endcaps,
                             int linejoins,
                             float miterlimit,
                             float[] dash,
                             float dash_phase)
                      throws ExpressionException
Throws:
ExpressionException

setDrawingStroke

public void setDrawingStroke(Stroke stroke)
                      throws ExpressionException
Throws:
ExpressionException

flip

public void flip(javax.media.jai.operator.TransposeType transpose)
          throws ExpressionException
Throws:
ExpressionException

grayscale

public void grayscale()
               throws ExpressionException
Throws:
ExpressionException

rgb

public void rgb()
         throws ExpressionException
Throws:
ExpressionException

threeBBger

public void threeBBger()
                throws ExpressionException
Throws:
ExpressionException

overlay

public void overlay(Image topImage)
             throws ExpressionException
Throws:
ExpressionException

paste

public void paste(Image topImage,
                  int x,
                  int y)
           throws ExpressionException
Throws:
ExpressionException

setXorMode

public void setXorMode(Color color)
                throws ExpressionException
Throws:
ExpressionException

translate

public void translate(int xtrans,
                      int ytrans,
                      Object interpolation)
               throws ExpressionException
Throws:
ExpressionException

translateAxis

public void translateAxis(int x,
                          int y)
                   throws ExpressionException
Throws:
ExpressionException

rotateAxis

public void rotateAxis(double angle)
                throws ExpressionException
Throws:
ExpressionException

rotateAxis

public void rotateAxis(double angle,
                       double x,
                       double y)
                throws ExpressionException
Throws:
ExpressionException

shearAxis

public void shearAxis(double shx,
                      double shy)
               throws ExpressionException
Throws:
ExpressionException

shear

public void shear(float shear,
                  javax.media.jai.operator.ShearDir direction,
                  Object interpolation)
           throws ExpressionException
Throws:
ExpressionException

getBufferedImage

public BufferedImage getBufferedImage()
                               throws ExpressionException
Throws:
ExpressionException

image

public BufferedImage image()
                    throws ExpressionException
Throws:
ExpressionException

image

public void image(BufferedImage image)

writeBase64

public String writeBase64(Resource destination,
                          String format,
                          boolean inHTMLFormat)
                   throws PageException,
                          IOException
Throws:
PageException
IOException

getBase64String

public String getBase64String(String format)
                       throws PageException
Throws:
PageException

writeOut

public void writeOut(Resource destination,
                     boolean overwrite,
                     float quality)
              throws IOException,
                     ExpressionException
Throws:
IOException
ExpressionException

writeOut

public void writeOut(Resource destination,
                     String format,
                     boolean overwrite,
                     float quality)
              throws IOException,
                     ExpressionException
Throws:
IOException
ExpressionException

writeOutGif

public static void writeOutGif(BufferedImage src,
                               OutputStream os)
                        throws IOException
Throws:
IOException

writeOut

public void writeOut(OutputStream os,
                     String format,
                     float quality,
                     boolean closeStream)
              throws IOException,
                     ExpressionException
Throws:
IOException
ExpressionException

convert

public void convert(String format)

scaleToFit

public void scaleToFit(String fitWidth,
                       String fitHeight,
                       String interpolation,
                       double blurFactor)
                throws PageException
Throws:
PageException

resize

public void resize(int scale,
                   String interpolation,
                   double blurFactor)
            throws PageException
Throws:
PageException

resize

public void resize(String strWidth,
                   String strHeight,
                   String interpolation,
                   double blurFactor)
            throws PageException
Throws:
PageException

resizeImage2

public void resizeImage2(int width,
                         int height)
                  throws ExpressionException
Throws:
ExpressionException

resizeImage

public void resizeImage(int width,
                        int height,
                        int interpolation)
                 throws ExpressionException
Throws:
ExpressionException

resize

public void resize(int width,
                   int height,
                   int interpolation,
                   double blurFactor)
            throws ExpressionException
Throws:
ExpressionException

rotate

public void rotate(float x,
                   float y,
                   float angle,
                   int interpolation)
            throws ExpressionException
Throws:
ExpressionException

_rotate

public void _rotate(float x,
                    float y,
                    float angle,
                    String interpolation)
             throws ExpressionException
Throws:
ExpressionException

toImage

public static Image toImage(Object obj)
                     throws PageException
Throws:
PageException

isImage

public static boolean isImage(Object obj)

createImage

public static Image createImage(PageContext pc,
                                Object obj,
                                boolean check4Var,
                                boolean clone,
                                boolean checkAccess,
                                String format)
                         throws PageException
Throws:
PageException

duplicate

public Collection duplicate(boolean deepCopy)
Specified by:
duplicate in interface Collection

getColorModel

public ColorModel getColorModel()
                         throws ExpressionException
Throws:
ExpressionException

crop

public void crop(float x,
                 float y,
                 float width,
                 float height)
          throws ExpressionException
Throws:
ExpressionException

getWidth

public int getWidth()
             throws ExpressionException
Throws:
ExpressionException

getHeight

public int getHeight()
              throws ExpressionException
Throws:
ExpressionException

getFormat

public String getFormat()

getImageBytes

public byte[] getImageBytes(String format)
                     throws PageException
Throws:
PageException

getImageBytes

public byte[] getImageBytes(String format,
                            boolean noMeta)
                     throws PageException
Throws:
PageException

setColor

public void setColor(Color color)
              throws ExpressionException
Throws:
ExpressionException

setAlpha

public void setAlpha(float alpha)
              throws ExpressionException
Throws:
ExpressionException

setBackground

public void setBackground(Color color)
                   throws ExpressionException
Throws:
ExpressionException

setAntiAliasing

public void setAntiAliasing(boolean antiAlias)
                     throws ExpressionException
Throws:
ExpressionException

clear

public void clear()
Description copied from interface: Collection
clears the collection

Specified by:
clear in interface Map
Specified by:
clear in interface Collection

containsKey

public boolean containsKey(Collection.Key key)
Description copied from interface: Collection
contains this key

Specified by:
containsKey in interface Collection
Returns:
returns if collection has a key with given name

get

public Object get(Collection.Key key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Parameters:
key - key of the value to get must be lower case
Returns:
value on key position
Throws:
PageException

get

public Object get(Collection.Key key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position or null

keys

public Collection.Key[] keys()
Specified by:
keys in interface Collection
Returns:
returns a string array of all keys in the collection

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Specified by:
remove in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Specified by:
removeEL in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null

size

public int size()
Specified by:
size in interface Map
Specified by:
size in interface Collection
Returns:
the size of the collection

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties dp)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Overrides:
toDumpData in class StructSupport
Returns:
HTML print out

keyIterator

public Iterator<Collection.Key> keyIterator()
Specified by:
keyIterator in interface Iteratorable
Returns:
return a Iterator for Keys as Collection.Keys

keysAsStringIterator

public Iterator<String> keysAsStringIterator()
Specified by:
keysAsStringIterator in interface Iteratorable
Overrides:
keysAsStringIterator in class StructSupport
Returns:
return a Iterator for Keys as String

entryIterator

public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
Specified by:
entryIterator in interface Iteratorable

valueIterator

public Iterator<Object> valueIterator()
Specified by:
valueIterator in interface Iteratorable
Returns:
return a Iterator for Values

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBooleanValue in interface Castable
Overrides:
castToBooleanValue in class StructSupport
Returns:
boolean Value representation of the Object
Throws:
PageException

castToBoolean

public Boolean castToBoolean(Boolean defaultValue)
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBoolean in interface Castable
Overrides:
castToBoolean in class StructSupport
Returns:
boolean Value representation of the Object

castToDateTime

public DateTime castToDateTime()
                        throws PageException
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Overrides:
castToDateTime in class StructSupport
Returns:
date time representation of the Object
Throws:
PageException

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Overrides:
castToDateTime in class StructSupport
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Overrides:
castToDoubleValue in class StructSupport
Returns:
double Value representation of the Object
Throws:
PageException

castToDoubleValue

public double castToDoubleValue(double defaultValue)
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Overrides:
castToDoubleValue in class StructSupport
Returns:
double Value representation of the Object

castToString

public String castToString()
                    throws PageException
Description copied from interface: Castable
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Specified by:
castToString in interface Castable
Overrides:
castToString in class StructSupport
Returns:
String representation of the Object
Throws:
PageException

castToString

public String castToString(String defaultValue)
Description copied from interface: Castable
cast the castable value to a string, return the default value, when the method is not castable

Specified by:
castToString in interface Castable
Overrides:
castToString in class StructSupport
Returns:
String representation of the Object

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class StructSupport
Throws:
PageException

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class StructSupport
Throws:
PageException

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class StructSupport
Throws:
PageException

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class StructSupport
Throws:
PageException

toInterpolation

public static int toInterpolation(String strInterpolation)
                           throws ExpressionException
Throws:
ExpressionException

getSource

public Resource getSource()
Returns:
the source

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map
Overrides:
containsValue in class StructSupport

values

public Collection values()
Specified by:
values in interface Map
Overrides:
values in class StructSupport

hasAlpha

public static boolean hasAlpha(Image image)
This method returns true if the specified image has transparent pixels

Parameters:
image -
Returns:

toBufferedImage

public static BufferedImage toBufferedImage(Image image)


Copyright © 2012 Railo