com.iproject.wbmpcreator
Class WBMPMultiLayer

java.lang.Object
  |
  +--com.iproject.wbmpcreator.WBMPfile
        |
        +--com.iproject.wbmpcreator.WBMPMultiLayer

public class WBMPMultiLayer
extends WBMPfile

This class represents a Vector of WBMPfile class instances to work with. It is very convenient to use this class when necessity of appending multiple images appears.

Since:
1.42

Copyright (c) 2000 WAP Shareware, Inc. Visit WAP Shareware

Author:
Max Jury Krainov for Cellular Magic
See Also:
Serialized Form

Fields inherited from class com.iproject.wbmpcreator.WBMPfile
ALIGN_CENTER, ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT, ALIGN_VERTICAL_BOTTOM, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_TOP, APPEND_MODE_CONTINUOUS, APPEND_MODE_DIVISION, LINE_CHAIN3_1, LINE_CHAIN3_2, LINE_INT2_1, LINE_INT2_2, LINE_INT3_2, LINE_POINT1, LINE_POINT2, LINE_POINT3, MIX_MODE_AND, MIX_MODE_NOT, MIX_MODE_OR, MIX_MODE_XOR
 
Constructor Summary
WBMPMultiLayer()
          Constructor creating initial multi-layer
 
Method Summary
 void addItem(java.lang.String filename)
          Method to put the image file of JPEG, GIF, WBMP formats into the storage.
 void addItem(WBMPfile newItem)
          Method to put the WBMPfile instance into the storage.
 WBMPfile appendLayersLeftRight()
          Method to append images from left to right.
 WBMPfile appendLayersUpDown()
          Method to append images from up to down.
 void clearLayer()
          Method to remove all the contents of a layer.
 int getItemsQuantity()
          This method is used to get amount of images stored.
 java.util.Vector getLayer()
          Method to get multilayer of images
 void setLayer(java.util.Vector newLayer)
          Method to set multilayer of images
 
Methods inherited from class com.iproject.wbmpcreator.WBMPfile
align, convert2WBMPfile, convert2WBMPfile, createWBMPFile, destroyWBMPFile, draw3DRect, drawArc, drawCircle, drawCustomString, drawLine, drawOval, drawPoint, drawRect, drawSpecialLine, drawString, drawTTFString, executeSequence, getByteArray, getElementAt, getRectArea, getString, getWBMPLength, getWBMPpic, getWBMPWidth, invertWBMPImage, mix, mix, openEWBMPFile, openWBMPFile, printWBMPImage, reduce, rotate, saveEWBMP2File, saveWBMPFile, setElementAt, setWBMPLength, setWBMPWidth, writeWBMPFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBMPMultiLayer

public WBMPMultiLayer()
Constructor creating initial multi-layer
Method Detail

getLayer

public java.util.Vector getLayer()
Method to get multilayer of images
Returns:
the multilayer with all stored WBMPfile instances

setLayer

public void setLayer(java.util.Vector newLayer)
Method to set multilayer of images
Parameters:
layer - the multilayer

addItem

public void addItem(WBMPfile newItem)
Method to put the WBMPfile instance into the storage.
Parameters:
newItem - the WBMPfile instance

addItem

public void addItem(java.lang.String filename)
             throws java.io.IOException
Method to put the image file of JPEG, GIF, WBMP formats into the storage. Files of formats different from WBMP will be automatically converted with adoptive threshold.
Parameters:
filename - the image file name

getItemsQuantity

public int getItemsQuantity()
This method is used to get amount of images stored.
Returns:
amount of images in a storage

clearLayer

public void clearLayer()
Method to remove all the contents of a layer.

appendLayersLeftRight

public WBMPfile appendLayersLeftRight()
Method to append images from left to right.

The simple example:

 try{
   WBMPfile wf1=new WBMPfile("c:\\1.wbmp"); // you can use any source for creating image
   WBMPfile wf2=new WBMPfile("c:\\2.wbmp"); // you can use any source for creating image
   WBMPfile wf3=new WBMPfile("c:\\3.wbmp"); // you can use any source for creating image
   WBMPfile wf4=new WBMPfile("c:\\4.wbmp"); // you can use any source for creating image

   WBMPMultiLayer wml=new WBMPMultiLayer();
   wml.addItem(wf1);
   wml.addItem(wf2);
   wml.addItem(wf3);
   wml.addItem(wf4);

   WBMPfile result=wml.appendLayersLeftRight();
   result.saveWBMP2File("c:\\test1.wbmp");
 } catch(Exception e){
   e.printStackTrace();
 } // try
 
Returns:
WBMPfile instance containing images in a horizontal row

appendLayersUpDown

public WBMPfile appendLayersUpDown()
Method to append images from up to down.

The simple example:

 try{
   WBMPfile wf1=new WBMPfile("c:\\1.wbmp"); // you can use any source for creating image
   WBMPfile wf2=new WBMPfile("c:\\2.wbmp"); // you can use any source for creating image
   WBMPfile wf3=new WBMPfile("c:\\3.wbmp"); // you can use any source for creating image
   WBMPfile wf4=new WBMPfile("c:\\4.wbmp"); // you can use any source for creating image

   WBMPMultiLayer wml=new WBMPMultiLayer();
   wml.addItem(wf1);
   wml.addItem(wf2);
   wml.addItem(wf3);
   wml.addItem(wf4);

   WBMPfile result=wml.appendLayersUpDown();
   result.saveWBMP2File("c:\\test2.wbmp");
 } catch(Exception e){
   e.printStackTrace();
 } // try
 
Returns:
WBMPfile instance containing images in a vertical row