ru.novosoft.dc.core
Interface PictureHandler


public interface PictureHandler

A picture handler provides logging and access to the picture information.


Method Summary
 int conversionDensity()
          Return required conversion density in DPI (dots per inch).
 boolean exec(java.lang.String[] cmdarray)
          Executes a subprocess passing a command array to it and return true if the process was finished without exceptions.
 int get(int index)
          Get the value of the picture parameter of the specified index (meaning of indices specified in PictureInfo).
 java.lang.Object getContext()
          Return a picture context for testing on uniqueness.
 java.lang.Object getPictureID()
          Return a picture ID or null if no ID defined yet.
 int getPictureType()
          Return a type of the picture handled.
 int getUniqueTag()
          Return a unique tag of the picture or 0 if the tag unspecified.
 java.lang.String getURI()
          Return the non-encoded URI of the picture or null if it is undefined.
 boolean hasEqualContext(java.lang.Object context)
          Return true if the context of picture is equal to the given context.
 void info(java.lang.String message)
          Send an information message to the logger of this handler.
 void pictureWasChanged()
          Send a signal to the handler that a picture size or type was changed.
 void set(int index, int value)
          Set a value for the picture parameter of the specified index (meaning of indices specified in PictureInfo).
 void setContext(java.lang.Object context)
          Set a picture context as the given context.
 void setPictureID(java.lang.Object value)
          Set a picture ID.
 void setURI(java.lang.String value)
          Set a new non-encoded URI for the picture.
 void warning(java.lang.String message)
          Send a warning message to the logger of this handler.
 

Method Detail

info

public void info(java.lang.String message)
Send an information message to the logger of this handler.

warning

public void warning(java.lang.String message)
Send a warning message to the logger of this handler.

setPictureID

public void setPictureID(java.lang.Object value)
Set a picture ID. This operation is called by the picture pool.

getPictureID

public java.lang.Object getPictureID()
Return a picture ID or null if no ID defined yet.

set

public void set(int index,
                int value)
Set a value for the picture parameter of the specified index (meaning of indices specified in PictureInfo).

get

public int get(int index)
Get the value of the picture parameter of the specified index (meaning of indices specified in PictureInfo).

setURI

public void setURI(java.lang.String value)
Set a new non-encoded URI for the picture.

getURI

public java.lang.String getURI()
Return the non-encoded URI of the picture or null if it is undefined.

getUniqueTag

public int getUniqueTag()
Return a unique tag of the picture or 0 if the tag unspecified.

getPictureType

public int getPictureType()
Return a type of the picture handled.

getContext

public java.lang.Object getContext()
Return a picture context for testing on uniqueness.

hasEqualContext

public boolean hasEqualContext(java.lang.Object context)
Return true if the context of picture is equal to the given context.

setContext

public void setContext(java.lang.Object context)
Set a picture context as the given context.

pictureWasChanged

public void pictureWasChanged()
Send a signal to the handler that a picture size or type was changed.

conversionDensity

public int conversionDensity()
Return required conversion density in DPI (dots per inch).

exec

public boolean exec(java.lang.String[] cmdarray)
Executes a subprocess passing a command array to it and return true if the process was finished without exceptions.